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 29 extern __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 45 static inline __ATTRS_o_ai signed char 46 vec_extract(__vector signed char __vec, int __index) { 47 return __vec[__index & 15]; 48 } 49 50 static inline __ATTRS_o_ai unsigned char 51 vec_extract(__vector __bool char __vec, int __index) { 52 return __vec[__index & 15]; 53 } 54 55 static inline __ATTRS_o_ai unsigned char 56 vec_extract(__vector unsigned char __vec, int __index) { 57 return __vec[__index & 15]; 58 } 59 60 static inline __ATTRS_o_ai signed short 61 vec_extract(__vector signed short __vec, int __index) { 62 return __vec[__index & 7]; 63 } 64 65 static inline __ATTRS_o_ai unsigned short 66 vec_extract(__vector __bool short __vec, int __index) { 67 return __vec[__index & 7]; 68 } 69 70 static inline __ATTRS_o_ai unsigned short 71 vec_extract(__vector unsigned short __vec, int __index) { 72 return __vec[__index & 7]; 73 } 74 75 static inline __ATTRS_o_ai signed int 76 vec_extract(__vector signed int __vec, int __index) { 77 return __vec[__index & 3]; 78 } 79 80 static inline __ATTRS_o_ai unsigned int 81 vec_extract(__vector __bool int __vec, int __index) { 82 return __vec[__index & 3]; 83 } 84 85 static inline __ATTRS_o_ai unsigned int 86 vec_extract(__vector unsigned int __vec, int __index) { 87 return __vec[__index & 3]; 88 } 89 90 static inline __ATTRS_o_ai signed long long 91 vec_extract(__vector signed long long __vec, int __index) { 92 return __vec[__index & 1]; 93 } 94 95 static inline __ATTRS_o_ai unsigned long long 96 vec_extract(__vector __bool long long __vec, int __index) { 97 return __vec[__index & 1]; 98 } 99 100 static inline __ATTRS_o_ai unsigned long long 101 vec_extract(__vector unsigned long long __vec, int __index) { 102 return __vec[__index & 1]; 103 } 104 105 #if __ARCH__ >= 12 106 static inline __ATTRS_o_ai float 107 vec_extract(__vector float __vec, int __index) { 108 return __vec[__index & 3]; 109 } 110 #endif 111 112 static inline __ATTRS_o_ai double 113 vec_extract(__vector double __vec, int __index) { 114 return __vec[__index & 1]; 115 } 116 117 /*-- vec_insert -------------------------------------------------------------*/ 118 119 static inline __ATTRS_o_ai __vector signed char 120 vec_insert(signed char __scalar, __vector signed char __vec, int __index) { 121 __vec[__index & 15] = __scalar; 122 return __vec; 123 } 124 125 // This prototype is deprecated. 126 static inline __ATTRS_o_ai __vector unsigned char 127 vec_insert(unsigned char __scalar, __vector __bool char __vec, int __index) { 128 __vector unsigned char __newvec = (__vector unsigned char)__vec; 129 __newvec[__index & 15] = (unsigned char)__scalar; 130 return __newvec; 131 } 132 133 static inline __ATTRS_o_ai __vector unsigned char 134 vec_insert(unsigned char __scalar, __vector unsigned char __vec, int __index) { 135 __vec[__index & 15] = __scalar; 136 return __vec; 137 } 138 139 static inline __ATTRS_o_ai __vector signed short 140 vec_insert(signed short __scalar, __vector signed short __vec, int __index) { 141 __vec[__index & 7] = __scalar; 142 return __vec; 143 } 144 145 // This prototype is deprecated. 146 static inline __ATTRS_o_ai __vector unsigned short 147 vec_insert(unsigned short __scalar, __vector __bool short __vec, 148 int __index) { 149 __vector unsigned short __newvec = (__vector unsigned short)__vec; 150 __newvec[__index & 7] = (unsigned short)__scalar; 151 return __newvec; 152 } 153 154 static inline __ATTRS_o_ai __vector unsigned short 155 vec_insert(unsigned short __scalar, __vector unsigned short __vec, 156 int __index) { 157 __vec[__index & 7] = __scalar; 158 return __vec; 159 } 160 161 static inline __ATTRS_o_ai __vector signed int 162 vec_insert(signed int __scalar, __vector signed int __vec, int __index) { 163 __vec[__index & 3] = __scalar; 164 return __vec; 165 } 166 167 // This prototype is deprecated. 168 static inline __ATTRS_o_ai __vector unsigned int 169 vec_insert(unsigned int __scalar, __vector __bool int __vec, int __index) { 170 __vector unsigned int __newvec = (__vector unsigned int)__vec; 171 __newvec[__index & 3] = __scalar; 172 return __newvec; 173 } 174 175 static inline __ATTRS_o_ai __vector unsigned int 176 vec_insert(unsigned int __scalar, __vector unsigned int __vec, int __index) { 177 __vec[__index & 3] = __scalar; 178 return __vec; 179 } 180 181 static inline __ATTRS_o_ai __vector signed long long 182 vec_insert(signed long long __scalar, __vector signed long long __vec, 183 int __index) { 184 __vec[__index & 1] = __scalar; 185 return __vec; 186 } 187 188 // This prototype is deprecated. 189 static inline __ATTRS_o_ai __vector unsigned long long 190 vec_insert(unsigned long long __scalar, __vector __bool long long __vec, 191 int __index) { 192 __vector unsigned long long __newvec = (__vector unsigned long long)__vec; 193 __newvec[__index & 1] = __scalar; 194 return __newvec; 195 } 196 197 static inline __ATTRS_o_ai __vector unsigned long long 198 vec_insert(unsigned long long __scalar, __vector unsigned long long __vec, 199 int __index) { 200 __vec[__index & 1] = __scalar; 201 return __vec; 202 } 203 204 #if __ARCH__ >= 12 205 static inline __ATTRS_o_ai __vector float 206 vec_insert(float __scalar, __vector float __vec, int __index) { 207 __vec[__index & 1] = __scalar; 208 return __vec; 209 } 210 #endif 211 212 static inline __ATTRS_o_ai __vector double 213 vec_insert(double __scalar, __vector double __vec, int __index) { 214 __vec[__index & 1] = __scalar; 215 return __vec; 216 } 217 218 /*-- vec_promote ------------------------------------------------------------*/ 219 220 static inline __ATTRS_o_ai __vector signed char 221 vec_promote(signed char __scalar, int __index) { 222 const __vector signed char __zero = (__vector signed char)0; 223 __vector signed char __vec = __builtin_shufflevector(__zero, __zero, 224 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); 225 __vec[__index & 15] = __scalar; 226 return __vec; 227 } 228 229 static inline __ATTRS_o_ai __vector unsigned char 230 vec_promote(unsigned char __scalar, int __index) { 231 const __vector unsigned char __zero = (__vector unsigned char)0; 232 __vector unsigned char __vec = __builtin_shufflevector(__zero, __zero, 233 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); 234 __vec[__index & 15] = __scalar; 235 return __vec; 236 } 237 238 static inline __ATTRS_o_ai __vector signed short 239 vec_promote(signed short __scalar, int __index) { 240 const __vector signed short __zero = (__vector signed short)0; 241 __vector signed short __vec = __builtin_shufflevector(__zero, __zero, 242 -1, -1, -1, -1, -1, -1, -1, -1); 243 __vec[__index & 7] = __scalar; 244 return __vec; 245 } 246 247 static inline __ATTRS_o_ai __vector unsigned short 248 vec_promote(unsigned short __scalar, int __index) { 249 const __vector unsigned short __zero = (__vector unsigned short)0; 250 __vector unsigned short __vec = __builtin_shufflevector(__zero, __zero, 251 -1, -1, -1, -1, -1, -1, -1, -1); 252 __vec[__index & 7] = __scalar; 253 return __vec; 254 } 255 256 static inline __ATTRS_o_ai __vector signed int 257 vec_promote(signed int __scalar, int __index) { 258 const __vector signed int __zero = (__vector signed int)0; 259 __vector signed int __vec = __builtin_shufflevector(__zero, __zero, 260 -1, -1, -1, -1); 261 __vec[__index & 3] = __scalar; 262 return __vec; 263 } 264 265 static inline __ATTRS_o_ai __vector unsigned int 266 vec_promote(unsigned int __scalar, int __index) { 267 const __vector unsigned int __zero = (__vector unsigned int)0; 268 __vector unsigned int __vec = __builtin_shufflevector(__zero, __zero, 269 -1, -1, -1, -1); 270 __vec[__index & 3] = __scalar; 271 return __vec; 272 } 273 274 static inline __ATTRS_o_ai __vector signed long long 275 vec_promote(signed long long __scalar, int __index) { 276 const __vector signed long long __zero = (__vector signed long long)0; 277 __vector signed long long __vec = __builtin_shufflevector(__zero, __zero, 278 -1, -1); 279 __vec[__index & 1] = __scalar; 280 return __vec; 281 } 282 283 static inline __ATTRS_o_ai __vector unsigned long long 284 vec_promote(unsigned long long __scalar, int __index) { 285 const __vector unsigned long long __zero = (__vector unsigned long long)0; 286 __vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero, 287 -1, -1); 288 __vec[__index & 1] = __scalar; 289 return __vec; 290 } 291 292 #if __ARCH__ >= 12 293 static inline __ATTRS_o_ai __vector float 294 vec_promote(float __scalar, int __index) { 295 const __vector float __zero = (__vector float)0.0f; 296 __vector float __vec = __builtin_shufflevector(__zero, __zero, 297 -1, -1, -1, -1); 298 __vec[__index & 3] = __scalar; 299 return __vec; 300 } 301 #endif 302 303 static inline __ATTRS_o_ai __vector double 304 vec_promote(double __scalar, int __index) { 305 const __vector double __zero = (__vector double)0.0; 306 __vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1); 307 __vec[__index & 1] = __scalar; 308 return __vec; 309 } 310 311 /*-- vec_insert_and_zero ----------------------------------------------------*/ 312 313 static inline __ATTRS_o_ai __vector signed char 314 vec_insert_and_zero(const signed char *__ptr) { 315 __vector signed char __vec = (__vector signed char)0; 316 __vec[7] = *__ptr; 317 return __vec; 318 } 319 320 static inline __ATTRS_o_ai __vector unsigned char 321 vec_insert_and_zero(const unsigned char *__ptr) { 322 __vector unsigned char __vec = (__vector unsigned char)0; 323 __vec[7] = *__ptr; 324 return __vec; 325 } 326 327 static inline __ATTRS_o_ai __vector signed short 328 vec_insert_and_zero(const signed short *__ptr) { 329 __vector signed short __vec = (__vector signed short)0; 330 __vec[3] = *__ptr; 331 return __vec; 332 } 333 334 static inline __ATTRS_o_ai __vector unsigned short 335 vec_insert_and_zero(const unsigned short *__ptr) { 336 __vector unsigned short __vec = (__vector unsigned short)0; 337 __vec[3] = *__ptr; 338 return __vec; 339 } 340 341 static inline __ATTRS_o_ai __vector signed int 342 vec_insert_and_zero(const signed int *__ptr) { 343 __vector signed int __vec = (__vector signed int)0; 344 __vec[1] = *__ptr; 345 return __vec; 346 } 347 348 static inline __ATTRS_o_ai __vector unsigned int 349 vec_insert_and_zero(const unsigned int *__ptr) { 350 __vector unsigned int __vec = (__vector unsigned int)0; 351 __vec[1] = *__ptr; 352 return __vec; 353 } 354 355 static inline __ATTRS_o_ai __vector signed long long 356 vec_insert_and_zero(const signed long long *__ptr) { 357 __vector signed long long __vec = (__vector signed long long)0; 358 __vec[0] = *__ptr; 359 return __vec; 360 } 361 362 static inline __ATTRS_o_ai __vector unsigned long long 363 vec_insert_and_zero(const unsigned long long *__ptr) { 364 __vector unsigned long long __vec = (__vector unsigned long long)0; 365 __vec[0] = *__ptr; 366 return __vec; 367 } 368 369 #if __ARCH__ >= 12 370 static inline __ATTRS_o_ai __vector float 371 vec_insert_and_zero(const float *__ptr) { 372 __vector float __vec = (__vector float)0.0f; 373 __vec[1] = *__ptr; 374 return __vec; 375 } 376 #endif 377 378 static inline __ATTRS_o_ai __vector double 379 vec_insert_and_zero(const double *__ptr) { 380 __vector double __vec = (__vector double)0.0; 381 __vec[0] = *__ptr; 382 return __vec; 383 } 384 385 /*-- vec_perm ---------------------------------------------------------------*/ 386 387 static inline __ATTRS_o_ai __vector signed char 388 vec_perm(__vector signed char __a, __vector signed char __b, 389 __vector unsigned char __c) { 390 return (__vector signed char)__builtin_s390_vperm( 391 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 392 } 393 394 static inline __ATTRS_o_ai __vector unsigned char 395 vec_perm(__vector unsigned char __a, __vector unsigned char __b, 396 __vector unsigned char __c) { 397 return (__vector unsigned char)__builtin_s390_vperm( 398 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 399 } 400 401 static inline __ATTRS_o_ai __vector __bool char 402 vec_perm(__vector __bool char __a, __vector __bool char __b, 403 __vector unsigned char __c) { 404 return (__vector __bool char)__builtin_s390_vperm( 405 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 406 } 407 408 static inline __ATTRS_o_ai __vector signed short 409 vec_perm(__vector signed short __a, __vector signed short __b, 410 __vector unsigned char __c) { 411 return (__vector signed short)__builtin_s390_vperm( 412 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 413 } 414 415 static inline __ATTRS_o_ai __vector unsigned short 416 vec_perm(__vector unsigned short __a, __vector unsigned short __b, 417 __vector unsigned char __c) { 418 return (__vector unsigned short)__builtin_s390_vperm( 419 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 420 } 421 422 static inline __ATTRS_o_ai __vector __bool short 423 vec_perm(__vector __bool short __a, __vector __bool short __b, 424 __vector unsigned char __c) { 425 return (__vector __bool short)__builtin_s390_vperm( 426 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 427 } 428 429 static inline __ATTRS_o_ai __vector signed int 430 vec_perm(__vector signed int __a, __vector signed int __b, 431 __vector unsigned char __c) { 432 return (__vector signed int)__builtin_s390_vperm( 433 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 434 } 435 436 static inline __ATTRS_o_ai __vector unsigned int 437 vec_perm(__vector unsigned int __a, __vector unsigned int __b, 438 __vector unsigned char __c) { 439 return (__vector unsigned int)__builtin_s390_vperm( 440 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 441 } 442 443 static inline __ATTRS_o_ai __vector __bool int 444 vec_perm(__vector __bool int __a, __vector __bool int __b, 445 __vector unsigned char __c) { 446 return (__vector __bool int)__builtin_s390_vperm( 447 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 448 } 449 450 static inline __ATTRS_o_ai __vector signed long long 451 vec_perm(__vector signed long long __a, __vector signed long long __b, 452 __vector unsigned char __c) { 453 return (__vector signed long long)__builtin_s390_vperm( 454 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 455 } 456 457 static inline __ATTRS_o_ai __vector unsigned long long 458 vec_perm(__vector unsigned long long __a, __vector unsigned long long __b, 459 __vector unsigned char __c) { 460 return (__vector unsigned long long)__builtin_s390_vperm( 461 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 462 } 463 464 static inline __ATTRS_o_ai __vector __bool long long 465 vec_perm(__vector __bool long long __a, __vector __bool long long __b, 466 __vector unsigned char __c) { 467 return (__vector __bool long long)__builtin_s390_vperm( 468 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 469 } 470 471 #if __ARCH__ >= 12 472 static inline __ATTRS_o_ai __vector float 473 vec_perm(__vector float __a, __vector float __b, 474 __vector unsigned char __c) { 475 return (__vector float)__builtin_s390_vperm( 476 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 477 } 478 #endif 479 480 static inline __ATTRS_o_ai __vector double 481 vec_perm(__vector double __a, __vector double __b, 482 __vector unsigned char __c) { 483 return (__vector double)__builtin_s390_vperm( 484 (__vector unsigned char)__a, (__vector unsigned char)__b, __c); 485 } 486 487 /*-- vec_permi --------------------------------------------------------------*/ 488 489 // This prototype is deprecated. 490 extern __ATTRS_o __vector signed long long 491 vec_permi(__vector signed long long __a, __vector signed long long __b, 492 int __c) 493 __constant_range(__c, 0, 3); 494 495 // This prototype is deprecated. 496 extern __ATTRS_o __vector unsigned long long 497 vec_permi(__vector unsigned long long __a, __vector unsigned long long __b, 498 int __c) 499 __constant_range(__c, 0, 3); 500 501 // This prototype is deprecated. 502 extern __ATTRS_o __vector __bool long long 503 vec_permi(__vector __bool long long __a, __vector __bool long long __b, 504 int __c) 505 __constant_range(__c, 0, 3); 506 507 // This prototype is deprecated. 508 extern __ATTRS_o __vector double 509 vec_permi(__vector double __a, __vector double __b, int __c) 510 __constant_range(__c, 0, 3); 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 520 static inline __ATTRS_ai __vector unsigned long long 521 vec_bperm_u128(__vector unsigned char __a, __vector unsigned char __b) { 522 return __builtin_s390_vbperm(__a, __b); 523 } 524 #endif 525 526 /*-- vec_revb ---------------------------------------------------------------*/ 527 528 static inline __ATTRS_o_ai __vector signed short 529 vec_revb(__vector signed short __vec) { 530 return (__vector signed short) 531 __builtin_s390_vlbrh((__vector unsigned short)__vec); 532 } 533 534 static inline __ATTRS_o_ai __vector unsigned short 535 vec_revb(__vector unsigned short __vec) { 536 return __builtin_s390_vlbrh(__vec); 537 } 538 539 static inline __ATTRS_o_ai __vector signed int 540 vec_revb(__vector signed int __vec) { 541 return (__vector signed int) 542 __builtin_s390_vlbrf((__vector unsigned int)__vec); 543 } 544 545 static inline __ATTRS_o_ai __vector unsigned int 546 vec_revb(__vector unsigned int __vec) { 547 return __builtin_s390_vlbrf(__vec); 548 } 549 550 static inline __ATTRS_o_ai __vector signed long long 551 vec_revb(__vector signed long long __vec) { 552 return (__vector signed long long) 553 __builtin_s390_vlbrg((__vector unsigned long long)__vec); 554 } 555 556 static inline __ATTRS_o_ai __vector unsigned long long 557 vec_revb(__vector unsigned long long __vec) { 558 return __builtin_s390_vlbrg(__vec); 559 } 560 561 #if __ARCH__ >= 12 562 static inline __ATTRS_o_ai __vector float 563 vec_revb(__vector float __vec) { 564 return (__vector float) 565 __builtin_s390_vlbrf((__vector unsigned int)__vec); 566 } 567 #endif 568 569 static inline __ATTRS_o_ai __vector double 570 vec_revb(__vector double __vec) { 571 return (__vector double) 572 __builtin_s390_vlbrg((__vector unsigned long long)__vec); 573 } 574 575 /*-- vec_reve ---------------------------------------------------------------*/ 576 577 static inline __ATTRS_o_ai __vector signed char 578 vec_reve(__vector signed char __vec) { 579 return (__vector signed char) { __vec[15], __vec[14], __vec[13], __vec[12], 580 __vec[11], __vec[10], __vec[9], __vec[8], 581 __vec[7], __vec[6], __vec[5], __vec[4], 582 __vec[3], __vec[2], __vec[1], __vec[0] }; 583 } 584 585 static inline __ATTRS_o_ai __vector unsigned char 586 vec_reve(__vector unsigned char __vec) { 587 return (__vector unsigned char) { __vec[15], __vec[14], __vec[13], __vec[12], 588 __vec[11], __vec[10], __vec[9], __vec[8], 589 __vec[7], __vec[6], __vec[5], __vec[4], 590 __vec[3], __vec[2], __vec[1], __vec[0] }; 591 } 592 593 static inline __ATTRS_o_ai __vector __bool char 594 vec_reve(__vector __bool char __vec) { 595 return (__vector __bool char) { __vec[15], __vec[14], __vec[13], __vec[12], 596 __vec[11], __vec[10], __vec[9], __vec[8], 597 __vec[7], __vec[6], __vec[5], __vec[4], 598 __vec[3], __vec[2], __vec[1], __vec[0] }; 599 } 600 601 static inline __ATTRS_o_ai __vector signed short 602 vec_reve(__vector signed short __vec) { 603 return (__vector signed short) { __vec[7], __vec[6], __vec[5], __vec[4], 604 __vec[3], __vec[2], __vec[1], __vec[0] }; 605 } 606 607 static inline __ATTRS_o_ai __vector unsigned short 608 vec_reve(__vector unsigned short __vec) { 609 return (__vector unsigned short) { __vec[7], __vec[6], __vec[5], __vec[4], 610 __vec[3], __vec[2], __vec[1], __vec[0] }; 611 } 612 613 static inline __ATTRS_o_ai __vector __bool short 614 vec_reve(__vector __bool short __vec) { 615 return (__vector __bool short) { __vec[7], __vec[6], __vec[5], __vec[4], 616 __vec[3], __vec[2], __vec[1], __vec[0] }; 617 } 618 619 static inline __ATTRS_o_ai __vector signed int 620 vec_reve(__vector signed int __vec) { 621 return (__vector signed int) { __vec[3], __vec[2], __vec[1], __vec[0] }; 622 } 623 624 static inline __ATTRS_o_ai __vector unsigned int 625 vec_reve(__vector unsigned int __vec) { 626 return (__vector unsigned int) { __vec[3], __vec[2], __vec[1], __vec[0] }; 627 } 628 629 static inline __ATTRS_o_ai __vector __bool int 630 vec_reve(__vector __bool int __vec) { 631 return (__vector __bool int) { __vec[3], __vec[2], __vec[1], __vec[0] }; 632 } 633 634 static inline __ATTRS_o_ai __vector signed long long 635 vec_reve(__vector signed long long __vec) { 636 return (__vector signed long long) { __vec[1], __vec[0] }; 637 } 638 639 static inline __ATTRS_o_ai __vector unsigned long long 640 vec_reve(__vector unsigned long long __vec) { 641 return (__vector unsigned long long) { __vec[1], __vec[0] }; 642 } 643 644 static inline __ATTRS_o_ai __vector __bool long long 645 vec_reve(__vector __bool long long __vec) { 646 return (__vector __bool long long) { __vec[1], __vec[0] }; 647 } 648 649 #if __ARCH__ >= 12 650 static inline __ATTRS_o_ai __vector float 651 vec_reve(__vector float __vec) { 652 return (__vector float) { __vec[3], __vec[2], __vec[1], __vec[0] }; 653 } 654 #endif 655 656 static inline __ATTRS_o_ai __vector double 657 vec_reve(__vector double __vec) { 658 return (__vector double) { __vec[1], __vec[0] }; 659 } 660 661 /*-- vec_sel ----------------------------------------------------------------*/ 662 663 static inline __ATTRS_o_ai __vector signed char 664 vec_sel(__vector signed char __a, __vector signed char __b, 665 __vector unsigned char __c) { 666 return (((__vector signed char)__c & __b) | 667 (~(__vector signed char)__c & __a)); 668 } 669 670 static inline __ATTRS_o_ai __vector signed char 671 vec_sel(__vector signed char __a, __vector signed char __b, 672 __vector __bool char __c) { 673 return (((__vector signed char)__c & __b) | 674 (~(__vector signed char)__c & __a)); 675 } 676 677 static inline __ATTRS_o_ai __vector __bool char 678 vec_sel(__vector __bool char __a, __vector __bool char __b, 679 __vector unsigned char __c) { 680 return (((__vector __bool char)__c & __b) | 681 (~(__vector __bool char)__c & __a)); 682 } 683 684 static inline __ATTRS_o_ai __vector __bool char 685 vec_sel(__vector __bool char __a, __vector __bool char __b, 686 __vector __bool char __c) { 687 return (__c & __b) | (~__c & __a); 688 } 689 690 static inline __ATTRS_o_ai __vector unsigned char 691 vec_sel(__vector unsigned char __a, __vector unsigned char __b, 692 __vector unsigned char __c) { 693 return (__c & __b) | (~__c & __a); 694 } 695 696 static inline __ATTRS_o_ai __vector unsigned char 697 vec_sel(__vector unsigned char __a, __vector unsigned char __b, 698 __vector __bool char __c) { 699 return (((__vector unsigned char)__c & __b) | 700 (~(__vector unsigned char)__c & __a)); 701 } 702 703 static inline __ATTRS_o_ai __vector signed short 704 vec_sel(__vector signed short __a, __vector signed short __b, 705 __vector unsigned short __c) { 706 return (((__vector signed short)__c & __b) | 707 (~(__vector signed short)__c & __a)); 708 } 709 710 static inline __ATTRS_o_ai __vector signed short 711 vec_sel(__vector signed short __a, __vector signed short __b, 712 __vector __bool short __c) { 713 return (((__vector signed short)__c & __b) | 714 (~(__vector signed short)__c & __a)); 715 } 716 717 static inline __ATTRS_o_ai __vector __bool short 718 vec_sel(__vector __bool short __a, __vector __bool short __b, 719 __vector unsigned short __c) { 720 return (((__vector __bool short)__c & __b) | 721 (~(__vector __bool short)__c & __a)); 722 } 723 724 static inline __ATTRS_o_ai __vector __bool short 725 vec_sel(__vector __bool short __a, __vector __bool short __b, 726 __vector __bool short __c) { 727 return (__c & __b) | (~__c & __a); 728 } 729 730 static inline __ATTRS_o_ai __vector unsigned short 731 vec_sel(__vector unsigned short __a, __vector unsigned short __b, 732 __vector unsigned short __c) { 733 return (__c & __b) | (~__c & __a); 734 } 735 736 static inline __ATTRS_o_ai __vector unsigned short 737 vec_sel(__vector unsigned short __a, __vector unsigned short __b, 738 __vector __bool short __c) { 739 return (((__vector unsigned short)__c & __b) | 740 (~(__vector unsigned short)__c & __a)); 741 } 742 743 static inline __ATTRS_o_ai __vector signed int 744 vec_sel(__vector signed int __a, __vector signed int __b, 745 __vector unsigned int __c) { 746 return (((__vector signed int)__c & __b) | 747 (~(__vector signed int)__c & __a)); 748 } 749 750 static inline __ATTRS_o_ai __vector signed int 751 vec_sel(__vector signed int __a, __vector signed int __b, 752 __vector __bool int __c) { 753 return (((__vector signed int)__c & __b) | 754 (~(__vector signed int)__c & __a)); 755 } 756 757 static inline __ATTRS_o_ai __vector __bool int 758 vec_sel(__vector __bool int __a, __vector __bool int __b, 759 __vector unsigned int __c) { 760 return (((__vector __bool int)__c & __b) | 761 (~(__vector __bool int)__c & __a)); 762 } 763 764 static inline __ATTRS_o_ai __vector __bool int 765 vec_sel(__vector __bool int __a, __vector __bool int __b, 766 __vector __bool int __c) { 767 return (__c & __b) | (~__c & __a); 768 } 769 770 static inline __ATTRS_o_ai __vector unsigned int 771 vec_sel(__vector unsigned int __a, __vector unsigned int __b, 772 __vector unsigned int __c) { 773 return (__c & __b) | (~__c & __a); 774 } 775 776 static inline __ATTRS_o_ai __vector unsigned int 777 vec_sel(__vector unsigned int __a, __vector unsigned int __b, 778 __vector __bool int __c) { 779 return (((__vector unsigned int)__c & __b) | 780 (~(__vector unsigned int)__c & __a)); 781 } 782 783 static inline __ATTRS_o_ai __vector signed long long 784 vec_sel(__vector signed long long __a, __vector signed long long __b, 785 __vector unsigned long long __c) { 786 return (((__vector signed long long)__c & __b) | 787 (~(__vector signed long long)__c & __a)); 788 } 789 790 static inline __ATTRS_o_ai __vector signed long long 791 vec_sel(__vector signed long long __a, __vector signed long long __b, 792 __vector __bool long long __c) { 793 return (((__vector signed long long)__c & __b) | 794 (~(__vector signed long long)__c & __a)); 795 } 796 797 static inline __ATTRS_o_ai __vector __bool long long 798 vec_sel(__vector __bool long long __a, __vector __bool long long __b, 799 __vector unsigned long long __c) { 800 return (((__vector __bool long long)__c & __b) | 801 (~(__vector __bool long long)__c & __a)); 802 } 803 804 static inline __ATTRS_o_ai __vector __bool long long 805 vec_sel(__vector __bool long long __a, __vector __bool long long __b, 806 __vector __bool long long __c) { 807 return (__c & __b) | (~__c & __a); 808 } 809 810 static inline __ATTRS_o_ai __vector unsigned long long 811 vec_sel(__vector unsigned long long __a, __vector unsigned long long __b, 812 __vector unsigned long long __c) { 813 return (__c & __b) | (~__c & __a); 814 } 815 816 static inline __ATTRS_o_ai __vector unsigned long long 817 vec_sel(__vector unsigned long long __a, __vector unsigned long long __b, 818 __vector __bool long long __c) { 819 return (((__vector unsigned long long)__c & __b) | 820 (~(__vector unsigned long long)__c & __a)); 821 } 822 823 #if __ARCH__ >= 12 824 static inline __ATTRS_o_ai __vector float 825 vec_sel(__vector float __a, __vector float __b, __vector unsigned int __c) { 826 return (__vector float)((__c & (__vector unsigned int)__b) | 827 (~__c & (__vector unsigned int)__a)); 828 } 829 830 static inline __ATTRS_o_ai __vector float 831 vec_sel(__vector float __a, __vector float __b, __vector __bool int __c) { 832 __vector unsigned int __ac = (__vector unsigned int)__a; 833 __vector unsigned int __bc = (__vector unsigned int)__b; 834 __vector unsigned int __cc = (__vector unsigned int)__c; 835 return (__vector float)((__cc & __bc) | (~__cc & __ac)); 836 } 837 #endif 838 839 static inline __ATTRS_o_ai __vector double 840 vec_sel(__vector double __a, __vector double __b, 841 __vector unsigned long long __c) { 842 return (__vector double)((__c & (__vector unsigned long long)__b) | 843 (~__c & (__vector unsigned long long)__a)); 844 } 845 846 static inline __ATTRS_o_ai __vector double 847 vec_sel(__vector double __a, __vector double __b, 848 __vector __bool long long __c) { 849 __vector unsigned long long __ac = (__vector unsigned long long)__a; 850 __vector unsigned long long __bc = (__vector unsigned long long)__b; 851 __vector unsigned long long __cc = (__vector unsigned long long)__c; 852 return (__vector double)((__cc & __bc) | (~__cc & __ac)); 853 } 854 855 /*-- vec_gather_element -----------------------------------------------------*/ 856 857 static inline __ATTRS_o_ai __vector signed int 858 vec_gather_element(__vector signed int __vec, 859 __vector unsigned int __offset, 860 const signed int *__ptr, int __index) 861 __constant_range(__index, 0, 3) { 862 __vec[__index] = *(const signed int *)( 863 (const char *)__ptr + __offset[__index]); 864 return __vec; 865 } 866 867 static inline __ATTRS_o_ai __vector __bool int 868 vec_gather_element(__vector __bool int __vec, 869 __vector unsigned int __offset, 870 const unsigned int *__ptr, int __index) 871 __constant_range(__index, 0, 3) { 872 __vec[__index] = *(const unsigned int *)( 873 (const char *)__ptr + __offset[__index]); 874 return __vec; 875 } 876 877 static inline __ATTRS_o_ai __vector unsigned int 878 vec_gather_element(__vector unsigned int __vec, 879 __vector unsigned int __offset, 880 const unsigned int *__ptr, int __index) 881 __constant_range(__index, 0, 3) { 882 __vec[__index] = *(const unsigned int *)( 883 (const char *)__ptr + __offset[__index]); 884 return __vec; 885 } 886 887 static inline __ATTRS_o_ai __vector signed long long 888 vec_gather_element(__vector signed long long __vec, 889 __vector unsigned long long __offset, 890 const signed long long *__ptr, int __index) 891 __constant_range(__index, 0, 1) { 892 __vec[__index] = *(const signed long long *)( 893 (const char *)__ptr + __offset[__index]); 894 return __vec; 895 } 896 897 static inline __ATTRS_o_ai __vector __bool long long 898 vec_gather_element(__vector __bool long long __vec, 899 __vector unsigned long long __offset, 900 const unsigned long long *__ptr, int __index) 901 __constant_range(__index, 0, 1) { 902 __vec[__index] = *(const unsigned long long *)( 903 (const char *)__ptr + __offset[__index]); 904 return __vec; 905 } 906 907 static inline __ATTRS_o_ai __vector unsigned long long 908 vec_gather_element(__vector unsigned long long __vec, 909 __vector unsigned long long __offset, 910 const unsigned long long *__ptr, int __index) 911 __constant_range(__index, 0, 1) { 912 __vec[__index] = *(const unsigned long long *)( 913 (const char *)__ptr + __offset[__index]); 914 return __vec; 915 } 916 917 #if __ARCH__ >= 12 918 static inline __ATTRS_o_ai __vector float 919 vec_gather_element(__vector float __vec, 920 __vector unsigned int __offset, 921 const float *__ptr, int __index) 922 __constant_range(__index, 0, 3) { 923 __vec[__index] = *(const float *)( 924 (const char *)__ptr + __offset[__index]); 925 return __vec; 926 } 927 #endif 928 929 static inline __ATTRS_o_ai __vector double 930 vec_gather_element(__vector double __vec, 931 __vector unsigned long long __offset, 932 const double *__ptr, int __index) 933 __constant_range(__index, 0, 1) { 934 __vec[__index] = *(const double *)( 935 (const char *)__ptr + __offset[__index]); 936 return __vec; 937 } 938 939 /*-- vec_scatter_element ----------------------------------------------------*/ 940 941 static inline __ATTRS_o_ai void 942 vec_scatter_element(__vector signed int __vec, 943 __vector unsigned int __offset, 944 signed int *__ptr, int __index) 945 __constant_range(__index, 0, 3) { 946 *(signed int *)((char *)__ptr + __offset[__index]) = 947 __vec[__index]; 948 } 949 950 static inline __ATTRS_o_ai void 951 vec_scatter_element(__vector __bool int __vec, 952 __vector unsigned int __offset, 953 unsigned int *__ptr, int __index) 954 __constant_range(__index, 0, 3) { 955 *(unsigned int *)((char *)__ptr + __offset[__index]) = 956 __vec[__index]; 957 } 958 959 static inline __ATTRS_o_ai void 960 vec_scatter_element(__vector unsigned int __vec, 961 __vector unsigned int __offset, 962 unsigned int *__ptr, int __index) 963 __constant_range(__index, 0, 3) { 964 *(unsigned int *)((char *)__ptr + __offset[__index]) = 965 __vec[__index]; 966 } 967 968 static inline __ATTRS_o_ai void 969 vec_scatter_element(__vector signed long long __vec, 970 __vector unsigned long long __offset, 971 signed long long *__ptr, int __index) 972 __constant_range(__index, 0, 1) { 973 *(signed long long *)((char *)__ptr + __offset[__index]) = 974 __vec[__index]; 975 } 976 977 static inline __ATTRS_o_ai void 978 vec_scatter_element(__vector __bool long long __vec, 979 __vector unsigned long long __offset, 980 unsigned long long *__ptr, int __index) 981 __constant_range(__index, 0, 1) { 982 *(unsigned long long *)((char *)__ptr + __offset[__index]) = 983 __vec[__index]; 984 } 985 986 static inline __ATTRS_o_ai void 987 vec_scatter_element(__vector unsigned long long __vec, 988 __vector unsigned long long __offset, 989 unsigned long long *__ptr, int __index) 990 __constant_range(__index, 0, 1) { 991 *(unsigned long long *)((char *)__ptr + __offset[__index]) = 992 __vec[__index]; 993 } 994 995 #if __ARCH__ >= 12 996 static inline __ATTRS_o_ai void 997 vec_scatter_element(__vector float __vec, 998 __vector unsigned int __offset, 999 float *__ptr, int __index) 1000 __constant_range(__index, 0, 3) { 1001 *(float *)((char *)__ptr + __offset[__index]) = 1002 __vec[__index]; 1003 } 1004 #endif 1005 1006 static inline __ATTRS_o_ai void 1007 vec_scatter_element(__vector double __vec, 1008 __vector unsigned long long __offset, 1009 double *__ptr, int __index) 1010 __constant_range(__index, 0, 1) { 1011 *(double *)((char *)__ptr + __offset[__index]) = 1012 __vec[__index]; 1013 } 1014 1015 /*-- vec_xl -----------------------------------------------------------------*/ 1016 1017 static inline __ATTRS_o_ai __vector signed char 1018 vec_xl(long __offset, const signed char *__ptr) { 1019 return *(const __vector signed char *) 1020 ((const char *)__ptr + __offset); 1021 } 1022 1023 static inline __ATTRS_o_ai __vector unsigned char 1024 vec_xl(long __offset, const unsigned char *__ptr) { 1025 return *(const __vector unsigned char *) 1026 ((const char *)__ptr + __offset); 1027 } 1028 1029 static inline __ATTRS_o_ai __vector signed short 1030 vec_xl(long __offset, const signed short *__ptr) { 1031 return *(const __vector signed short *) 1032 ((const char *)__ptr + __offset); 1033 } 1034 1035 static inline __ATTRS_o_ai __vector unsigned short 1036 vec_xl(long __offset, const unsigned short *__ptr) { 1037 return *(const __vector unsigned short *) 1038 ((const char *)__ptr + __offset); 1039 } 1040 1041 static inline __ATTRS_o_ai __vector signed int 1042 vec_xl(long __offset, const signed int *__ptr) { 1043 return *(const __vector signed int *) 1044 ((const char *)__ptr + __offset); 1045 } 1046 1047 static inline __ATTRS_o_ai __vector unsigned int 1048 vec_xl(long __offset, const unsigned int *__ptr) { 1049 return *(const __vector unsigned int *) 1050 ((const char *)__ptr + __offset); 1051 } 1052 1053 static inline __ATTRS_o_ai __vector signed long long 1054 vec_xl(long __offset, const signed long long *__ptr) { 1055 return *(const __vector signed long long *) 1056 ((const char *)__ptr + __offset); 1057 } 1058 1059 static inline __ATTRS_o_ai __vector unsigned long long 1060 vec_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 1066 static inline __ATTRS_o_ai __vector float 1067 vec_xl(long __offset, const float *__ptr) { 1068 return *(const __vector float *) 1069 ((const char *)__ptr + __offset); 1070 } 1071 #endif 1072 1073 static inline __ATTRS_o_ai __vector double 1074 vec_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. 1082 static inline __ATTRS_o_ai __vector signed char 1083 vec_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. 1089 static inline __ATTRS_o_ai __vector unsigned char 1090 vec_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. 1096 static inline __ATTRS_o_ai __vector signed short 1097 vec_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. 1103 static inline __ATTRS_o_ai __vector unsigned short 1104 vec_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. 1110 static inline __ATTRS_o_ai __vector signed int 1111 vec_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. 1117 static inline __ATTRS_o_ai __vector unsigned int 1118 vec_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. 1124 static inline __ATTRS_o_ai __vector signed long long 1125 vec_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. 1131 static inline __ATTRS_o_ai __vector unsigned long long 1132 vec_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. 1138 static inline __ATTRS_o_ai __vector double 1139 vec_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. 1147 static inline __ATTRS_o_ai __vector signed char 1148 vec_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. 1154 static inline __ATTRS_o_ai __vector unsigned char 1155 vec_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. 1161 static inline __ATTRS_o_ai __vector signed short 1162 vec_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. 1168 static inline __ATTRS_o_ai __vector unsigned short 1169 vec_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. 1175 static inline __ATTRS_o_ai __vector signed int 1176 vec_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. 1182 static inline __ATTRS_o_ai __vector unsigned int 1183 vec_xlw4(long __offset, const unsigned int *__ptr) { 1184 return *(const __vector unsigned int *) 1185 ((const char *)__ptr + __offset); 1186 } 1187 1188 /*-- vec_xst ----------------------------------------------------------------*/ 1189 1190 static inline __ATTRS_o_ai void 1191 vec_xst(__vector signed char __vec, long __offset, signed char *__ptr) { 1192 *(__vector signed char *)((char *)__ptr + __offset) = __vec; 1193 } 1194 1195 static inline __ATTRS_o_ai void 1196 vec_xst(__vector unsigned char __vec, long __offset, unsigned char *__ptr) { 1197 *(__vector unsigned char *)((char *)__ptr + __offset) = __vec; 1198 } 1199 1200 static inline __ATTRS_o_ai void 1201 vec_xst(__vector signed short __vec, long __offset, signed short *__ptr) { 1202 *(__vector signed short *)((char *)__ptr + __offset) = __vec; 1203 } 1204 1205 static inline __ATTRS_o_ai void 1206 vec_xst(__vector unsigned short __vec, long __offset, unsigned short *__ptr) { 1207 *(__vector unsigned short *)((char *)__ptr + __offset) = __vec; 1208 } 1209 1210 static inline __ATTRS_o_ai void 1211 vec_xst(__vector signed int __vec, long __offset, signed int *__ptr) { 1212 *(__vector signed int *)((char *)__ptr + __offset) = __vec; 1213 } 1214 1215 static inline __ATTRS_o_ai void 1216 vec_xst(__vector unsigned int __vec, long __offset, unsigned int *__ptr) { 1217 *(__vector unsigned int *)((char *)__ptr + __offset) = __vec; 1218 } 1219 1220 static inline __ATTRS_o_ai void 1221 vec_xst(__vector signed long long __vec, long __offset, 1222 signed long long *__ptr) { 1223 *(__vector signed long long *)((char *)__ptr + __offset) = __vec; 1224 } 1225 1226 static inline __ATTRS_o_ai void 1227 vec_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 1233 static inline __ATTRS_o_ai void 1234 vec_xst(__vector float __vec, long __offset, float *__ptr) { 1235 *(__vector float *)((char *)__ptr + __offset) = __vec; 1236 } 1237 #endif 1238 1239 static inline __ATTRS_o_ai void 1240 vec_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. 1247 static inline __ATTRS_o_ai void 1248 vec_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. 1253 static inline __ATTRS_o_ai void 1254 vec_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. 1259 static inline __ATTRS_o_ai void 1260 vec_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. 1265 static inline __ATTRS_o_ai void 1266 vec_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. 1271 static inline __ATTRS_o_ai void 1272 vec_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. 1277 static inline __ATTRS_o_ai void 1278 vec_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. 1283 static inline __ATTRS_o_ai void 1284 vec_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. 1290 static inline __ATTRS_o_ai void 1291 vec_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. 1297 static inline __ATTRS_o_ai void 1298 vec_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. 1305 static inline __ATTRS_o_ai void 1306 vec_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. 1311 static inline __ATTRS_o_ai void 1312 vec_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. 1317 static inline __ATTRS_o_ai void 1318 vec_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. 1323 static inline __ATTRS_o_ai void 1324 vec_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. 1329 static inline __ATTRS_o_ai void 1330 vec_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. 1335 static inline __ATTRS_o_ai void 1336 vec_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 1342 extern __ATTRS_o __vector signed char 1343 vec_load_bndry(const signed char *__ptr, unsigned short __len) 1344 __constant_pow2_range(__len, 64, 4096); 1345 1346 extern __ATTRS_o __vector unsigned char 1347 vec_load_bndry(const unsigned char *__ptr, unsigned short __len) 1348 __constant_pow2_range(__len, 64, 4096); 1349 1350 extern __ATTRS_o __vector signed short 1351 vec_load_bndry(const signed short *__ptr, unsigned short __len) 1352 __constant_pow2_range(__len, 64, 4096); 1353 1354 extern __ATTRS_o __vector unsigned short 1355 vec_load_bndry(const unsigned short *__ptr, unsigned short __len) 1356 __constant_pow2_range(__len, 64, 4096); 1357 1358 extern __ATTRS_o __vector signed int 1359 vec_load_bndry(const signed int *__ptr, unsigned short __len) 1360 __constant_pow2_range(__len, 64, 4096); 1361 1362 extern __ATTRS_o __vector unsigned int 1363 vec_load_bndry(const unsigned int *__ptr, unsigned short __len) 1364 __constant_pow2_range(__len, 64, 4096); 1365 1366 extern __ATTRS_o __vector signed long long 1367 vec_load_bndry(const signed long long *__ptr, unsigned short __len) 1368 __constant_pow2_range(__len, 64, 4096); 1369 1370 extern __ATTRS_o __vector unsigned long long 1371 vec_load_bndry(const unsigned long long *__ptr, unsigned short __len) 1372 __constant_pow2_range(__len, 64, 4096); 1373 1374 #if __ARCH__ >= 12 1375 extern __ATTRS_o __vector float 1376 vec_load_bndry(const float *__ptr, unsigned short __len) 1377 __constant_pow2_range(__len, 64, 4096); 1378 #endif 1379 1380 extern __ATTRS_o __vector double 1381 vec_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 1395 static inline __ATTRS_o_ai __vector signed char 1396 vec_load_len(const signed char *__ptr, unsigned int __len) { 1397 return (__vector signed char)__builtin_s390_vll(__len, __ptr); 1398 } 1399 1400 static inline __ATTRS_o_ai __vector unsigned char 1401 vec_load_len(const unsigned char *__ptr, unsigned int __len) { 1402 return (__vector unsigned char)__builtin_s390_vll(__len, __ptr); 1403 } 1404 1405 static inline __ATTRS_o_ai __vector signed short 1406 vec_load_len(const signed short *__ptr, unsigned int __len) { 1407 return (__vector signed short)__builtin_s390_vll(__len, __ptr); 1408 } 1409 1410 static inline __ATTRS_o_ai __vector unsigned short 1411 vec_load_len(const unsigned short *__ptr, unsigned int __len) { 1412 return (__vector unsigned short)__builtin_s390_vll(__len, __ptr); 1413 } 1414 1415 static inline __ATTRS_o_ai __vector signed int 1416 vec_load_len(const signed int *__ptr, unsigned int __len) { 1417 return (__vector signed int)__builtin_s390_vll(__len, __ptr); 1418 } 1419 1420 static inline __ATTRS_o_ai __vector unsigned int 1421 vec_load_len(const unsigned int *__ptr, unsigned int __len) { 1422 return (__vector unsigned int)__builtin_s390_vll(__len, __ptr); 1423 } 1424 1425 static inline __ATTRS_o_ai __vector signed long long 1426 vec_load_len(const signed long long *__ptr, unsigned int __len) { 1427 return (__vector signed long long)__builtin_s390_vll(__len, __ptr); 1428 } 1429 1430 static inline __ATTRS_o_ai __vector unsigned long long 1431 vec_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 1436 static inline __ATTRS_o_ai __vector float 1437 vec_load_len(const float *__ptr, unsigned int __len) { 1438 return (__vector float)__builtin_s390_vll(__len, __ptr); 1439 } 1440 #endif 1441 1442 static inline __ATTRS_o_ai __vector double 1443 vec_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 1450 static inline __ATTRS_ai __vector unsigned char 1451 vec_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 1458 static inline __ATTRS_o_ai void 1459 vec_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 1464 static inline __ATTRS_o_ai void 1465 vec_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 1470 static inline __ATTRS_o_ai void 1471 vec_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 1476 static inline __ATTRS_o_ai void 1477 vec_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 1482 static inline __ATTRS_o_ai void 1483 vec_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 1488 static inline __ATTRS_o_ai void 1489 vec_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 1494 static inline __ATTRS_o_ai void 1495 vec_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 1500 static inline __ATTRS_o_ai void 1501 vec_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 1507 static inline __ATTRS_o_ai void 1508 vec_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 1514 static inline __ATTRS_o_ai void 1515 vec_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 1523 static inline __ATTRS_ai void 1524 vec_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 1532 static inline __ATTRS_o_ai __vector signed long long 1533 vec_load_pair(signed long long __a, signed long long __b) { 1534 return (__vector signed long long)(__a, __b); 1535 } 1536 1537 static inline __ATTRS_o_ai __vector unsigned long long 1538 vec_load_pair(unsigned long long __a, unsigned long long __b) { 1539 return (__vector unsigned long long)(__a, __b); 1540 } 1541 1542 /*-- vec_genmask ------------------------------------------------------------*/ 1543 1544 static inline __ATTRS_o_ai __vector unsigned char 1545 vec_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 1568 static inline __ATTRS_o_ai __vector unsigned char 1569 vec_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 1581 static inline __ATTRS_o_ai __vector unsigned short 1582 vec_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 1594 static inline __ATTRS_o_ai __vector unsigned int 1595 vec_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 1607 static inline __ATTRS_o_ai __vector unsigned long long 1608 vec_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 1622 static inline __ATTRS_o_ai __vector signed char 1623 vec_splat(__vector signed char __vec, int __index) 1624 __constant_range(__index, 0, 15) { 1625 return (__vector signed char)__vec[__index]; 1626 } 1627 1628 static inline __ATTRS_o_ai __vector __bool char 1629 vec_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 1634 static inline __ATTRS_o_ai __vector unsigned char 1635 vec_splat(__vector unsigned char __vec, int __index) 1636 __constant_range(__index, 0, 15) { 1637 return (__vector unsigned char)__vec[__index]; 1638 } 1639 1640 static inline __ATTRS_o_ai __vector signed short 1641 vec_splat(__vector signed short __vec, int __index) 1642 __constant_range(__index, 0, 7) { 1643 return (__vector signed short)__vec[__index]; 1644 } 1645 1646 static inline __ATTRS_o_ai __vector __bool short 1647 vec_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 1652 static inline __ATTRS_o_ai __vector unsigned short 1653 vec_splat(__vector unsigned short __vec, int __index) 1654 __constant_range(__index, 0, 7) { 1655 return (__vector unsigned short)__vec[__index]; 1656 } 1657 1658 static inline __ATTRS_o_ai __vector signed int 1659 vec_splat(__vector signed int __vec, int __index) 1660 __constant_range(__index, 0, 3) { 1661 return (__vector signed int)__vec[__index]; 1662 } 1663 1664 static inline __ATTRS_o_ai __vector __bool int 1665 vec_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 1670 static inline __ATTRS_o_ai __vector unsigned int 1671 vec_splat(__vector unsigned int __vec, int __index) 1672 __constant_range(__index, 0, 3) { 1673 return (__vector unsigned int)__vec[__index]; 1674 } 1675 1676 static inline __ATTRS_o_ai __vector signed long long 1677 vec_splat(__vector signed long long __vec, int __index) 1678 __constant_range(__index, 0, 1) { 1679 return (__vector signed long long)__vec[__index]; 1680 } 1681 1682 static inline __ATTRS_o_ai __vector __bool long long 1683 vec_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 1689 static inline __ATTRS_o_ai __vector unsigned long long 1690 vec_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 1696 static inline __ATTRS_o_ai __vector float 1697 vec_splat(__vector float __vec, int __index) 1698 __constant_range(__index, 0, 3) { 1699 return (__vector float)__vec[__index]; 1700 } 1701 #endif 1702 1703 static inline __ATTRS_o_ai __vector double 1704 vec_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 1711 static inline __ATTRS_ai __vector signed char 1712 vec_splat_s8(signed char __scalar) 1713 __constant(__scalar) { 1714 return (__vector signed char)__scalar; 1715 } 1716 1717 static inline __ATTRS_ai __vector signed short 1718 vec_splat_s16(signed short __scalar) 1719 __constant(__scalar) { 1720 return (__vector signed short)__scalar; 1721 } 1722 1723 static inline __ATTRS_ai __vector signed int 1724 vec_splat_s32(signed short __scalar) 1725 __constant(__scalar) { 1726 return (__vector signed int)(signed int)__scalar; 1727 } 1728 1729 static inline __ATTRS_ai __vector signed long long 1730 vec_splat_s64(signed short __scalar) 1731 __constant(__scalar) { 1732 return (__vector signed long long)(signed long)__scalar; 1733 } 1734 1735 /*-- vec_splat_u* -----------------------------------------------------------*/ 1736 1737 static inline __ATTRS_ai __vector unsigned char 1738 vec_splat_u8(unsigned char __scalar) 1739 __constant(__scalar) { 1740 return (__vector unsigned char)__scalar; 1741 } 1742 1743 static inline __ATTRS_ai __vector unsigned short 1744 vec_splat_u16(unsigned short __scalar) 1745 __constant(__scalar) { 1746 return (__vector unsigned short)__scalar; 1747 } 1748 1749 static inline __ATTRS_ai __vector unsigned int 1750 vec_splat_u32(signed short __scalar) 1751 __constant(__scalar) { 1752 return (__vector unsigned int)(signed int)__scalar; 1753 } 1754 1755 static inline __ATTRS_ai __vector unsigned long long 1756 vec_splat_u64(signed short __scalar) 1757 __constant(__scalar) { 1758 return (__vector unsigned long long)(signed long long)__scalar; 1759 } 1760 1761 /*-- vec_splats -------------------------------------------------------------*/ 1762 1763 static inline __ATTRS_o_ai __vector signed char 1764 vec_splats(signed char __scalar) { 1765 return (__vector signed char)__scalar; 1766 } 1767 1768 static inline __ATTRS_o_ai __vector unsigned char 1769 vec_splats(unsigned char __scalar) { 1770 return (__vector unsigned char)__scalar; 1771 } 1772 1773 static inline __ATTRS_o_ai __vector signed short 1774 vec_splats(signed short __scalar) { 1775 return (__vector signed short)__scalar; 1776 } 1777 1778 static inline __ATTRS_o_ai __vector unsigned short 1779 vec_splats(unsigned short __scalar) { 1780 return (__vector unsigned short)__scalar; 1781 } 1782 1783 static inline __ATTRS_o_ai __vector signed int 1784 vec_splats(signed int __scalar) { 1785 return (__vector signed int)__scalar; 1786 } 1787 1788 static inline __ATTRS_o_ai __vector unsigned int 1789 vec_splats(unsigned int __scalar) { 1790 return (__vector unsigned int)__scalar; 1791 } 1792 1793 static inline __ATTRS_o_ai __vector signed long long 1794 vec_splats(signed long long __scalar) { 1795 return (__vector signed long long)__scalar; 1796 } 1797 1798 static inline __ATTRS_o_ai __vector unsigned long long 1799 vec_splats(unsigned long long __scalar) { 1800 return (__vector unsigned long long)__scalar; 1801 } 1802 1803 #if __ARCH__ >= 12 1804 static inline __ATTRS_o_ai __vector float 1805 vec_splats(float __scalar) { 1806 return (__vector float)__scalar; 1807 } 1808 #endif 1809 1810 static inline __ATTRS_o_ai __vector double 1811 vec_splats(double __scalar) { 1812 return (__vector double)__scalar; 1813 } 1814 1815 /*-- vec_extend_s64 ---------------------------------------------------------*/ 1816 1817 static inline __ATTRS_o_ai __vector signed long long 1818 vec_extend_s64(__vector signed char __a) { 1819 return (__vector signed long long)(__a[7], __a[15]); 1820 } 1821 1822 static inline __ATTRS_o_ai __vector signed long long 1823 vec_extend_s64(__vector signed short __a) { 1824 return (__vector signed long long)(__a[3], __a[7]); 1825 } 1826 1827 static inline __ATTRS_o_ai __vector signed long long 1828 vec_extend_s64(__vector signed int __a) { 1829 return (__vector signed long long)(__a[1], __a[3]); 1830 } 1831 1832 /*-- vec_mergeh -------------------------------------------------------------*/ 1833 1834 static inline __ATTRS_o_ai __vector signed char 1835 vec_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 1841 static inline __ATTRS_o_ai __vector __bool char 1842 vec_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 1848 static inline __ATTRS_o_ai __vector unsigned char 1849 vec_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 1855 static inline __ATTRS_o_ai __vector signed short 1856 vec_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 1861 static inline __ATTRS_o_ai __vector __bool short 1862 vec_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 1867 static inline __ATTRS_o_ai __vector unsigned short 1868 vec_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 1873 static inline __ATTRS_o_ai __vector signed int 1874 vec_mergeh(__vector signed int __a, __vector signed int __b) { 1875 return (__vector signed int)(__a[0], __b[0], __a[1], __b[1]); 1876 } 1877 1878 static inline __ATTRS_o_ai __vector __bool int 1879 vec_mergeh(__vector __bool int __a, __vector __bool int __b) { 1880 return (__vector __bool int)(__a[0], __b[0], __a[1], __b[1]); 1881 } 1882 1883 static inline __ATTRS_o_ai __vector unsigned int 1884 vec_mergeh(__vector unsigned int __a, __vector unsigned int __b) { 1885 return (__vector unsigned int)(__a[0], __b[0], __a[1], __b[1]); 1886 } 1887 1888 static inline __ATTRS_o_ai __vector signed long long 1889 vec_mergeh(__vector signed long long __a, __vector signed long long __b) { 1890 return (__vector signed long long)(__a[0], __b[0]); 1891 } 1892 1893 static inline __ATTRS_o_ai __vector __bool long long 1894 vec_mergeh(__vector __bool long long __a, __vector __bool long long __b) { 1895 return (__vector __bool long long)(__a[0], __b[0]); 1896 } 1897 1898 static inline __ATTRS_o_ai __vector unsigned long long 1899 vec_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 1904 static inline __ATTRS_o_ai __vector float 1905 vec_mergeh(__vector float __a, __vector float __b) { 1906 return (__vector float)(__a[0], __b[0], __a[1], __b[1]); 1907 } 1908 #endif 1909 1910 static inline __ATTRS_o_ai __vector double 1911 vec_mergeh(__vector double __a, __vector double __b) { 1912 return (__vector double)(__a[0], __b[0]); 1913 } 1914 1915 /*-- vec_mergel -------------------------------------------------------------*/ 1916 1917 static inline __ATTRS_o_ai __vector signed char 1918 vec_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 1924 static inline __ATTRS_o_ai __vector __bool char 1925 vec_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 1931 static inline __ATTRS_o_ai __vector unsigned char 1932 vec_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 1938 static inline __ATTRS_o_ai __vector signed short 1939 vec_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 1944 static inline __ATTRS_o_ai __vector __bool short 1945 vec_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 1950 static inline __ATTRS_o_ai __vector unsigned short 1951 vec_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 1956 static inline __ATTRS_o_ai __vector signed int 1957 vec_mergel(__vector signed int __a, __vector signed int __b) { 1958 return (__vector signed int)(__a[2], __b[2], __a[3], __b[3]); 1959 } 1960 1961 static inline __ATTRS_o_ai __vector __bool int 1962 vec_mergel(__vector __bool int __a, __vector __bool int __b) { 1963 return (__vector __bool int)(__a[2], __b[2], __a[3], __b[3]); 1964 } 1965 1966 static inline __ATTRS_o_ai __vector unsigned int 1967 vec_mergel(__vector unsigned int __a, __vector unsigned int __b) { 1968 return (__vector unsigned int)(__a[2], __b[2], __a[3], __b[3]); 1969 } 1970 1971 static inline __ATTRS_o_ai __vector signed long long 1972 vec_mergel(__vector signed long long __a, __vector signed long long __b) { 1973 return (__vector signed long long)(__a[1], __b[1]); 1974 } 1975 1976 static inline __ATTRS_o_ai __vector __bool long long 1977 vec_mergel(__vector __bool long long __a, __vector __bool long long __b) { 1978 return (__vector __bool long long)(__a[1], __b[1]); 1979 } 1980 1981 static inline __ATTRS_o_ai __vector unsigned long long 1982 vec_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 1987 static inline __ATTRS_o_ai __vector float 1988 vec_mergel(__vector float __a, __vector float __b) { 1989 return (__vector float)(__a[2], __b[2], __a[3], __b[3]); 1990 } 1991 #endif 1992 1993 static inline __ATTRS_o_ai __vector double 1994 vec_mergel(__vector double __a, __vector double __b) { 1995 return (__vector double)(__a[1], __b[1]); 1996 } 1997 1998 /*-- vec_pack ---------------------------------------------------------------*/ 1999 2000 static inline __ATTRS_o_ai __vector signed char 2001 vec_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 2009 static inline __ATTRS_o_ai __vector __bool char 2010 vec_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 2018 static inline __ATTRS_o_ai __vector unsigned char 2019 vec_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 2027 static inline __ATTRS_o_ai __vector signed short 2028 vec_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 2036 static inline __ATTRS_o_ai __vector __bool short 2037 vec_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 2045 static inline __ATTRS_o_ai __vector unsigned short 2046 vec_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 2054 static inline __ATTRS_o_ai __vector signed int 2055 vec_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 2061 static inline __ATTRS_o_ai __vector __bool int 2062 vec_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 2068 static inline __ATTRS_o_ai __vector unsigned int 2069 vec_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 2077 static inline __ATTRS_o_ai __vector signed char 2078 vec_packs(__vector signed short __a, __vector signed short __b) { 2079 return __builtin_s390_vpksh(__a, __b); 2080 } 2081 2082 static inline __ATTRS_o_ai __vector unsigned char 2083 vec_packs(__vector unsigned short __a, __vector unsigned short __b) { 2084 return __builtin_s390_vpklsh(__a, __b); 2085 } 2086 2087 static inline __ATTRS_o_ai __vector signed short 2088 vec_packs(__vector signed int __a, __vector signed int __b) { 2089 return __builtin_s390_vpksf(__a, __b); 2090 } 2091 2092 static inline __ATTRS_o_ai __vector unsigned short 2093 vec_packs(__vector unsigned int __a, __vector unsigned int __b) { 2094 return __builtin_s390_vpklsf(__a, __b); 2095 } 2096 2097 static inline __ATTRS_o_ai __vector signed int 2098 vec_packs(__vector signed long long __a, __vector signed long long __b) { 2099 return __builtin_s390_vpksg(__a, __b); 2100 } 2101 2102 static inline __ATTRS_o_ai __vector unsigned int 2103 vec_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 2109 static inline __ATTRS_o_ai __vector signed char 2110 vec_packs_cc(__vector signed short __a, __vector signed short __b, int *__cc) { 2111 return __builtin_s390_vpkshs(__a, __b, __cc); 2112 } 2113 2114 static inline __ATTRS_o_ai __vector unsigned char 2115 vec_packs_cc(__vector unsigned short __a, __vector unsigned short __b, 2116 int *__cc) { 2117 return __builtin_s390_vpklshs(__a, __b, __cc); 2118 } 2119 2120 static inline __ATTRS_o_ai __vector signed short 2121 vec_packs_cc(__vector signed int __a, __vector signed int __b, int *__cc) { 2122 return __builtin_s390_vpksfs(__a, __b, __cc); 2123 } 2124 2125 static inline __ATTRS_o_ai __vector unsigned short 2126 vec_packs_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { 2127 return __builtin_s390_vpklsfs(__a, __b, __cc); 2128 } 2129 2130 static inline __ATTRS_o_ai __vector signed int 2131 vec_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 2136 static inline __ATTRS_o_ai __vector unsigned int 2137 vec_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 2144 static inline __ATTRS_o_ai __vector unsigned char 2145 vec_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 2152 static inline __ATTRS_o_ai __vector unsigned char 2153 vec_packsu(__vector unsigned short __a, __vector unsigned short __b) { 2154 return __builtin_s390_vpklsh(__a, __b); 2155 } 2156 2157 static inline __ATTRS_o_ai __vector unsigned short 2158 vec_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 2165 static inline __ATTRS_o_ai __vector unsigned short 2166 vec_packsu(__vector unsigned int __a, __vector unsigned int __b) { 2167 return __builtin_s390_vpklsf(__a, __b); 2168 } 2169 2170 static inline __ATTRS_o_ai __vector unsigned int 2171 vec_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 2180 static inline __ATTRS_o_ai __vector unsigned int 2181 vec_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 2187 static inline __ATTRS_o_ai __vector unsigned char 2188 vec_packsu_cc(__vector unsigned short __a, __vector unsigned short __b, 2189 int *__cc) { 2190 return __builtin_s390_vpklshs(__a, __b, __cc); 2191 } 2192 2193 static inline __ATTRS_o_ai __vector unsigned short 2194 vec_packsu_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { 2195 return __builtin_s390_vpklsfs(__a, __b, __cc); 2196 } 2197 2198 static inline __ATTRS_o_ai __vector unsigned int 2199 vec_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 2206 static inline __ATTRS_o_ai __vector signed short 2207 vec_unpackh(__vector signed char __a) { 2208 return __builtin_s390_vuphb(__a); 2209 } 2210 2211 static inline __ATTRS_o_ai __vector __bool short 2212 vec_unpackh(__vector __bool char __a) { 2213 return ((__vector __bool short) 2214 __builtin_s390_vuphb((__vector signed char)__a)); 2215 } 2216 2217 static inline __ATTRS_o_ai __vector unsigned short 2218 vec_unpackh(__vector unsigned char __a) { 2219 return __builtin_s390_vuplhb(__a); 2220 } 2221 2222 static inline __ATTRS_o_ai __vector signed int 2223 vec_unpackh(__vector signed short __a) { 2224 return __builtin_s390_vuphh(__a); 2225 } 2226 2227 static inline __ATTRS_o_ai __vector __bool int 2228 vec_unpackh(__vector __bool short __a) { 2229 return (__vector __bool int)__builtin_s390_vuphh((__vector signed short)__a); 2230 } 2231 2232 static inline __ATTRS_o_ai __vector unsigned int 2233 vec_unpackh(__vector unsigned short __a) { 2234 return __builtin_s390_vuplhh(__a); 2235 } 2236 2237 static inline __ATTRS_o_ai __vector signed long long 2238 vec_unpackh(__vector signed int __a) { 2239 return __builtin_s390_vuphf(__a); 2240 } 2241 2242 static inline __ATTRS_o_ai __vector __bool long long 2243 vec_unpackh(__vector __bool int __a) { 2244 return ((__vector __bool long long) 2245 __builtin_s390_vuphf((__vector signed int)__a)); 2246 } 2247 2248 static inline __ATTRS_o_ai __vector unsigned long long 2249 vec_unpackh(__vector unsigned int __a) { 2250 return __builtin_s390_vuplhf(__a); 2251 } 2252 2253 /*-- vec_unpackl ------------------------------------------------------------*/ 2254 2255 static inline __ATTRS_o_ai __vector signed short 2256 vec_unpackl(__vector signed char __a) { 2257 return __builtin_s390_vuplb(__a); 2258 } 2259 2260 static inline __ATTRS_o_ai __vector __bool short 2261 vec_unpackl(__vector __bool char __a) { 2262 return ((__vector __bool short) 2263 __builtin_s390_vuplb((__vector signed char)__a)); 2264 } 2265 2266 static inline __ATTRS_o_ai __vector unsigned short 2267 vec_unpackl(__vector unsigned char __a) { 2268 return __builtin_s390_vupllb(__a); 2269 } 2270 2271 static inline __ATTRS_o_ai __vector signed int 2272 vec_unpackl(__vector signed short __a) { 2273 return __builtin_s390_vuplhw(__a); 2274 } 2275 2276 static inline __ATTRS_o_ai __vector __bool int 2277 vec_unpackl(__vector __bool short __a) { 2278 return ((__vector __bool int) 2279 __builtin_s390_vuplhw((__vector signed short)__a)); 2280 } 2281 2282 static inline __ATTRS_o_ai __vector unsigned int 2283 vec_unpackl(__vector unsigned short __a) { 2284 return __builtin_s390_vupllh(__a); 2285 } 2286 2287 static inline __ATTRS_o_ai __vector signed long long 2288 vec_unpackl(__vector signed int __a) { 2289 return __builtin_s390_vuplf(__a); 2290 } 2291 2292 static inline __ATTRS_o_ai __vector __bool long long 2293 vec_unpackl(__vector __bool int __a) { 2294 return ((__vector __bool long long) 2295 __builtin_s390_vuplf((__vector signed int)__a)); 2296 } 2297 2298 static inline __ATTRS_o_ai __vector unsigned long long 2299 vec_unpackl(__vector unsigned int __a) { 2300 return __builtin_s390_vupllf(__a); 2301 } 2302 2303 /*-- vec_cmpeq --------------------------------------------------------------*/ 2304 2305 static inline __ATTRS_o_ai __vector __bool char 2306 vec_cmpeq(__vector __bool char __a, __vector __bool char __b) { 2307 return (__vector __bool char)(__a == __b); 2308 } 2309 2310 static inline __ATTRS_o_ai __vector __bool char 2311 vec_cmpeq(__vector signed char __a, __vector signed char __b) { 2312 return (__vector __bool char)(__a == __b); 2313 } 2314 2315 static inline __ATTRS_o_ai __vector __bool char 2316 vec_cmpeq(__vector unsigned char __a, __vector unsigned char __b) { 2317 return (__vector __bool char)(__a == __b); 2318 } 2319 2320 static inline __ATTRS_o_ai __vector __bool short 2321 vec_cmpeq(__vector __bool short __a, __vector __bool short __b) { 2322 return (__vector __bool short)(__a == __b); 2323 } 2324 2325 static inline __ATTRS_o_ai __vector __bool short 2326 vec_cmpeq(__vector signed short __a, __vector signed short __b) { 2327 return (__vector __bool short)(__a == __b); 2328 } 2329 2330 static inline __ATTRS_o_ai __vector __bool short 2331 vec_cmpeq(__vector unsigned short __a, __vector unsigned short __b) { 2332 return (__vector __bool short)(__a == __b); 2333 } 2334 2335 static inline __ATTRS_o_ai __vector __bool int 2336 vec_cmpeq(__vector __bool int __a, __vector __bool int __b) { 2337 return (__vector __bool int)(__a == __b); 2338 } 2339 2340 static inline __ATTRS_o_ai __vector __bool int 2341 vec_cmpeq(__vector signed int __a, __vector signed int __b) { 2342 return (__vector __bool int)(__a == __b); 2343 } 2344 2345 static inline __ATTRS_o_ai __vector __bool int 2346 vec_cmpeq(__vector unsigned int __a, __vector unsigned int __b) { 2347 return (__vector __bool int)(__a == __b); 2348 } 2349 2350 static inline __ATTRS_o_ai __vector __bool long long 2351 vec_cmpeq(__vector __bool long long __a, __vector __bool long long __b) { 2352 return (__vector __bool long long)(__a == __b); 2353 } 2354 2355 static inline __ATTRS_o_ai __vector __bool long long 2356 vec_cmpeq(__vector signed long long __a, __vector signed long long __b) { 2357 return (__vector __bool long long)(__a == __b); 2358 } 2359 2360 static inline __ATTRS_o_ai __vector __bool long long 2361 vec_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 2366 static inline __ATTRS_o_ai __vector __bool int 2367 vec_cmpeq(__vector float __a, __vector float __b) { 2368 return (__vector __bool int)(__a == __b); 2369 } 2370 #endif 2371 2372 static inline __ATTRS_o_ai __vector __bool long long 2373 vec_cmpeq(__vector double __a, __vector double __b) { 2374 return (__vector __bool long long)(__a == __b); 2375 } 2376 2377 /*-- vec_cmpge --------------------------------------------------------------*/ 2378 2379 static inline __ATTRS_o_ai __vector __bool char 2380 vec_cmpge(__vector signed char __a, __vector signed char __b) { 2381 return (__vector __bool char)(__a >= __b); 2382 } 2383 2384 static inline __ATTRS_o_ai __vector __bool char 2385 vec_cmpge(__vector unsigned char __a, __vector unsigned char __b) { 2386 return (__vector __bool char)(__a >= __b); 2387 } 2388 2389 static inline __ATTRS_o_ai __vector __bool short 2390 vec_cmpge(__vector signed short __a, __vector signed short __b) { 2391 return (__vector __bool short)(__a >= __b); 2392 } 2393 2394 static inline __ATTRS_o_ai __vector __bool short 2395 vec_cmpge(__vector unsigned short __a, __vector unsigned short __b) { 2396 return (__vector __bool short)(__a >= __b); 2397 } 2398 2399 static inline __ATTRS_o_ai __vector __bool int 2400 vec_cmpge(__vector signed int __a, __vector signed int __b) { 2401 return (__vector __bool int)(__a >= __b); 2402 } 2403 2404 static inline __ATTRS_o_ai __vector __bool int 2405 vec_cmpge(__vector unsigned int __a, __vector unsigned int __b) { 2406 return (__vector __bool int)(__a >= __b); 2407 } 2408 2409 static inline __ATTRS_o_ai __vector __bool long long 2410 vec_cmpge(__vector signed long long __a, __vector signed long long __b) { 2411 return (__vector __bool long long)(__a >= __b); 2412 } 2413 2414 static inline __ATTRS_o_ai __vector __bool long long 2415 vec_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 2420 static inline __ATTRS_o_ai __vector __bool int 2421 vec_cmpge(__vector float __a, __vector float __b) { 2422 return (__vector __bool int)(__a >= __b); 2423 } 2424 #endif 2425 2426 static inline __ATTRS_o_ai __vector __bool long long 2427 vec_cmpge(__vector double __a, __vector double __b) { 2428 return (__vector __bool long long)(__a >= __b); 2429 } 2430 2431 /*-- vec_cmpgt --------------------------------------------------------------*/ 2432 2433 static inline __ATTRS_o_ai __vector __bool char 2434 vec_cmpgt(__vector signed char __a, __vector signed char __b) { 2435 return (__vector __bool char)(__a > __b); 2436 } 2437 2438 static inline __ATTRS_o_ai __vector __bool char 2439 vec_cmpgt(__vector unsigned char __a, __vector unsigned char __b) { 2440 return (__vector __bool char)(__a > __b); 2441 } 2442 2443 static inline __ATTRS_o_ai __vector __bool short 2444 vec_cmpgt(__vector signed short __a, __vector signed short __b) { 2445 return (__vector __bool short)(__a > __b); 2446 } 2447 2448 static inline __ATTRS_o_ai __vector __bool short 2449 vec_cmpgt(__vector unsigned short __a, __vector unsigned short __b) { 2450 return (__vector __bool short)(__a > __b); 2451 } 2452 2453 static inline __ATTRS_o_ai __vector __bool int 2454 vec_cmpgt(__vector signed int __a, __vector signed int __b) { 2455 return (__vector __bool int)(__a > __b); 2456 } 2457 2458 static inline __ATTRS_o_ai __vector __bool int 2459 vec_cmpgt(__vector unsigned int __a, __vector unsigned int __b) { 2460 return (__vector __bool int)(__a > __b); 2461 } 2462 2463 static inline __ATTRS_o_ai __vector __bool long long 2464 vec_cmpgt(__vector signed long long __a, __vector signed long long __b) { 2465 return (__vector __bool long long)(__a > __b); 2466 } 2467 2468 static inline __ATTRS_o_ai __vector __bool long long 2469 vec_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 2474 static inline __ATTRS_o_ai __vector __bool int 2475 vec_cmpgt(__vector float __a, __vector float __b) { 2476 return (__vector __bool int)(__a > __b); 2477 } 2478 #endif 2479 2480 static inline __ATTRS_o_ai __vector __bool long long 2481 vec_cmpgt(__vector double __a, __vector double __b) { 2482 return (__vector __bool long long)(__a > __b); 2483 } 2484 2485 /*-- vec_cmple --------------------------------------------------------------*/ 2486 2487 static inline __ATTRS_o_ai __vector __bool char 2488 vec_cmple(__vector signed char __a, __vector signed char __b) { 2489 return (__vector __bool char)(__a <= __b); 2490 } 2491 2492 static inline __ATTRS_o_ai __vector __bool char 2493 vec_cmple(__vector unsigned char __a, __vector unsigned char __b) { 2494 return (__vector __bool char)(__a <= __b); 2495 } 2496 2497 static inline __ATTRS_o_ai __vector __bool short 2498 vec_cmple(__vector signed short __a, __vector signed short __b) { 2499 return (__vector __bool short)(__a <= __b); 2500 } 2501 2502 static inline __ATTRS_o_ai __vector __bool short 2503 vec_cmple(__vector unsigned short __a, __vector unsigned short __b) { 2504 return (__vector __bool short)(__a <= __b); 2505 } 2506 2507 static inline __ATTRS_o_ai __vector __bool int 2508 vec_cmple(__vector signed int __a, __vector signed int __b) { 2509 return (__vector __bool int)(__a <= __b); 2510 } 2511 2512 static inline __ATTRS_o_ai __vector __bool int 2513 vec_cmple(__vector unsigned int __a, __vector unsigned int __b) { 2514 return (__vector __bool int)(__a <= __b); 2515 } 2516 2517 static inline __ATTRS_o_ai __vector __bool long long 2518 vec_cmple(__vector signed long long __a, __vector signed long long __b) { 2519 return (__vector __bool long long)(__a <= __b); 2520 } 2521 2522 static inline __ATTRS_o_ai __vector __bool long long 2523 vec_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 2528 static inline __ATTRS_o_ai __vector __bool int 2529 vec_cmple(__vector float __a, __vector float __b) { 2530 return (__vector __bool int)(__a <= __b); 2531 } 2532 #endif 2533 2534 static inline __ATTRS_o_ai __vector __bool long long 2535 vec_cmple(__vector double __a, __vector double __b) { 2536 return (__vector __bool long long)(__a <= __b); 2537 } 2538 2539 /*-- vec_cmplt --------------------------------------------------------------*/ 2540 2541 static inline __ATTRS_o_ai __vector __bool char 2542 vec_cmplt(__vector signed char __a, __vector signed char __b) { 2543 return (__vector __bool char)(__a < __b); 2544 } 2545 2546 static inline __ATTRS_o_ai __vector __bool char 2547 vec_cmplt(__vector unsigned char __a, __vector unsigned char __b) { 2548 return (__vector __bool char)(__a < __b); 2549 } 2550 2551 static inline __ATTRS_o_ai __vector __bool short 2552 vec_cmplt(__vector signed short __a, __vector signed short __b) { 2553 return (__vector __bool short)(__a < __b); 2554 } 2555 2556 static inline __ATTRS_o_ai __vector __bool short 2557 vec_cmplt(__vector unsigned short __a, __vector unsigned short __b) { 2558 return (__vector __bool short)(__a < __b); 2559 } 2560 2561 static inline __ATTRS_o_ai __vector __bool int 2562 vec_cmplt(__vector signed int __a, __vector signed int __b) { 2563 return (__vector __bool int)(__a < __b); 2564 } 2565 2566 static inline __ATTRS_o_ai __vector __bool int 2567 vec_cmplt(__vector unsigned int __a, __vector unsigned int __b) { 2568 return (__vector __bool int)(__a < __b); 2569 } 2570 2571 static inline __ATTRS_o_ai __vector __bool long long 2572 vec_cmplt(__vector signed long long __a, __vector signed long long __b) { 2573 return (__vector __bool long long)(__a < __b); 2574 } 2575 2576 static inline __ATTRS_o_ai __vector __bool long long 2577 vec_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 2582 static inline __ATTRS_o_ai __vector __bool int 2583 vec_cmplt(__vector float __a, __vector float __b) { 2584 return (__vector __bool int)(__a < __b); 2585 } 2586 #endif 2587 2588 static inline __ATTRS_o_ai __vector __bool long long 2589 vec_cmplt(__vector double __a, __vector double __b) { 2590 return (__vector __bool long long)(__a < __b); 2591 } 2592 2593 /*-- vec_all_eq -------------------------------------------------------------*/ 2594 2595 static inline __ATTRS_o_ai int 2596 vec_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. 2603 static inline __ATTRS_o_ai int 2604 vec_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. 2611 static inline __ATTRS_o_ai int 2612 vec_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 2618 static inline __ATTRS_o_ai int 2619 vec_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. 2627 static inline __ATTRS_o_ai int 2628 vec_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. 2636 static inline __ATTRS_o_ai int 2637 vec_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 2644 static inline __ATTRS_o_ai int 2645 vec_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 2652 static inline __ATTRS_o_ai int 2653 vec_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. 2660 static inline __ATTRS_o_ai int 2661 vec_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. 2668 static inline __ATTRS_o_ai int 2669 vec_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 2675 static inline __ATTRS_o_ai int 2676 vec_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. 2684 static inline __ATTRS_o_ai int 2685 vec_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. 2693 static inline __ATTRS_o_ai int 2694 vec_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 2701 static inline __ATTRS_o_ai int 2702 vec_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 2709 static inline __ATTRS_o_ai int 2710 vec_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. 2717 static inline __ATTRS_o_ai int 2718 vec_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. 2725 static inline __ATTRS_o_ai int 2726 vec_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 2732 static inline __ATTRS_o_ai int 2733 vec_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. 2741 static inline __ATTRS_o_ai int 2742 vec_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. 2750 static inline __ATTRS_o_ai int 2751 vec_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 2758 static inline __ATTRS_o_ai int 2759 vec_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 2766 static inline __ATTRS_o_ai int 2767 vec_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. 2774 static inline __ATTRS_o_ai int 2775 vec_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. 2782 static inline __ATTRS_o_ai int 2783 vec_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 2789 static inline __ATTRS_o_ai int 2790 vec_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. 2798 static inline __ATTRS_o_ai int 2799 vec_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. 2807 static inline __ATTRS_o_ai int 2808 vec_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 2815 static inline __ATTRS_o_ai int 2816 vec_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 2824 static inline __ATTRS_o_ai int 2825 vec_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 2832 static inline __ATTRS_o_ai int 2833 vec_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 2841 static inline __ATTRS_o_ai int 2842 vec_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. 2849 static inline __ATTRS_o_ai int 2850 vec_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. 2857 static inline __ATTRS_o_ai int 2858 vec_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 2864 static inline __ATTRS_o_ai int 2865 vec_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. 2873 static inline __ATTRS_o_ai int 2874 vec_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. 2882 static inline __ATTRS_o_ai int 2883 vec_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 2890 static inline __ATTRS_o_ai int 2891 vec_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 2898 static inline __ATTRS_o_ai int 2899 vec_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. 2906 static inline __ATTRS_o_ai int 2907 vec_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. 2914 static inline __ATTRS_o_ai int 2915 vec_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 2921 static inline __ATTRS_o_ai int 2922 vec_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. 2930 static inline __ATTRS_o_ai int 2931 vec_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. 2939 static inline __ATTRS_o_ai int 2940 vec_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 2947 static inline __ATTRS_o_ai int 2948 vec_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 2955 static inline __ATTRS_o_ai int 2956 vec_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. 2963 static inline __ATTRS_o_ai int 2964 vec_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. 2971 static inline __ATTRS_o_ai int 2972 vec_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 2978 static inline __ATTRS_o_ai int 2979 vec_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. 2987 static inline __ATTRS_o_ai int 2988 vec_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. 2996 static inline __ATTRS_o_ai int 2997 vec_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 3004 static inline __ATTRS_o_ai int 3005 vec_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 3012 static inline __ATTRS_o_ai int 3013 vec_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. 3020 static inline __ATTRS_o_ai int 3021 vec_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. 3028 static inline __ATTRS_o_ai int 3029 vec_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 3035 static inline __ATTRS_o_ai int 3036 vec_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. 3044 static inline __ATTRS_o_ai int 3045 vec_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. 3053 static inline __ATTRS_o_ai int 3054 vec_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 3061 static inline __ATTRS_o_ai int 3062 vec_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 3070 static inline __ATTRS_o_ai int 3071 vec_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 3078 static inline __ATTRS_o_ai int 3079 vec_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 3087 static inline __ATTRS_o_ai int 3088 vec_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. 3095 static inline __ATTRS_o_ai int 3096 vec_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. 3103 static inline __ATTRS_o_ai int 3104 vec_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 3110 static inline __ATTRS_o_ai int 3111 vec_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. 3118 static inline __ATTRS_o_ai int 3119 vec_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. 3126 static inline __ATTRS_o_ai int 3127 vec_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. 3134 static inline __ATTRS_o_ai int 3135 vec_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 3142 static inline __ATTRS_o_ai int 3143 vec_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. 3150 static inline __ATTRS_o_ai int 3151 vec_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. 3158 static inline __ATTRS_o_ai int 3159 vec_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 3165 static inline __ATTRS_o_ai int 3166 vec_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. 3173 static inline __ATTRS_o_ai int 3174 vec_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. 3181 static inline __ATTRS_o_ai int 3182 vec_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. 3189 static inline __ATTRS_o_ai int 3190 vec_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 3197 static inline __ATTRS_o_ai int 3198 vec_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. 3205 static inline __ATTRS_o_ai int 3206 vec_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. 3213 static inline __ATTRS_o_ai int 3214 vec_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 3220 static inline __ATTRS_o_ai int 3221 vec_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. 3228 static inline __ATTRS_o_ai int 3229 vec_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. 3236 static inline __ATTRS_o_ai int 3237 vec_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. 3244 static inline __ATTRS_o_ai int 3245 vec_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 3252 static inline __ATTRS_o_ai int 3253 vec_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. 3260 static inline __ATTRS_o_ai int 3261 vec_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. 3268 static inline __ATTRS_o_ai int 3269 vec_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 3275 static inline __ATTRS_o_ai int 3276 vec_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. 3283 static inline __ATTRS_o_ai int 3284 vec_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. 3291 static inline __ATTRS_o_ai int 3292 vec_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. 3299 static inline __ATTRS_o_ai int 3300 vec_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 3308 static inline __ATTRS_o_ai int 3309 vec_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 3316 static inline __ATTRS_o_ai int 3317 vec_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 3325 static inline __ATTRS_o_ai int 3326 vec_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. 3333 static inline __ATTRS_o_ai int 3334 vec_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. 3341 static inline __ATTRS_o_ai int 3342 vec_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 3348 static inline __ATTRS_o_ai int 3349 vec_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. 3356 static inline __ATTRS_o_ai int 3357 vec_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. 3364 static inline __ATTRS_o_ai int 3365 vec_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. 3372 static inline __ATTRS_o_ai int 3373 vec_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 3380 static inline __ATTRS_o_ai int 3381 vec_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. 3388 static inline __ATTRS_o_ai int 3389 vec_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. 3396 static inline __ATTRS_o_ai int 3397 vec_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 3403 static inline __ATTRS_o_ai int 3404 vec_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. 3411 static inline __ATTRS_o_ai int 3412 vec_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. 3419 static inline __ATTRS_o_ai int 3420 vec_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. 3427 static inline __ATTRS_o_ai int 3428 vec_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 3435 static inline __ATTRS_o_ai int 3436 vec_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. 3443 static inline __ATTRS_o_ai int 3444 vec_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. 3451 static inline __ATTRS_o_ai int 3452 vec_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 3458 static inline __ATTRS_o_ai int 3459 vec_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. 3466 static inline __ATTRS_o_ai int 3467 vec_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. 3474 static inline __ATTRS_o_ai int 3475 vec_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. 3482 static inline __ATTRS_o_ai int 3483 vec_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 3490 static inline __ATTRS_o_ai int 3491 vec_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. 3498 static inline __ATTRS_o_ai int 3499 vec_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. 3506 static inline __ATTRS_o_ai int 3507 vec_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 3513 static inline __ATTRS_o_ai int 3514 vec_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. 3521 static inline __ATTRS_o_ai int 3522 vec_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. 3529 static inline __ATTRS_o_ai int 3530 vec_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. 3537 static inline __ATTRS_o_ai int 3538 vec_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 3546 static inline __ATTRS_o_ai int 3547 vec_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 3554 static inline __ATTRS_o_ai int 3555 vec_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 3563 static inline __ATTRS_o_ai int 3564 vec_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. 3571 static inline __ATTRS_o_ai int 3572 vec_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. 3579 static inline __ATTRS_o_ai int 3580 vec_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 3586 static inline __ATTRS_o_ai int 3587 vec_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. 3594 static inline __ATTRS_o_ai int 3595 vec_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. 3602 static inline __ATTRS_o_ai int 3603 vec_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. 3610 static inline __ATTRS_o_ai int 3611 vec_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 3618 static inline __ATTRS_o_ai int 3619 vec_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. 3626 static inline __ATTRS_o_ai int 3627 vec_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. 3634 static inline __ATTRS_o_ai int 3635 vec_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 3641 static inline __ATTRS_o_ai int 3642 vec_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. 3649 static inline __ATTRS_o_ai int 3650 vec_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. 3657 static inline __ATTRS_o_ai int 3658 vec_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. 3665 static inline __ATTRS_o_ai int 3666 vec_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 3673 static inline __ATTRS_o_ai int 3674 vec_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. 3681 static inline __ATTRS_o_ai int 3682 vec_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. 3689 static inline __ATTRS_o_ai int 3690 vec_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 3696 static inline __ATTRS_o_ai int 3697 vec_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. 3704 static inline __ATTRS_o_ai int 3705 vec_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. 3712 static inline __ATTRS_o_ai int 3713 vec_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. 3720 static inline __ATTRS_o_ai int 3721 vec_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 3728 static inline __ATTRS_o_ai int 3729 vec_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. 3736 static inline __ATTRS_o_ai int 3737 vec_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. 3744 static inline __ATTRS_o_ai int 3745 vec_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 3751 static inline __ATTRS_o_ai int 3752 vec_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. 3759 static inline __ATTRS_o_ai int 3760 vec_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. 3767 static inline __ATTRS_o_ai int 3768 vec_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. 3775 static inline __ATTRS_o_ai int 3776 vec_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 3784 static inline __ATTRS_o_ai int 3785 vec_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 3792 static inline __ATTRS_o_ai int 3793 vec_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 3801 static inline __ATTRS_o_ai int 3802 vec_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. 3809 static inline __ATTRS_o_ai int 3810 vec_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. 3817 static inline __ATTRS_o_ai int 3818 vec_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 3824 static inline __ATTRS_o_ai int 3825 vec_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. 3832 static inline __ATTRS_o_ai int 3833 vec_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. 3840 static inline __ATTRS_o_ai int 3841 vec_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. 3848 static inline __ATTRS_o_ai int 3849 vec_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 3856 static inline __ATTRS_o_ai int 3857 vec_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. 3864 static inline __ATTRS_o_ai int 3865 vec_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. 3872 static inline __ATTRS_o_ai int 3873 vec_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 3879 static inline __ATTRS_o_ai int 3880 vec_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. 3887 static inline __ATTRS_o_ai int 3888 vec_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. 3895 static inline __ATTRS_o_ai int 3896 vec_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. 3903 static inline __ATTRS_o_ai int 3904 vec_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 3911 static inline __ATTRS_o_ai int 3912 vec_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. 3919 static inline __ATTRS_o_ai int 3920 vec_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. 3927 static inline __ATTRS_o_ai int 3928 vec_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 3934 static inline __ATTRS_o_ai int 3935 vec_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. 3942 static inline __ATTRS_o_ai int 3943 vec_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. 3950 static inline __ATTRS_o_ai int 3951 vec_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. 3958 static inline __ATTRS_o_ai int 3959 vec_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 3966 static inline __ATTRS_o_ai int 3967 vec_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. 3974 static inline __ATTRS_o_ai int 3975 vec_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. 3982 static inline __ATTRS_o_ai int 3983 vec_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 3989 static inline __ATTRS_o_ai int 3990 vec_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. 3997 static inline __ATTRS_o_ai int 3998 vec_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. 4005 static inline __ATTRS_o_ai int 4006 vec_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. 4013 static inline __ATTRS_o_ai int 4014 vec_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 4022 static inline __ATTRS_o_ai int 4023 vec_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 4030 static inline __ATTRS_o_ai int 4031 vec_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 4040 static inline __ATTRS_o_ai int 4041 vec_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 4048 static inline __ATTRS_o_ai int 4049 vec_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 4058 static inline __ATTRS_o_ai int 4059 vec_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 4066 static inline __ATTRS_o_ai int 4067 vec_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 4076 static inline __ATTRS_o_ai int 4077 vec_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 4084 static inline __ATTRS_o_ai int 4085 vec_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 4094 static inline __ATTRS_o_ai int 4095 vec_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 4102 static inline __ATTRS_o_ai int 4103 vec_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 4112 static inline __ATTRS_o_ai int 4113 vec_all_nan(__vector float __a) { 4114 int __cc; 4115 __builtin_s390_vftcisb(__a, 15, &__cc); 4116 return __cc == 0; 4117 } 4118 #endif 4119 4120 static inline __ATTRS_o_ai int 4121 vec_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 4130 static inline __ATTRS_o_ai int 4131 vec_all_numeric(__vector float __a) { 4132 int __cc; 4133 __builtin_s390_vftcisb(__a, 15, &__cc); 4134 return __cc == 3; 4135 } 4136 #endif 4137 4138 static inline __ATTRS_o_ai int 4139 vec_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 4147 static inline __ATTRS_o_ai int 4148 vec_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. 4155 static inline __ATTRS_o_ai int 4156 vec_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. 4163 static inline __ATTRS_o_ai int 4164 vec_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 4170 static inline __ATTRS_o_ai int 4171 vec_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. 4179 static inline __ATTRS_o_ai int 4180 vec_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. 4188 static inline __ATTRS_o_ai int 4189 vec_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 4196 static inline __ATTRS_o_ai int 4197 vec_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 4204 static inline __ATTRS_o_ai int 4205 vec_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. 4212 static inline __ATTRS_o_ai int 4213 vec_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. 4220 static inline __ATTRS_o_ai int 4221 vec_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 4227 static inline __ATTRS_o_ai int 4228 vec_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. 4236 static inline __ATTRS_o_ai int 4237 vec_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. 4245 static inline __ATTRS_o_ai int 4246 vec_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 4253 static inline __ATTRS_o_ai int 4254 vec_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 4261 static inline __ATTRS_o_ai int 4262 vec_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. 4269 static inline __ATTRS_o_ai int 4270 vec_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. 4277 static inline __ATTRS_o_ai int 4278 vec_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 4284 static inline __ATTRS_o_ai int 4285 vec_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. 4293 static inline __ATTRS_o_ai int 4294 vec_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. 4302 static inline __ATTRS_o_ai int 4303 vec_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 4310 static inline __ATTRS_o_ai int 4311 vec_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 4318 static inline __ATTRS_o_ai int 4319 vec_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. 4326 static inline __ATTRS_o_ai int 4327 vec_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. 4334 static inline __ATTRS_o_ai int 4335 vec_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 4341 static inline __ATTRS_o_ai int 4342 vec_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. 4350 static inline __ATTRS_o_ai int 4351 vec_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. 4359 static inline __ATTRS_o_ai int 4360 vec_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 4367 static inline __ATTRS_o_ai int 4368 vec_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 4376 static inline __ATTRS_o_ai int 4377 vec_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 4384 static inline __ATTRS_o_ai int 4385 vec_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 4393 static inline __ATTRS_o_ai int 4394 vec_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. 4401 static inline __ATTRS_o_ai int 4402 vec_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. 4409 static inline __ATTRS_o_ai int 4410 vec_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 4416 static inline __ATTRS_o_ai int 4417 vec_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. 4425 static inline __ATTRS_o_ai int 4426 vec_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. 4434 static inline __ATTRS_o_ai int 4435 vec_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 4442 static inline __ATTRS_o_ai int 4443 vec_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 4450 static inline __ATTRS_o_ai int 4451 vec_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. 4458 static inline __ATTRS_o_ai int 4459 vec_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. 4466 static inline __ATTRS_o_ai int 4467 vec_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 4473 static inline __ATTRS_o_ai int 4474 vec_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. 4482 static inline __ATTRS_o_ai int 4483 vec_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. 4491 static inline __ATTRS_o_ai int 4492 vec_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 4499 static inline __ATTRS_o_ai int 4500 vec_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 4507 static inline __ATTRS_o_ai int 4508 vec_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. 4515 static inline __ATTRS_o_ai int 4516 vec_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. 4523 static inline __ATTRS_o_ai int 4524 vec_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 4530 static inline __ATTRS_o_ai int 4531 vec_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. 4539 static inline __ATTRS_o_ai int 4540 vec_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. 4548 static inline __ATTRS_o_ai int 4549 vec_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 4556 static inline __ATTRS_o_ai int 4557 vec_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 4564 static inline __ATTRS_o_ai int 4565 vec_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. 4572 static inline __ATTRS_o_ai int 4573 vec_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. 4580 static inline __ATTRS_o_ai int 4581 vec_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 4587 static inline __ATTRS_o_ai int 4588 vec_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. 4596 static inline __ATTRS_o_ai int 4597 vec_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. 4605 static inline __ATTRS_o_ai int 4606 vec_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 4613 static inline __ATTRS_o_ai int 4614 vec_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 4622 static inline __ATTRS_o_ai int 4623 vec_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 4630 static inline __ATTRS_o_ai int 4631 vec_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 4639 static inline __ATTRS_o_ai int 4640 vec_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. 4647 static inline __ATTRS_o_ai int 4648 vec_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. 4655 static inline __ATTRS_o_ai int 4656 vec_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 4662 static inline __ATTRS_o_ai int 4663 vec_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. 4670 static inline __ATTRS_o_ai int 4671 vec_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. 4678 static inline __ATTRS_o_ai int 4679 vec_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. 4686 static inline __ATTRS_o_ai int 4687 vec_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 4694 static inline __ATTRS_o_ai int 4695 vec_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. 4702 static inline __ATTRS_o_ai int 4703 vec_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. 4710 static inline __ATTRS_o_ai int 4711 vec_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 4717 static inline __ATTRS_o_ai int 4718 vec_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. 4725 static inline __ATTRS_o_ai int 4726 vec_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. 4733 static inline __ATTRS_o_ai int 4734 vec_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. 4741 static inline __ATTRS_o_ai int 4742 vec_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 4749 static inline __ATTRS_o_ai int 4750 vec_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. 4757 static inline __ATTRS_o_ai int 4758 vec_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. 4765 static inline __ATTRS_o_ai int 4766 vec_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 4772 static inline __ATTRS_o_ai int 4773 vec_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. 4780 static inline __ATTRS_o_ai int 4781 vec_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. 4788 static inline __ATTRS_o_ai int 4789 vec_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. 4796 static inline __ATTRS_o_ai int 4797 vec_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 4804 static inline __ATTRS_o_ai int 4805 vec_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. 4812 static inline __ATTRS_o_ai int 4813 vec_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. 4820 static inline __ATTRS_o_ai int 4821 vec_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 4827 static inline __ATTRS_o_ai int 4828 vec_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. 4835 static inline __ATTRS_o_ai int 4836 vec_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. 4843 static inline __ATTRS_o_ai int 4844 vec_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. 4851 static inline __ATTRS_o_ai int 4852 vec_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 4860 static inline __ATTRS_o_ai int 4861 vec_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 4868 static inline __ATTRS_o_ai int 4869 vec_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 4877 static inline __ATTRS_o_ai int 4878 vec_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. 4885 static inline __ATTRS_o_ai int 4886 vec_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. 4893 static inline __ATTRS_o_ai int 4894 vec_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 4900 static inline __ATTRS_o_ai int 4901 vec_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. 4908 static inline __ATTRS_o_ai int 4909 vec_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. 4916 static inline __ATTRS_o_ai int 4917 vec_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. 4924 static inline __ATTRS_o_ai int 4925 vec_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 4932 static inline __ATTRS_o_ai int 4933 vec_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. 4940 static inline __ATTRS_o_ai int 4941 vec_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. 4948 static inline __ATTRS_o_ai int 4949 vec_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 4955 static inline __ATTRS_o_ai int 4956 vec_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. 4963 static inline __ATTRS_o_ai int 4964 vec_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. 4971 static inline __ATTRS_o_ai int 4972 vec_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. 4979 static inline __ATTRS_o_ai int 4980 vec_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 4987 static inline __ATTRS_o_ai int 4988 vec_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. 4995 static inline __ATTRS_o_ai int 4996 vec_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. 5003 static inline __ATTRS_o_ai int 5004 vec_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 5010 static inline __ATTRS_o_ai int 5011 vec_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. 5018 static inline __ATTRS_o_ai int 5019 vec_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. 5026 static inline __ATTRS_o_ai int 5027 vec_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. 5034 static inline __ATTRS_o_ai int 5035 vec_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 5042 static inline __ATTRS_o_ai int 5043 vec_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. 5050 static inline __ATTRS_o_ai int 5051 vec_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. 5058 static inline __ATTRS_o_ai int 5059 vec_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 5065 static inline __ATTRS_o_ai int 5066 vec_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. 5073 static inline __ATTRS_o_ai int 5074 vec_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. 5081 static inline __ATTRS_o_ai int 5082 vec_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. 5089 static inline __ATTRS_o_ai int 5090 vec_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 5098 static inline __ATTRS_o_ai int 5099 vec_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 5106 static inline __ATTRS_o_ai int 5107 vec_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 5115 static inline __ATTRS_o_ai int 5116 vec_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. 5123 static inline __ATTRS_o_ai int 5124 vec_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. 5131 static inline __ATTRS_o_ai int 5132 vec_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 5138 static inline __ATTRS_o_ai int 5139 vec_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. 5146 static inline __ATTRS_o_ai int 5147 vec_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. 5154 static inline __ATTRS_o_ai int 5155 vec_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. 5162 static inline __ATTRS_o_ai int 5163 vec_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 5170 static inline __ATTRS_o_ai int 5171 vec_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. 5178 static inline __ATTRS_o_ai int 5179 vec_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. 5186 static inline __ATTRS_o_ai int 5187 vec_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 5193 static inline __ATTRS_o_ai int 5194 vec_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. 5201 static inline __ATTRS_o_ai int 5202 vec_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. 5209 static inline __ATTRS_o_ai int 5210 vec_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. 5217 static inline __ATTRS_o_ai int 5218 vec_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 5225 static inline __ATTRS_o_ai int 5226 vec_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. 5233 static inline __ATTRS_o_ai int 5234 vec_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. 5241 static inline __ATTRS_o_ai int 5242 vec_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 5248 static inline __ATTRS_o_ai int 5249 vec_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. 5256 static inline __ATTRS_o_ai int 5257 vec_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. 5264 static inline __ATTRS_o_ai int 5265 vec_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. 5272 static inline __ATTRS_o_ai int 5273 vec_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 5280 static inline __ATTRS_o_ai int 5281 vec_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. 5288 static inline __ATTRS_o_ai int 5289 vec_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. 5296 static inline __ATTRS_o_ai int 5297 vec_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 5303 static inline __ATTRS_o_ai int 5304 vec_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. 5311 static inline __ATTRS_o_ai int 5312 vec_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. 5319 static inline __ATTRS_o_ai int 5320 vec_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. 5327 static inline __ATTRS_o_ai int 5328 vec_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 5336 static inline __ATTRS_o_ai int 5337 vec_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 5344 static inline __ATTRS_o_ai int 5345 vec_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 5353 static inline __ATTRS_o_ai int 5354 vec_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. 5361 static inline __ATTRS_o_ai int 5362 vec_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. 5369 static inline __ATTRS_o_ai int 5370 vec_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 5376 static inline __ATTRS_o_ai int 5377 vec_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. 5384 static inline __ATTRS_o_ai int 5385 vec_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. 5392 static inline __ATTRS_o_ai int 5393 vec_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. 5400 static inline __ATTRS_o_ai int 5401 vec_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 5408 static inline __ATTRS_o_ai int 5409 vec_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. 5416 static inline __ATTRS_o_ai int 5417 vec_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. 5424 static inline __ATTRS_o_ai int 5425 vec_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 5431 static inline __ATTRS_o_ai int 5432 vec_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. 5439 static inline __ATTRS_o_ai int 5440 vec_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. 5447 static inline __ATTRS_o_ai int 5448 vec_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. 5455 static inline __ATTRS_o_ai int 5456 vec_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 5463 static inline __ATTRS_o_ai int 5464 vec_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. 5471 static inline __ATTRS_o_ai int 5472 vec_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. 5479 static inline __ATTRS_o_ai int 5480 vec_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 5486 static inline __ATTRS_o_ai int 5487 vec_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. 5494 static inline __ATTRS_o_ai int 5495 vec_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. 5502 static inline __ATTRS_o_ai int 5503 vec_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. 5510 static inline __ATTRS_o_ai int 5511 vec_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 5518 static inline __ATTRS_o_ai int 5519 vec_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. 5526 static inline __ATTRS_o_ai int 5527 vec_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. 5534 static inline __ATTRS_o_ai int 5535 vec_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 5541 static inline __ATTRS_o_ai int 5542 vec_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. 5549 static inline __ATTRS_o_ai int 5550 vec_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. 5557 static inline __ATTRS_o_ai int 5558 vec_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. 5565 static inline __ATTRS_o_ai int 5566 vec_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 5574 static inline __ATTRS_o_ai int 5575 vec_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 5582 static inline __ATTRS_o_ai int 5583 vec_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 5592 static inline __ATTRS_o_ai int 5593 vec_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 5600 static inline __ATTRS_o_ai int 5601 vec_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 5610 static inline __ATTRS_o_ai int 5611 vec_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 5618 static inline __ATTRS_o_ai int 5619 vec_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 5628 static inline __ATTRS_o_ai int 5629 vec_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 5636 static inline __ATTRS_o_ai int 5637 vec_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 5646 static inline __ATTRS_o_ai int 5647 vec_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 5654 static inline __ATTRS_o_ai int 5655 vec_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 5664 static inline __ATTRS_o_ai int 5665 vec_any_nan(__vector float __a) { 5666 int __cc; 5667 __builtin_s390_vftcisb(__a, 15, &__cc); 5668 return __cc != 3; 5669 } 5670 #endif 5671 5672 static inline __ATTRS_o_ai int 5673 vec_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 5682 static inline __ATTRS_o_ai int 5683 vec_any_numeric(__vector float __a) { 5684 int __cc; 5685 __builtin_s390_vftcisb(__a, 15, &__cc); 5686 return __cc != 0; 5687 } 5688 #endif 5689 5690 static inline __ATTRS_o_ai int 5691 vec_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 5699 static inline __ATTRS_o_ai __vector __bool char 5700 vec_andc(__vector __bool char __a, __vector __bool char __b) { 5701 return __a & ~__b; 5702 } 5703 5704 static inline __ATTRS_o_ai __vector signed char 5705 vec_andc(__vector signed char __a, __vector signed char __b) { 5706 return __a & ~__b; 5707 } 5708 5709 // This prototype is deprecated. 5710 static inline __ATTRS_o_ai __vector signed char 5711 vec_andc(__vector __bool char __a, __vector signed char __b) { 5712 return __a & ~__b; 5713 } 5714 5715 // This prototype is deprecated. 5716 static inline __ATTRS_o_ai __vector signed char 5717 vec_andc(__vector signed char __a, __vector __bool char __b) { 5718 return __a & ~__b; 5719 } 5720 5721 static inline __ATTRS_o_ai __vector unsigned char 5722 vec_andc(__vector unsigned char __a, __vector unsigned char __b) { 5723 return __a & ~__b; 5724 } 5725 5726 // This prototype is deprecated. 5727 static inline __ATTRS_o_ai __vector unsigned char 5728 vec_andc(__vector __bool char __a, __vector unsigned char __b) { 5729 return __a & ~__b; 5730 } 5731 5732 // This prototype is deprecated. 5733 static inline __ATTRS_o_ai __vector unsigned char 5734 vec_andc(__vector unsigned char __a, __vector __bool char __b) { 5735 return __a & ~__b; 5736 } 5737 5738 static inline __ATTRS_o_ai __vector __bool short 5739 vec_andc(__vector __bool short __a, __vector __bool short __b) { 5740 return __a & ~__b; 5741 } 5742 5743 static inline __ATTRS_o_ai __vector signed short 5744 vec_andc(__vector signed short __a, __vector signed short __b) { 5745 return __a & ~__b; 5746 } 5747 5748 // This prototype is deprecated. 5749 static inline __ATTRS_o_ai __vector signed short 5750 vec_andc(__vector __bool short __a, __vector signed short __b) { 5751 return __a & ~__b; 5752 } 5753 5754 // This prototype is deprecated. 5755 static inline __ATTRS_o_ai __vector signed short 5756 vec_andc(__vector signed short __a, __vector __bool short __b) { 5757 return __a & ~__b; 5758 } 5759 5760 static inline __ATTRS_o_ai __vector unsigned short 5761 vec_andc(__vector unsigned short __a, __vector unsigned short __b) { 5762 return __a & ~__b; 5763 } 5764 5765 // This prototype is deprecated. 5766 static inline __ATTRS_o_ai __vector unsigned short 5767 vec_andc(__vector __bool short __a, __vector unsigned short __b) { 5768 return __a & ~__b; 5769 } 5770 5771 // This prototype is deprecated. 5772 static inline __ATTRS_o_ai __vector unsigned short 5773 vec_andc(__vector unsigned short __a, __vector __bool short __b) { 5774 return __a & ~__b; 5775 } 5776 5777 static inline __ATTRS_o_ai __vector __bool int 5778 vec_andc(__vector __bool int __a, __vector __bool int __b) { 5779 return __a & ~__b; 5780 } 5781 5782 static inline __ATTRS_o_ai __vector signed int 5783 vec_andc(__vector signed int __a, __vector signed int __b) { 5784 return __a & ~__b; 5785 } 5786 5787 // This prototype is deprecated. 5788 static inline __ATTRS_o_ai __vector signed int 5789 vec_andc(__vector __bool int __a, __vector signed int __b) { 5790 return __a & ~__b; 5791 } 5792 5793 // This prototype is deprecated. 5794 static inline __ATTRS_o_ai __vector signed int 5795 vec_andc(__vector signed int __a, __vector __bool int __b) { 5796 return __a & ~__b; 5797 } 5798 5799 static inline __ATTRS_o_ai __vector unsigned int 5800 vec_andc(__vector unsigned int __a, __vector unsigned int __b) { 5801 return __a & ~__b; 5802 } 5803 5804 // This prototype is deprecated. 5805 static inline __ATTRS_o_ai __vector unsigned int 5806 vec_andc(__vector __bool int __a, __vector unsigned int __b) { 5807 return __a & ~__b; 5808 } 5809 5810 // This prototype is deprecated. 5811 static inline __ATTRS_o_ai __vector unsigned int 5812 vec_andc(__vector unsigned int __a, __vector __bool int __b) { 5813 return __a & ~__b; 5814 } 5815 5816 static inline __ATTRS_o_ai __vector __bool long long 5817 vec_andc(__vector __bool long long __a, __vector __bool long long __b) { 5818 return __a & ~__b; 5819 } 5820 5821 static inline __ATTRS_o_ai __vector signed long long 5822 vec_andc(__vector signed long long __a, __vector signed long long __b) { 5823 return __a & ~__b; 5824 } 5825 5826 // This prototype is deprecated. 5827 static inline __ATTRS_o_ai __vector signed long long 5828 vec_andc(__vector __bool long long __a, __vector signed long long __b) { 5829 return __a & ~__b; 5830 } 5831 5832 // This prototype is deprecated. 5833 static inline __ATTRS_o_ai __vector signed long long 5834 vec_andc(__vector signed long long __a, __vector __bool long long __b) { 5835 return __a & ~__b; 5836 } 5837 5838 static inline __ATTRS_o_ai __vector unsigned long long 5839 vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) { 5840 return __a & ~__b; 5841 } 5842 5843 // This prototype is deprecated. 5844 static inline __ATTRS_o_ai __vector unsigned long long 5845 vec_andc(__vector __bool long long __a, __vector unsigned long long __b) { 5846 return __a & ~__b; 5847 } 5848 5849 // This prototype is deprecated. 5850 static inline __ATTRS_o_ai __vector unsigned long long 5851 vec_andc(__vector unsigned long long __a, __vector __bool long long __b) { 5852 return __a & ~__b; 5853 } 5854 5855 #if __ARCH__ >= 12 5856 static inline __ATTRS_o_ai __vector float 5857 vec_andc(__vector float __a, __vector float __b) { 5858 return (__vector float)((__vector unsigned int)__a & 5859 ~(__vector unsigned int)__b); 5860 } 5861 #endif 5862 5863 static inline __ATTRS_o_ai __vector double 5864 vec_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. 5870 static inline __ATTRS_o_ai __vector double 5871 vec_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. 5877 static inline __ATTRS_o_ai __vector double 5878 vec_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 5885 static inline __ATTRS_o_ai __vector __bool char 5886 vec_nor(__vector __bool char __a, __vector __bool char __b) { 5887 return ~(__a | __b); 5888 } 5889 5890 static inline __ATTRS_o_ai __vector signed char 5891 vec_nor(__vector signed char __a, __vector signed char __b) { 5892 return ~(__a | __b); 5893 } 5894 5895 // This prototype is deprecated. 5896 static inline __ATTRS_o_ai __vector signed char 5897 vec_nor(__vector __bool char __a, __vector signed char __b) { 5898 return ~(__a | __b); 5899 } 5900 5901 // This prototype is deprecated. 5902 static inline __ATTRS_o_ai __vector signed char 5903 vec_nor(__vector signed char __a, __vector __bool char __b) { 5904 return ~(__a | __b); 5905 } 5906 5907 static inline __ATTRS_o_ai __vector unsigned char 5908 vec_nor(__vector unsigned char __a, __vector unsigned char __b) { 5909 return ~(__a | __b); 5910 } 5911 5912 // This prototype is deprecated. 5913 static inline __ATTRS_o_ai __vector unsigned char 5914 vec_nor(__vector __bool char __a, __vector unsigned char __b) { 5915 return ~(__a | __b); 5916 } 5917 5918 // This prototype is deprecated. 5919 static inline __ATTRS_o_ai __vector unsigned char 5920 vec_nor(__vector unsigned char __a, __vector __bool char __b) { 5921 return ~(__a | __b); 5922 } 5923 5924 static inline __ATTRS_o_ai __vector __bool short 5925 vec_nor(__vector __bool short __a, __vector __bool short __b) { 5926 return ~(__a | __b); 5927 } 5928 5929 static inline __ATTRS_o_ai __vector signed short 5930 vec_nor(__vector signed short __a, __vector signed short __b) { 5931 return ~(__a | __b); 5932 } 5933 5934 // This prototype is deprecated. 5935 static inline __ATTRS_o_ai __vector signed short 5936 vec_nor(__vector __bool short __a, __vector signed short __b) { 5937 return ~(__a | __b); 5938 } 5939 5940 // This prototype is deprecated. 5941 static inline __ATTRS_o_ai __vector signed short 5942 vec_nor(__vector signed short __a, __vector __bool short __b) { 5943 return ~(__a | __b); 5944 } 5945 5946 static inline __ATTRS_o_ai __vector unsigned short 5947 vec_nor(__vector unsigned short __a, __vector unsigned short __b) { 5948 return ~(__a | __b); 5949 } 5950 5951 // This prototype is deprecated. 5952 static inline __ATTRS_o_ai __vector unsigned short 5953 vec_nor(__vector __bool short __a, __vector unsigned short __b) { 5954 return ~(__a | __b); 5955 } 5956 5957 // This prototype is deprecated. 5958 static inline __ATTRS_o_ai __vector unsigned short 5959 vec_nor(__vector unsigned short __a, __vector __bool short __b) { 5960 return ~(__a | __b); 5961 } 5962 5963 static inline __ATTRS_o_ai __vector __bool int 5964 vec_nor(__vector __bool int __a, __vector __bool int __b) { 5965 return ~(__a | __b); 5966 } 5967 5968 static inline __ATTRS_o_ai __vector signed int 5969 vec_nor(__vector signed int __a, __vector signed int __b) { 5970 return ~(__a | __b); 5971 } 5972 5973 // This prototype is deprecated. 5974 static inline __ATTRS_o_ai __vector signed int 5975 vec_nor(__vector __bool int __a, __vector signed int __b) { 5976 return ~(__a | __b); 5977 } 5978 5979 // This prototype is deprecated. 5980 static inline __ATTRS_o_ai __vector signed int 5981 vec_nor(__vector signed int __a, __vector __bool int __b) { 5982 return ~(__a | __b); 5983 } 5984 5985 static inline __ATTRS_o_ai __vector unsigned int 5986 vec_nor(__vector unsigned int __a, __vector unsigned int __b) { 5987 return ~(__a | __b); 5988 } 5989 5990 // This prototype is deprecated. 5991 static inline __ATTRS_o_ai __vector unsigned int 5992 vec_nor(__vector __bool int __a, __vector unsigned int __b) { 5993 return ~(__a | __b); 5994 } 5995 5996 // This prototype is deprecated. 5997 static inline __ATTRS_o_ai __vector unsigned int 5998 vec_nor(__vector unsigned int __a, __vector __bool int __b) { 5999 return ~(__a | __b); 6000 } 6001 6002 static inline __ATTRS_o_ai __vector __bool long long 6003 vec_nor(__vector __bool long long __a, __vector __bool long long __b) { 6004 return ~(__a | __b); 6005 } 6006 6007 static inline __ATTRS_o_ai __vector signed long long 6008 vec_nor(__vector signed long long __a, __vector signed long long __b) { 6009 return ~(__a | __b); 6010 } 6011 6012 // This prototype is deprecated. 6013 static inline __ATTRS_o_ai __vector signed long long 6014 vec_nor(__vector __bool long long __a, __vector signed long long __b) { 6015 return ~(__a | __b); 6016 } 6017 6018 // This prototype is deprecated. 6019 static inline __ATTRS_o_ai __vector signed long long 6020 vec_nor(__vector signed long long __a, __vector __bool long long __b) { 6021 return ~(__a | __b); 6022 } 6023 6024 static inline __ATTRS_o_ai __vector unsigned long long 6025 vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) { 6026 return ~(__a | __b); 6027 } 6028 6029 // This prototype is deprecated. 6030 static inline __ATTRS_o_ai __vector unsigned long long 6031 vec_nor(__vector __bool long long __a, __vector unsigned long long __b) { 6032 return ~(__a | __b); 6033 } 6034 6035 // This prototype is deprecated. 6036 static inline __ATTRS_o_ai __vector unsigned long long 6037 vec_nor(__vector unsigned long long __a, __vector __bool long long __b) { 6038 return ~(__a | __b); 6039 } 6040 6041 #if __ARCH__ >= 12 6042 static inline __ATTRS_o_ai __vector float 6043 vec_nor(__vector float __a, __vector float __b) { 6044 return (__vector float)~((__vector unsigned int)__a | 6045 (__vector unsigned int)__b); 6046 } 6047 #endif 6048 6049 static inline __ATTRS_o_ai __vector double 6050 vec_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. 6056 static inline __ATTRS_o_ai __vector double 6057 vec_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. 6063 static inline __ATTRS_o_ai __vector double 6064 vec_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 6072 static inline __ATTRS_o_ai __vector __bool char 6073 vec_orc(__vector __bool char __a, __vector __bool char __b) { 6074 return __a | ~__b; 6075 } 6076 6077 static inline __ATTRS_o_ai __vector signed char 6078 vec_orc(__vector signed char __a, __vector signed char __b) { 6079 return __a | ~__b; 6080 } 6081 6082 static inline __ATTRS_o_ai __vector unsigned char 6083 vec_orc(__vector unsigned char __a, __vector unsigned char __b) { 6084 return __a | ~__b; 6085 } 6086 6087 static inline __ATTRS_o_ai __vector __bool short 6088 vec_orc(__vector __bool short __a, __vector __bool short __b) { 6089 return __a | ~__b; 6090 } 6091 6092 static inline __ATTRS_o_ai __vector signed short 6093 vec_orc(__vector signed short __a, __vector signed short __b) { 6094 return __a | ~__b; 6095 } 6096 6097 static inline __ATTRS_o_ai __vector unsigned short 6098 vec_orc(__vector unsigned short __a, __vector unsigned short __b) { 6099 return __a | ~__b; 6100 } 6101 6102 static inline __ATTRS_o_ai __vector __bool int 6103 vec_orc(__vector __bool int __a, __vector __bool int __b) { 6104 return __a | ~__b; 6105 } 6106 6107 static inline __ATTRS_o_ai __vector signed int 6108 vec_orc(__vector signed int __a, __vector signed int __b) { 6109 return __a | ~__b; 6110 } 6111 6112 static inline __ATTRS_o_ai __vector unsigned int 6113 vec_orc(__vector unsigned int __a, __vector unsigned int __b) { 6114 return __a | ~__b; 6115 } 6116 6117 static inline __ATTRS_o_ai __vector __bool long long 6118 vec_orc(__vector __bool long long __a, __vector __bool long long __b) { 6119 return __a | ~__b; 6120 } 6121 6122 static inline __ATTRS_o_ai __vector signed long long 6123 vec_orc(__vector signed long long __a, __vector signed long long __b) { 6124 return __a | ~__b; 6125 } 6126 6127 static inline __ATTRS_o_ai __vector unsigned long long 6128 vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) { 6129 return __a | ~__b; 6130 } 6131 6132 static inline __ATTRS_o_ai __vector float 6133 vec_orc(__vector float __a, __vector float __b) { 6134 return (__vector float)((__vector unsigned int)__a | 6135 ~(__vector unsigned int)__b); 6136 } 6137 6138 static inline __ATTRS_o_ai __vector double 6139 vec_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 6148 static inline __ATTRS_o_ai __vector __bool char 6149 vec_nand(__vector __bool char __a, __vector __bool char __b) { 6150 return ~(__a & __b); 6151 } 6152 6153 static inline __ATTRS_o_ai __vector signed char 6154 vec_nand(__vector signed char __a, __vector signed char __b) { 6155 return ~(__a & __b); 6156 } 6157 6158 static inline __ATTRS_o_ai __vector unsigned char 6159 vec_nand(__vector unsigned char __a, __vector unsigned char __b) { 6160 return ~(__a & __b); 6161 } 6162 6163 static inline __ATTRS_o_ai __vector __bool short 6164 vec_nand(__vector __bool short __a, __vector __bool short __b) { 6165 return ~(__a & __b); 6166 } 6167 6168 static inline __ATTRS_o_ai __vector signed short 6169 vec_nand(__vector signed short __a, __vector signed short __b) { 6170 return ~(__a & __b); 6171 } 6172 6173 static inline __ATTRS_o_ai __vector unsigned short 6174 vec_nand(__vector unsigned short __a, __vector unsigned short __b) { 6175 return ~(__a & __b); 6176 } 6177 6178 static inline __ATTRS_o_ai __vector __bool int 6179 vec_nand(__vector __bool int __a, __vector __bool int __b) { 6180 return ~(__a & __b); 6181 } 6182 6183 static inline __ATTRS_o_ai __vector signed int 6184 vec_nand(__vector signed int __a, __vector signed int __b) { 6185 return ~(__a & __b); 6186 } 6187 6188 static inline __ATTRS_o_ai __vector unsigned int 6189 vec_nand(__vector unsigned int __a, __vector unsigned int __b) { 6190 return ~(__a & __b); 6191 } 6192 6193 static inline __ATTRS_o_ai __vector __bool long long 6194 vec_nand(__vector __bool long long __a, __vector __bool long long __b) { 6195 return ~(__a & __b); 6196 } 6197 6198 static inline __ATTRS_o_ai __vector signed long long 6199 vec_nand(__vector signed long long __a, __vector signed long long __b) { 6200 return ~(__a & __b); 6201 } 6202 6203 static inline __ATTRS_o_ai __vector unsigned long long 6204 vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) { 6205 return ~(__a & __b); 6206 } 6207 6208 static inline __ATTRS_o_ai __vector float 6209 vec_nand(__vector float __a, __vector float __b) { 6210 return (__vector float)~((__vector unsigned int)__a & 6211 (__vector unsigned int)__b); 6212 } 6213 6214 static inline __ATTRS_o_ai __vector double 6215 vec_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 6224 static inline __ATTRS_o_ai __vector __bool char 6225 vec_eqv(__vector __bool char __a, __vector __bool char __b) { 6226 return ~(__a ^ __b); 6227 } 6228 6229 static inline __ATTRS_o_ai __vector signed char 6230 vec_eqv(__vector signed char __a, __vector signed char __b) { 6231 return ~(__a ^ __b); 6232 } 6233 6234 static inline __ATTRS_o_ai __vector unsigned char 6235 vec_eqv(__vector unsigned char __a, __vector unsigned char __b) { 6236 return ~(__a ^ __b); 6237 } 6238 6239 static inline __ATTRS_o_ai __vector __bool short 6240 vec_eqv(__vector __bool short __a, __vector __bool short __b) { 6241 return ~(__a ^ __b); 6242 } 6243 6244 static inline __ATTRS_o_ai __vector signed short 6245 vec_eqv(__vector signed short __a, __vector signed short __b) { 6246 return ~(__a ^ __b); 6247 } 6248 6249 static inline __ATTRS_o_ai __vector unsigned short 6250 vec_eqv(__vector unsigned short __a, __vector unsigned short __b) { 6251 return ~(__a ^ __b); 6252 } 6253 6254 static inline __ATTRS_o_ai __vector __bool int 6255 vec_eqv(__vector __bool int __a, __vector __bool int __b) { 6256 return ~(__a ^ __b); 6257 } 6258 6259 static inline __ATTRS_o_ai __vector signed int 6260 vec_eqv(__vector signed int __a, __vector signed int __b) { 6261 return ~(__a ^ __b); 6262 } 6263 6264 static inline __ATTRS_o_ai __vector unsigned int 6265 vec_eqv(__vector unsigned int __a, __vector unsigned int __b) { 6266 return ~(__a ^ __b); 6267 } 6268 6269 static inline __ATTRS_o_ai __vector __bool long long 6270 vec_eqv(__vector __bool long long __a, __vector __bool long long __b) { 6271 return ~(__a ^ __b); 6272 } 6273 6274 static inline __ATTRS_o_ai __vector signed long long 6275 vec_eqv(__vector signed long long __a, __vector signed long long __b) { 6276 return ~(__a ^ __b); 6277 } 6278 6279 static inline __ATTRS_o_ai __vector unsigned long long 6280 vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) { 6281 return ~(__a ^ __b); 6282 } 6283 6284 static inline __ATTRS_o_ai __vector float 6285 vec_eqv(__vector float __a, __vector float __b) { 6286 return (__vector float)~((__vector unsigned int)__a ^ 6287 (__vector unsigned int)__b); 6288 } 6289 6290 static inline __ATTRS_o_ai __vector double 6291 vec_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 6299 static inline __ATTRS_o_ai __vector unsigned char 6300 vec_cntlz(__vector signed char __a) { 6301 return __builtin_s390_vclzb((__vector unsigned char)__a); 6302 } 6303 6304 static inline __ATTRS_o_ai __vector unsigned char 6305 vec_cntlz(__vector unsigned char __a) { 6306 return __builtin_s390_vclzb(__a); 6307 } 6308 6309 static inline __ATTRS_o_ai __vector unsigned short 6310 vec_cntlz(__vector signed short __a) { 6311 return __builtin_s390_vclzh((__vector unsigned short)__a); 6312 } 6313 6314 static inline __ATTRS_o_ai __vector unsigned short 6315 vec_cntlz(__vector unsigned short __a) { 6316 return __builtin_s390_vclzh(__a); 6317 } 6318 6319 static inline __ATTRS_o_ai __vector unsigned int 6320 vec_cntlz(__vector signed int __a) { 6321 return __builtin_s390_vclzf((__vector unsigned int)__a); 6322 } 6323 6324 static inline __ATTRS_o_ai __vector unsigned int 6325 vec_cntlz(__vector unsigned int __a) { 6326 return __builtin_s390_vclzf(__a); 6327 } 6328 6329 static inline __ATTRS_o_ai __vector unsigned long long 6330 vec_cntlz(__vector signed long long __a) { 6331 return __builtin_s390_vclzg((__vector unsigned long long)__a); 6332 } 6333 6334 static inline __ATTRS_o_ai __vector unsigned long long 6335 vec_cntlz(__vector unsigned long long __a) { 6336 return __builtin_s390_vclzg(__a); 6337 } 6338 6339 /*-- vec_cnttz --------------------------------------------------------------*/ 6340 6341 static inline __ATTRS_o_ai __vector unsigned char 6342 vec_cnttz(__vector signed char __a) { 6343 return __builtin_s390_vctzb((__vector unsigned char)__a); 6344 } 6345 6346 static inline __ATTRS_o_ai __vector unsigned char 6347 vec_cnttz(__vector unsigned char __a) { 6348 return __builtin_s390_vctzb(__a); 6349 } 6350 6351 static inline __ATTRS_o_ai __vector unsigned short 6352 vec_cnttz(__vector signed short __a) { 6353 return __builtin_s390_vctzh((__vector unsigned short)__a); 6354 } 6355 6356 static inline __ATTRS_o_ai __vector unsigned short 6357 vec_cnttz(__vector unsigned short __a) { 6358 return __builtin_s390_vctzh(__a); 6359 } 6360 6361 static inline __ATTRS_o_ai __vector unsigned int 6362 vec_cnttz(__vector signed int __a) { 6363 return __builtin_s390_vctzf((__vector unsigned int)__a); 6364 } 6365 6366 static inline __ATTRS_o_ai __vector unsigned int 6367 vec_cnttz(__vector unsigned int __a) { 6368 return __builtin_s390_vctzf(__a); 6369 } 6370 6371 static inline __ATTRS_o_ai __vector unsigned long long 6372 vec_cnttz(__vector signed long long __a) { 6373 return __builtin_s390_vctzg((__vector unsigned long long)__a); 6374 } 6375 6376 static inline __ATTRS_o_ai __vector unsigned long long 6377 vec_cnttz(__vector unsigned long long __a) { 6378 return __builtin_s390_vctzg(__a); 6379 } 6380 6381 /*-- vec_popcnt -------------------------------------------------------------*/ 6382 6383 static inline __ATTRS_o_ai __vector unsigned char 6384 vec_popcnt(__vector signed char __a) { 6385 return __builtin_s390_vpopctb((__vector unsigned char)__a); 6386 } 6387 6388 static inline __ATTRS_o_ai __vector unsigned char 6389 vec_popcnt(__vector unsigned char __a) { 6390 return __builtin_s390_vpopctb(__a); 6391 } 6392 6393 static inline __ATTRS_o_ai __vector unsigned short 6394 vec_popcnt(__vector signed short __a) { 6395 return __builtin_s390_vpopcth((__vector unsigned short)__a); 6396 } 6397 6398 static inline __ATTRS_o_ai __vector unsigned short 6399 vec_popcnt(__vector unsigned short __a) { 6400 return __builtin_s390_vpopcth(__a); 6401 } 6402 6403 static inline __ATTRS_o_ai __vector unsigned int 6404 vec_popcnt(__vector signed int __a) { 6405 return __builtin_s390_vpopctf((__vector unsigned int)__a); 6406 } 6407 6408 static inline __ATTRS_o_ai __vector unsigned int 6409 vec_popcnt(__vector unsigned int __a) { 6410 return __builtin_s390_vpopctf(__a); 6411 } 6412 6413 static inline __ATTRS_o_ai __vector unsigned long long 6414 vec_popcnt(__vector signed long long __a) { 6415 return __builtin_s390_vpopctg((__vector unsigned long long)__a); 6416 } 6417 6418 static inline __ATTRS_o_ai __vector unsigned long long 6419 vec_popcnt(__vector unsigned long long __a) { 6420 return __builtin_s390_vpopctg(__a); 6421 } 6422 6423 /*-- vec_rl -----------------------------------------------------------------*/ 6424 6425 static inline __ATTRS_o_ai __vector signed char 6426 vec_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 6431 static inline __ATTRS_o_ai __vector unsigned char 6432 vec_rl(__vector unsigned char __a, __vector unsigned char __b) { 6433 return __builtin_s390_verllvb(__a, __b); 6434 } 6435 6436 static inline __ATTRS_o_ai __vector signed short 6437 vec_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 6442 static inline __ATTRS_o_ai __vector unsigned short 6443 vec_rl(__vector unsigned short __a, __vector unsigned short __b) { 6444 return __builtin_s390_verllvh(__a, __b); 6445 } 6446 6447 static inline __ATTRS_o_ai __vector signed int 6448 vec_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 6453 static inline __ATTRS_o_ai __vector unsigned int 6454 vec_rl(__vector unsigned int __a, __vector unsigned int __b) { 6455 return __builtin_s390_verllvf(__a, __b); 6456 } 6457 6458 static inline __ATTRS_o_ai __vector signed long long 6459 vec_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 6464 static inline __ATTRS_o_ai __vector unsigned long long 6465 vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) { 6466 return __builtin_s390_verllvg(__a, __b); 6467 } 6468 6469 /*-- vec_rli ----------------------------------------------------------------*/ 6470 6471 static inline __ATTRS_o_ai __vector signed char 6472 vec_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 6477 static inline __ATTRS_o_ai __vector unsigned char 6478 vec_rli(__vector unsigned char __a, unsigned long __b) { 6479 return __builtin_s390_verllb(__a, (int)__b); 6480 } 6481 6482 static inline __ATTRS_o_ai __vector signed short 6483 vec_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 6488 static inline __ATTRS_o_ai __vector unsigned short 6489 vec_rli(__vector unsigned short __a, unsigned long __b) { 6490 return __builtin_s390_verllh(__a, (int)__b); 6491 } 6492 6493 static inline __ATTRS_o_ai __vector signed int 6494 vec_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 6499 static inline __ATTRS_o_ai __vector unsigned int 6500 vec_rli(__vector unsigned int __a, unsigned long __b) { 6501 return __builtin_s390_verllf(__a, (int)__b); 6502 } 6503 6504 static inline __ATTRS_o_ai __vector signed long long 6505 vec_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 6510 static inline __ATTRS_o_ai __vector unsigned long long 6511 vec_rli(__vector unsigned long long __a, unsigned long __b) { 6512 return __builtin_s390_verllg(__a, (int)__b); 6513 } 6514 6515 /*-- vec_rl_mask ------------------------------------------------------------*/ 6516 6517 extern __ATTRS_o __vector signed char 6518 vec_rl_mask(__vector signed char __a, __vector unsigned char __b, 6519 unsigned char __c) __constant(__c); 6520 6521 extern __ATTRS_o __vector unsigned char 6522 vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b, 6523 unsigned char __c) __constant(__c); 6524 6525 extern __ATTRS_o __vector signed short 6526 vec_rl_mask(__vector signed short __a, __vector unsigned short __b, 6527 unsigned char __c) __constant(__c); 6528 6529 extern __ATTRS_o __vector unsigned short 6530 vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b, 6531 unsigned char __c) __constant(__c); 6532 6533 extern __ATTRS_o __vector signed int 6534 vec_rl_mask(__vector signed int __a, __vector unsigned int __b, 6535 unsigned char __c) __constant(__c); 6536 6537 extern __ATTRS_o __vector unsigned int 6538 vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b, 6539 unsigned char __c) __constant(__c); 6540 6541 extern __ATTRS_o __vector signed long long 6542 vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b, 6543 unsigned char __c) __constant(__c); 6544 6545 extern __ATTRS_o __vector unsigned long long 6546 vec_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 6571 static inline __ATTRS_o_ai __vector signed char 6572 vec_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. 6578 static inline __ATTRS_o_ai __vector signed char 6579 vec_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. 6585 static inline __ATTRS_o_ai __vector signed char 6586 vec_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. 6592 static inline __ATTRS_o_ai __vector __bool char 6593 vec_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. 6599 static inline __ATTRS_o_ai __vector __bool char 6600 vec_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. 6606 static inline __ATTRS_o_ai __vector __bool char 6607 vec_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 6612 static inline __ATTRS_o_ai __vector unsigned char 6613 vec_sll(__vector unsigned char __a, __vector unsigned char __b) { 6614 return __builtin_s390_vsl(__a, __b); 6615 } 6616 6617 // This prototype is deprecated. 6618 static inline __ATTRS_o_ai __vector unsigned char 6619 vec_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. 6624 static inline __ATTRS_o_ai __vector unsigned char 6625 vec_sll(__vector unsigned char __a, __vector unsigned int __b) { 6626 return __builtin_s390_vsl(__a, (__vector unsigned char)__b); 6627 } 6628 6629 static inline __ATTRS_o_ai __vector signed short 6630 vec_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. 6636 static inline __ATTRS_o_ai __vector signed short 6637 vec_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. 6643 static inline __ATTRS_o_ai __vector signed short 6644 vec_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. 6650 static inline __ATTRS_o_ai __vector __bool short 6651 vec_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. 6657 static inline __ATTRS_o_ai __vector __bool short 6658 vec_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. 6664 static inline __ATTRS_o_ai __vector __bool short 6665 vec_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 6670 static inline __ATTRS_o_ai __vector unsigned short 6671 vec_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. 6677 static inline __ATTRS_o_ai __vector unsigned short 6678 vec_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. 6684 static inline __ATTRS_o_ai __vector unsigned short 6685 vec_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 6690 static inline __ATTRS_o_ai __vector signed int 6691 vec_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. 6697 static inline __ATTRS_o_ai __vector signed int 6698 vec_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. 6704 static inline __ATTRS_o_ai __vector signed int 6705 vec_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. 6711 static inline __ATTRS_o_ai __vector __bool int 6712 vec_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. 6718 static inline __ATTRS_o_ai __vector __bool int 6719 vec_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. 6725 static inline __ATTRS_o_ai __vector __bool int 6726 vec_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 6731 static inline __ATTRS_o_ai __vector unsigned int 6732 vec_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. 6738 static inline __ATTRS_o_ai __vector unsigned int 6739 vec_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. 6745 static inline __ATTRS_o_ai __vector unsigned int 6746 vec_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 6751 static inline __ATTRS_o_ai __vector signed long long 6752 vec_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. 6758 static inline __ATTRS_o_ai __vector signed long long 6759 vec_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. 6765 static inline __ATTRS_o_ai __vector signed long long 6766 vec_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. 6772 static inline __ATTRS_o_ai __vector __bool long long 6773 vec_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. 6779 static inline __ATTRS_o_ai __vector __bool long long 6780 vec_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. 6786 static inline __ATTRS_o_ai __vector __bool long long 6787 vec_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 6792 static inline __ATTRS_o_ai __vector unsigned long long 6793 vec_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. 6799 static inline __ATTRS_o_ai __vector unsigned long long 6800 vec_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. 6806 static inline __ATTRS_o_ai __vector unsigned long long 6807 vec_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 6814 static inline __ATTRS_o_ai __vector signed char 6815 vec_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 6820 static inline __ATTRS_o_ai __vector signed char 6821 vec_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 6826 static inline __ATTRS_o_ai __vector unsigned char 6827 vec_slb(__vector unsigned char __a, __vector signed char __b) { 6828 return __builtin_s390_vslb(__a, (__vector unsigned char)__b); 6829 } 6830 6831 static inline __ATTRS_o_ai __vector unsigned char 6832 vec_slb(__vector unsigned char __a, __vector unsigned char __b) { 6833 return __builtin_s390_vslb(__a, __b); 6834 } 6835 6836 static inline __ATTRS_o_ai __vector signed short 6837 vec_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 6842 static inline __ATTRS_o_ai __vector signed short 6843 vec_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 6848 static inline __ATTRS_o_ai __vector unsigned short 6849 vec_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 6854 static inline __ATTRS_o_ai __vector unsigned short 6855 vec_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 6860 static inline __ATTRS_o_ai __vector signed int 6861 vec_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 6866 static inline __ATTRS_o_ai __vector signed int 6867 vec_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 6872 static inline __ATTRS_o_ai __vector unsigned int 6873 vec_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 6878 static inline __ATTRS_o_ai __vector unsigned int 6879 vec_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 6884 static inline __ATTRS_o_ai __vector signed long long 6885 vec_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 6890 static inline __ATTRS_o_ai __vector signed long long 6891 vec_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 6896 static inline __ATTRS_o_ai __vector unsigned long long 6897 vec_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 6902 static inline __ATTRS_o_ai __vector unsigned long long 6903 vec_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 6909 static inline __ATTRS_o_ai __vector float 6910 vec_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 6915 static inline __ATTRS_o_ai __vector float 6916 vec_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 6922 static inline __ATTRS_o_ai __vector double 6923 vec_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 6928 static inline __ATTRS_o_ai __vector double 6929 vec_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 6936 extern __ATTRS_o __vector signed char 6937 vec_sld(__vector signed char __a, __vector signed char __b, int __c) 6938 __constant_range(__c, 0, 15); 6939 6940 extern __ATTRS_o __vector __bool char 6941 vec_sld(__vector __bool char __a, __vector __bool char __b, int __c) 6942 __constant_range(__c, 0, 15); 6943 6944 extern __ATTRS_o __vector unsigned char 6945 vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c) 6946 __constant_range(__c, 0, 15); 6947 6948 extern __ATTRS_o __vector signed short 6949 vec_sld(__vector signed short __a, __vector signed short __b, int __c) 6950 __constant_range(__c, 0, 15); 6951 6952 extern __ATTRS_o __vector __bool short 6953 vec_sld(__vector __bool short __a, __vector __bool short __b, int __c) 6954 __constant_range(__c, 0, 15); 6955 6956 extern __ATTRS_o __vector unsigned short 6957 vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c) 6958 __constant_range(__c, 0, 15); 6959 6960 extern __ATTRS_o __vector signed int 6961 vec_sld(__vector signed int __a, __vector signed int __b, int __c) 6962 __constant_range(__c, 0, 15); 6963 6964 extern __ATTRS_o __vector __bool int 6965 vec_sld(__vector __bool int __a, __vector __bool int __b, int __c) 6966 __constant_range(__c, 0, 15); 6967 6968 extern __ATTRS_o __vector unsigned int 6969 vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c) 6970 __constant_range(__c, 0, 15); 6971 6972 extern __ATTRS_o __vector signed long long 6973 vec_sld(__vector signed long long __a, __vector signed long long __b, int __c) 6974 __constant_range(__c, 0, 15); 6975 6976 extern __ATTRS_o __vector __bool long long 6977 vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c) 6978 __constant_range(__c, 0, 15); 6979 6980 extern __ATTRS_o __vector unsigned long long 6981 vec_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 6986 extern __ATTRS_o __vector float 6987 vec_sld(__vector float __a, __vector float __b, int __c) 6988 __constant_range(__c, 0, 15); 6989 #endif 6990 6991 extern __ATTRS_o __vector double 6992 vec_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 7001 extern __ATTRS_o __vector signed char 7002 vec_sldw(__vector signed char __a, __vector signed char __b, int __c) 7003 __constant_range(__c, 0, 3); 7004 7005 extern __ATTRS_o __vector unsigned char 7006 vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c) 7007 __constant_range(__c, 0, 3); 7008 7009 extern __ATTRS_o __vector signed short 7010 vec_sldw(__vector signed short __a, __vector signed short __b, int __c) 7011 __constant_range(__c, 0, 3); 7012 7013 extern __ATTRS_o __vector unsigned short 7014 vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c) 7015 __constant_range(__c, 0, 3); 7016 7017 extern __ATTRS_o __vector signed int 7018 vec_sldw(__vector signed int __a, __vector signed int __b, int __c) 7019 __constant_range(__c, 0, 3); 7020 7021 extern __ATTRS_o __vector unsigned int 7022 vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c) 7023 __constant_range(__c, 0, 3); 7024 7025 extern __ATTRS_o __vector signed long long 7026 vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c) 7027 __constant_range(__c, 0, 3); 7028 7029 extern __ATTRS_o __vector unsigned long long 7030 vec_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. 7035 extern __ATTRS_o __vector double 7036 vec_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 7047 extern __ATTRS_o __vector signed char 7048 vec_sldb(__vector signed char __a, __vector signed char __b, int __c) 7049 __constant_range(__c, 0, 7); 7050 7051 extern __ATTRS_o __vector unsigned char 7052 vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c) 7053 __constant_range(__c, 0, 7); 7054 7055 extern __ATTRS_o __vector signed short 7056 vec_sldb(__vector signed short __a, __vector signed short __b, int __c) 7057 __constant_range(__c, 0, 7); 7058 7059 extern __ATTRS_o __vector unsigned short 7060 vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c) 7061 __constant_range(__c, 0, 7); 7062 7063 extern __ATTRS_o __vector signed int 7064 vec_sldb(__vector signed int __a, __vector signed int __b, int __c) 7065 __constant_range(__c, 0, 7); 7066 7067 extern __ATTRS_o __vector unsigned int 7068 vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c) 7069 __constant_range(__c, 0, 7); 7070 7071 extern __ATTRS_o __vector signed long long 7072 vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c) 7073 __constant_range(__c, 0, 7); 7074 7075 extern __ATTRS_o __vector unsigned long long 7076 vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b, 7077 int __c) 7078 __constant_range(__c, 0, 7); 7079 7080 extern __ATTRS_o __vector float 7081 vec_sldb(__vector float __a, __vector float __b, int __c) 7082 __constant_range(__c, 0, 7); 7083 7084 extern __ATTRS_o __vector double 7085 vec_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 7096 static inline __ATTRS_o_ai __vector signed char 7097 vec_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. 7103 static inline __ATTRS_o_ai __vector signed char 7104 vec_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. 7110 static inline __ATTRS_o_ai __vector signed char 7111 vec_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. 7117 static inline __ATTRS_o_ai __vector __bool char 7118 vec_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. 7124 static inline __ATTRS_o_ai __vector __bool char 7125 vec_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. 7131 static inline __ATTRS_o_ai __vector __bool char 7132 vec_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 7137 static inline __ATTRS_o_ai __vector unsigned char 7138 vec_sral(__vector unsigned char __a, __vector unsigned char __b) { 7139 return __builtin_s390_vsra(__a, __b); 7140 } 7141 7142 // This prototype is deprecated. 7143 static inline __ATTRS_o_ai __vector unsigned char 7144 vec_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. 7149 static inline __ATTRS_o_ai __vector unsigned char 7150 vec_sral(__vector unsigned char __a, __vector unsigned int __b) { 7151 return __builtin_s390_vsra(__a, (__vector unsigned char)__b); 7152 } 7153 7154 static inline __ATTRS_o_ai __vector signed short 7155 vec_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. 7161 static inline __ATTRS_o_ai __vector signed short 7162 vec_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. 7168 static inline __ATTRS_o_ai __vector signed short 7169 vec_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. 7175 static inline __ATTRS_o_ai __vector __bool short 7176 vec_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. 7182 static inline __ATTRS_o_ai __vector __bool short 7183 vec_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. 7189 static inline __ATTRS_o_ai __vector __bool short 7190 vec_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 7195 static inline __ATTRS_o_ai __vector unsigned short 7196 vec_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. 7202 static inline __ATTRS_o_ai __vector unsigned short 7203 vec_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. 7209 static inline __ATTRS_o_ai __vector unsigned short 7210 vec_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 7215 static inline __ATTRS_o_ai __vector signed int 7216 vec_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. 7222 static inline __ATTRS_o_ai __vector signed int 7223 vec_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. 7229 static inline __ATTRS_o_ai __vector signed int 7230 vec_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. 7236 static inline __ATTRS_o_ai __vector __bool int 7237 vec_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. 7243 static inline __ATTRS_o_ai __vector __bool int 7244 vec_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. 7250 static inline __ATTRS_o_ai __vector __bool int 7251 vec_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 7256 static inline __ATTRS_o_ai __vector unsigned int 7257 vec_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. 7263 static inline __ATTRS_o_ai __vector unsigned int 7264 vec_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. 7270 static inline __ATTRS_o_ai __vector unsigned int 7271 vec_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 7276 static inline __ATTRS_o_ai __vector signed long long 7277 vec_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. 7283 static inline __ATTRS_o_ai __vector signed long long 7284 vec_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. 7290 static inline __ATTRS_o_ai __vector signed long long 7291 vec_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. 7297 static inline __ATTRS_o_ai __vector __bool long long 7298 vec_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. 7304 static inline __ATTRS_o_ai __vector __bool long long 7305 vec_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. 7311 static inline __ATTRS_o_ai __vector __bool long long 7312 vec_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 7317 static inline __ATTRS_o_ai __vector unsigned long long 7318 vec_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. 7324 static inline __ATTRS_o_ai __vector unsigned long long 7325 vec_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. 7331 static inline __ATTRS_o_ai __vector unsigned long long 7332 vec_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 7339 static inline __ATTRS_o_ai __vector signed char 7340 vec_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 7345 static inline __ATTRS_o_ai __vector signed char 7346 vec_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 7351 static inline __ATTRS_o_ai __vector unsigned char 7352 vec_srab(__vector unsigned char __a, __vector signed char __b) { 7353 return __builtin_s390_vsrab(__a, (__vector unsigned char)__b); 7354 } 7355 7356 static inline __ATTRS_o_ai __vector unsigned char 7357 vec_srab(__vector unsigned char __a, __vector unsigned char __b) { 7358 return __builtin_s390_vsrab(__a, __b); 7359 } 7360 7361 static inline __ATTRS_o_ai __vector signed short 7362 vec_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 7367 static inline __ATTRS_o_ai __vector signed short 7368 vec_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 7373 static inline __ATTRS_o_ai __vector unsigned short 7374 vec_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 7379 static inline __ATTRS_o_ai __vector unsigned short 7380 vec_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 7385 static inline __ATTRS_o_ai __vector signed int 7386 vec_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 7391 static inline __ATTRS_o_ai __vector signed int 7392 vec_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 7397 static inline __ATTRS_o_ai __vector unsigned int 7398 vec_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 7403 static inline __ATTRS_o_ai __vector unsigned int 7404 vec_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 7409 static inline __ATTRS_o_ai __vector signed long long 7410 vec_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 7415 static inline __ATTRS_o_ai __vector signed long long 7416 vec_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 7421 static inline __ATTRS_o_ai __vector unsigned long long 7422 vec_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 7427 static inline __ATTRS_o_ai __vector unsigned long long 7428 vec_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 7434 static inline __ATTRS_o_ai __vector float 7435 vec_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 7440 static inline __ATTRS_o_ai __vector float 7441 vec_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 7447 static inline __ATTRS_o_ai __vector double 7448 vec_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 7453 static inline __ATTRS_o_ai __vector double 7454 vec_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 7461 static inline __ATTRS_o_ai __vector signed char 7462 vec_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. 7468 static inline __ATTRS_o_ai __vector signed char 7469 vec_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. 7475 static inline __ATTRS_o_ai __vector signed char 7476 vec_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. 7482 static inline __ATTRS_o_ai __vector __bool char 7483 vec_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. 7489 static inline __ATTRS_o_ai __vector __bool char 7490 vec_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. 7496 static inline __ATTRS_o_ai __vector __bool char 7497 vec_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 7502 static inline __ATTRS_o_ai __vector unsigned char 7503 vec_srl(__vector unsigned char __a, __vector unsigned char __b) { 7504 return __builtin_s390_vsrl(__a, __b); 7505 } 7506 7507 // This prototype is deprecated. 7508 static inline __ATTRS_o_ai __vector unsigned char 7509 vec_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. 7514 static inline __ATTRS_o_ai __vector unsigned char 7515 vec_srl(__vector unsigned char __a, __vector unsigned int __b) { 7516 return __builtin_s390_vsrl(__a, (__vector unsigned char)__b); 7517 } 7518 7519 static inline __ATTRS_o_ai __vector signed short 7520 vec_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. 7526 static inline __ATTRS_o_ai __vector signed short 7527 vec_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. 7533 static inline __ATTRS_o_ai __vector signed short 7534 vec_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. 7540 static inline __ATTRS_o_ai __vector __bool short 7541 vec_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. 7547 static inline __ATTRS_o_ai __vector __bool short 7548 vec_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. 7554 static inline __ATTRS_o_ai __vector __bool short 7555 vec_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 7560 static inline __ATTRS_o_ai __vector unsigned short 7561 vec_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. 7567 static inline __ATTRS_o_ai __vector unsigned short 7568 vec_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. 7574 static inline __ATTRS_o_ai __vector unsigned short 7575 vec_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 7580 static inline __ATTRS_o_ai __vector signed int 7581 vec_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. 7587 static inline __ATTRS_o_ai __vector signed int 7588 vec_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. 7594 static inline __ATTRS_o_ai __vector signed int 7595 vec_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. 7601 static inline __ATTRS_o_ai __vector __bool int 7602 vec_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. 7608 static inline __ATTRS_o_ai __vector __bool int 7609 vec_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. 7615 static inline __ATTRS_o_ai __vector __bool int 7616 vec_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 7621 static inline __ATTRS_o_ai __vector unsigned int 7622 vec_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. 7628 static inline __ATTRS_o_ai __vector unsigned int 7629 vec_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. 7635 static inline __ATTRS_o_ai __vector unsigned int 7636 vec_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 7641 static inline __ATTRS_o_ai __vector signed long long 7642 vec_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. 7648 static inline __ATTRS_o_ai __vector signed long long 7649 vec_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. 7655 static inline __ATTRS_o_ai __vector signed long long 7656 vec_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. 7662 static inline __ATTRS_o_ai __vector __bool long long 7663 vec_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. 7669 static inline __ATTRS_o_ai __vector __bool long long 7670 vec_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. 7676 static inline __ATTRS_o_ai __vector __bool long long 7677 vec_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 7682 static inline __ATTRS_o_ai __vector unsigned long long 7683 vec_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. 7689 static inline __ATTRS_o_ai __vector unsigned long long 7690 vec_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. 7696 static inline __ATTRS_o_ai __vector unsigned long long 7697 vec_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 7704 static inline __ATTRS_o_ai __vector signed char 7705 vec_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 7710 static inline __ATTRS_o_ai __vector signed char 7711 vec_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 7716 static inline __ATTRS_o_ai __vector unsigned char 7717 vec_srb(__vector unsigned char __a, __vector signed char __b) { 7718 return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b); 7719 } 7720 7721 static inline __ATTRS_o_ai __vector unsigned char 7722 vec_srb(__vector unsigned char __a, __vector unsigned char __b) { 7723 return __builtin_s390_vsrlb(__a, __b); 7724 } 7725 7726 static inline __ATTRS_o_ai __vector signed short 7727 vec_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 7732 static inline __ATTRS_o_ai __vector signed short 7733 vec_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 7738 static inline __ATTRS_o_ai __vector unsigned short 7739 vec_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 7744 static inline __ATTRS_o_ai __vector unsigned short 7745 vec_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 7750 static inline __ATTRS_o_ai __vector signed int 7751 vec_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 7756 static inline __ATTRS_o_ai __vector signed int 7757 vec_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 7762 static inline __ATTRS_o_ai __vector unsigned int 7763 vec_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 7768 static inline __ATTRS_o_ai __vector unsigned int 7769 vec_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 7774 static inline __ATTRS_o_ai __vector signed long long 7775 vec_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 7780 static inline __ATTRS_o_ai __vector signed long long 7781 vec_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 7786 static inline __ATTRS_o_ai __vector unsigned long long 7787 vec_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 7792 static inline __ATTRS_o_ai __vector unsigned long long 7793 vec_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 7799 static inline __ATTRS_o_ai __vector float 7800 vec_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 7805 static inline __ATTRS_o_ai __vector float 7806 vec_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 7812 static inline __ATTRS_o_ai __vector double 7813 vec_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 7818 static inline __ATTRS_o_ai __vector double 7819 vec_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 7828 extern __ATTRS_o __vector signed char 7829 vec_srdb(__vector signed char __a, __vector signed char __b, int __c) 7830 __constant_range(__c, 0, 7); 7831 7832 extern __ATTRS_o __vector unsigned char 7833 vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c) 7834 __constant_range(__c, 0, 7); 7835 7836 extern __ATTRS_o __vector signed short 7837 vec_srdb(__vector signed short __a, __vector signed short __b, int __c) 7838 __constant_range(__c, 0, 7); 7839 7840 extern __ATTRS_o __vector unsigned short 7841 vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c) 7842 __constant_range(__c, 0, 7); 7843 7844 extern __ATTRS_o __vector signed int 7845 vec_srdb(__vector signed int __a, __vector signed int __b, int __c) 7846 __constant_range(__c, 0, 7); 7847 7848 extern __ATTRS_o __vector unsigned int 7849 vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c) 7850 __constant_range(__c, 0, 7); 7851 7852 extern __ATTRS_o __vector signed long long 7853 vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c) 7854 __constant_range(__c, 0, 7); 7855 7856 extern __ATTRS_o __vector unsigned long long 7857 vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b, 7858 int __c) 7859 __constant_range(__c, 0, 7); 7860 7861 extern __ATTRS_o __vector float 7862 vec_srdb(__vector float __a, __vector float __b, int __c) 7863 __constant_range(__c, 0, 7); 7864 7865 extern __ATTRS_o __vector double 7866 vec_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 7877 static inline __ATTRS_o_ai __vector signed char 7878 vec_abs(__vector signed char __a) { 7879 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0)); 7880 } 7881 7882 static inline __ATTRS_o_ai __vector signed short 7883 vec_abs(__vector signed short __a) { 7884 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0)); 7885 } 7886 7887 static inline __ATTRS_o_ai __vector signed int 7888 vec_abs(__vector signed int __a) { 7889 return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0)); 7890 } 7891 7892 static inline __ATTRS_o_ai __vector signed long long 7893 vec_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 7898 static inline __ATTRS_o_ai __vector float 7899 vec_abs(__vector float __a) { 7900 return __builtin_s390_vflpsb(__a); 7901 } 7902 #endif 7903 7904 static inline __ATTRS_o_ai __vector double 7905 vec_abs(__vector double __a) { 7906 return __builtin_s390_vflpdb(__a); 7907 } 7908 7909 /*-- vec_nabs ---------------------------------------------------------------*/ 7910 7911 #if __ARCH__ >= 12 7912 static inline __ATTRS_o_ai __vector float 7913 vec_nabs(__vector float __a) { 7914 return __builtin_s390_vflnsb(__a); 7915 } 7916 #endif 7917 7918 static inline __ATTRS_o_ai __vector double 7919 vec_nabs(__vector double __a) { 7920 return __builtin_s390_vflndb(__a); 7921 } 7922 7923 /*-- vec_max ----------------------------------------------------------------*/ 7924 7925 static inline __ATTRS_o_ai __vector signed char 7926 vec_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. 7931 static inline __ATTRS_o_ai __vector signed char 7932 vec_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. 7938 static inline __ATTRS_o_ai __vector signed char 7939 vec_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 7944 static inline __ATTRS_o_ai __vector unsigned char 7945 vec_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. 7950 static inline __ATTRS_o_ai __vector unsigned char 7951 vec_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. 7957 static inline __ATTRS_o_ai __vector unsigned char 7958 vec_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 7963 static inline __ATTRS_o_ai __vector signed short 7964 vec_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. 7969 static inline __ATTRS_o_ai __vector signed short 7970 vec_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. 7976 static inline __ATTRS_o_ai __vector signed short 7977 vec_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 7982 static inline __ATTRS_o_ai __vector unsigned short 7983 vec_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. 7988 static inline __ATTRS_o_ai __vector unsigned short 7989 vec_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. 7995 static inline __ATTRS_o_ai __vector unsigned short 7996 vec_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 8001 static inline __ATTRS_o_ai __vector signed int 8002 vec_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. 8007 static inline __ATTRS_o_ai __vector signed int 8008 vec_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. 8014 static inline __ATTRS_o_ai __vector signed int 8015 vec_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 8020 static inline __ATTRS_o_ai __vector unsigned int 8021 vec_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. 8026 static inline __ATTRS_o_ai __vector unsigned int 8027 vec_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. 8033 static inline __ATTRS_o_ai __vector unsigned int 8034 vec_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 8039 static inline __ATTRS_o_ai __vector signed long long 8040 vec_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. 8045 static inline __ATTRS_o_ai __vector signed long long 8046 vec_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. 8052 static inline __ATTRS_o_ai __vector signed long long 8053 vec_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 8058 static inline __ATTRS_o_ai __vector unsigned long long 8059 vec_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. 8064 static inline __ATTRS_o_ai __vector unsigned long long 8065 vec_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. 8071 static inline __ATTRS_o_ai __vector unsigned long long 8072 vec_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 8078 static inline __ATTRS_o_ai __vector float 8079 vec_max(__vector float __a, __vector float __b) { 8080 return __builtin_s390_vfmaxsb(__a, __b, 0); 8081 } 8082 #endif 8083 8084 static inline __ATTRS_o_ai __vector double 8085 vec_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 8095 static inline __ATTRS_o_ai __vector signed char 8096 vec_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. 8101 static inline __ATTRS_o_ai __vector signed char 8102 vec_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. 8108 static inline __ATTRS_o_ai __vector signed char 8109 vec_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 8114 static inline __ATTRS_o_ai __vector unsigned char 8115 vec_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. 8120 static inline __ATTRS_o_ai __vector unsigned char 8121 vec_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. 8127 static inline __ATTRS_o_ai __vector unsigned char 8128 vec_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 8133 static inline __ATTRS_o_ai __vector signed short 8134 vec_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. 8139 static inline __ATTRS_o_ai __vector signed short 8140 vec_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. 8146 static inline __ATTRS_o_ai __vector signed short 8147 vec_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 8152 static inline __ATTRS_o_ai __vector unsigned short 8153 vec_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. 8158 static inline __ATTRS_o_ai __vector unsigned short 8159 vec_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. 8165 static inline __ATTRS_o_ai __vector unsigned short 8166 vec_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 8171 static inline __ATTRS_o_ai __vector signed int 8172 vec_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. 8177 static inline __ATTRS_o_ai __vector signed int 8178 vec_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. 8184 static inline __ATTRS_o_ai __vector signed int 8185 vec_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 8190 static inline __ATTRS_o_ai __vector unsigned int 8191 vec_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. 8196 static inline __ATTRS_o_ai __vector unsigned int 8197 vec_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. 8203 static inline __ATTRS_o_ai __vector unsigned int 8204 vec_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 8209 static inline __ATTRS_o_ai __vector signed long long 8210 vec_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. 8215 static inline __ATTRS_o_ai __vector signed long long 8216 vec_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. 8222 static inline __ATTRS_o_ai __vector signed long long 8223 vec_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 8228 static inline __ATTRS_o_ai __vector unsigned long long 8229 vec_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. 8234 static inline __ATTRS_o_ai __vector unsigned long long 8235 vec_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. 8241 static inline __ATTRS_o_ai __vector unsigned long long 8242 vec_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 8248 static inline __ATTRS_o_ai __vector float 8249 vec_min(__vector float __a, __vector float __b) { 8250 return __builtin_s390_vfminsb(__a, __b, 0); 8251 } 8252 #endif 8253 8254 static inline __ATTRS_o_ai __vector double 8255 vec_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 8265 static inline __ATTRS_ai __vector unsigned char 8266 vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) { 8267 return __builtin_s390_vaq(__a, __b); 8268 } 8269 8270 /*-- vec_addc ---------------------------------------------------------------*/ 8271 8272 static inline __ATTRS_o_ai __vector unsigned char 8273 vec_addc(__vector unsigned char __a, __vector unsigned char __b) { 8274 return __builtin_s390_vaccb(__a, __b); 8275 } 8276 8277 static inline __ATTRS_o_ai __vector unsigned short 8278 vec_addc(__vector unsigned short __a, __vector unsigned short __b) { 8279 return __builtin_s390_vacch(__a, __b); 8280 } 8281 8282 static inline __ATTRS_o_ai __vector unsigned int 8283 vec_addc(__vector unsigned int __a, __vector unsigned int __b) { 8284 return __builtin_s390_vaccf(__a, __b); 8285 } 8286 8287 static inline __ATTRS_o_ai __vector unsigned long long 8288 vec_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 8294 static inline __ATTRS_ai __vector unsigned char 8295 vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) { 8296 return __builtin_s390_vaccq(__a, __b); 8297 } 8298 8299 /*-- vec_adde_u128 ----------------------------------------------------------*/ 8300 8301 static inline __ATTRS_ai __vector unsigned char 8302 vec_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 8309 static inline __ATTRS_ai __vector unsigned char 8310 vec_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 8317 static inline __ATTRS_o_ai __vector signed char 8318 vec_avg(__vector signed char __a, __vector signed char __b) { 8319 return __builtin_s390_vavgb(__a, __b); 8320 } 8321 8322 static inline __ATTRS_o_ai __vector signed short 8323 vec_avg(__vector signed short __a, __vector signed short __b) { 8324 return __builtin_s390_vavgh(__a, __b); 8325 } 8326 8327 static inline __ATTRS_o_ai __vector signed int 8328 vec_avg(__vector signed int __a, __vector signed int __b) { 8329 return __builtin_s390_vavgf(__a, __b); 8330 } 8331 8332 static inline __ATTRS_o_ai __vector signed long long 8333 vec_avg(__vector signed long long __a, __vector signed long long __b) { 8334 return __builtin_s390_vavgg(__a, __b); 8335 } 8336 8337 static inline __ATTRS_o_ai __vector unsigned char 8338 vec_avg(__vector unsigned char __a, __vector unsigned char __b) { 8339 return __builtin_s390_vavglb(__a, __b); 8340 } 8341 8342 static inline __ATTRS_o_ai __vector unsigned short 8343 vec_avg(__vector unsigned short __a, __vector unsigned short __b) { 8344 return __builtin_s390_vavglh(__a, __b); 8345 } 8346 8347 static inline __ATTRS_o_ai __vector unsigned int 8348 vec_avg(__vector unsigned int __a, __vector unsigned int __b) { 8349 return __builtin_s390_vavglf(__a, __b); 8350 } 8351 8352 static inline __ATTRS_o_ai __vector unsigned long long 8353 vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) { 8354 return __builtin_s390_vavglg(__a, __b); 8355 } 8356 8357 /*-- vec_checksum -----------------------------------------------------------*/ 8358 8359 static inline __ATTRS_ai __vector unsigned int 8360 vec_checksum(__vector unsigned int __a, __vector unsigned int __b) { 8361 return __builtin_s390_vcksm(__a, __b); 8362 } 8363 8364 /*-- vec_gfmsum -------------------------------------------------------------*/ 8365 8366 static inline __ATTRS_o_ai __vector unsigned short 8367 vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) { 8368 return __builtin_s390_vgfmb(__a, __b); 8369 } 8370 8371 static inline __ATTRS_o_ai __vector unsigned int 8372 vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) { 8373 return __builtin_s390_vgfmh(__a, __b); 8374 } 8375 8376 static inline __ATTRS_o_ai __vector unsigned long long 8377 vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) { 8378 return __builtin_s390_vgfmf(__a, __b); 8379 } 8380 8381 /*-- vec_gfmsum_128 ---------------------------------------------------------*/ 8382 8383 static inline __ATTRS_o_ai __vector unsigned char 8384 vec_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 8391 static inline __ATTRS_o_ai __vector unsigned short 8392 vec_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 8397 static inline __ATTRS_o_ai __vector unsigned int 8398 vec_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 8403 static inline __ATTRS_o_ai __vector unsigned long long 8404 vec_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 8411 static inline __ATTRS_o_ai __vector unsigned char 8412 vec_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 8420 static inline __ATTRS_o_ai __vector signed char 8421 vec_mladd(__vector signed char __a, __vector signed char __b, 8422 __vector signed char __c) { 8423 return __a * __b + __c; 8424 } 8425 8426 static inline __ATTRS_o_ai __vector signed char 8427 vec_mladd(__vector unsigned char __a, __vector signed char __b, 8428 __vector signed char __c) { 8429 return (__vector signed char)__a * __b + __c; 8430 } 8431 8432 static inline __ATTRS_o_ai __vector signed char 8433 vec_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 8438 static inline __ATTRS_o_ai __vector unsigned char 8439 vec_mladd(__vector unsigned char __a, __vector unsigned char __b, 8440 __vector unsigned char __c) { 8441 return __a * __b + __c; 8442 } 8443 8444 static inline __ATTRS_o_ai __vector signed short 8445 vec_mladd(__vector signed short __a, __vector signed short __b, 8446 __vector signed short __c) { 8447 return __a * __b + __c; 8448 } 8449 8450 static inline __ATTRS_o_ai __vector signed short 8451 vec_mladd(__vector unsigned short __a, __vector signed short __b, 8452 __vector signed short __c) { 8453 return (__vector signed short)__a * __b + __c; 8454 } 8455 8456 static inline __ATTRS_o_ai __vector signed short 8457 vec_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 8462 static inline __ATTRS_o_ai __vector unsigned short 8463 vec_mladd(__vector unsigned short __a, __vector unsigned short __b, 8464 __vector unsigned short __c) { 8465 return __a * __b + __c; 8466 } 8467 8468 static inline __ATTRS_o_ai __vector signed int 8469 vec_mladd(__vector signed int __a, __vector signed int __b, 8470 __vector signed int __c) { 8471 return __a * __b + __c; 8472 } 8473 8474 static inline __ATTRS_o_ai __vector signed int 8475 vec_mladd(__vector unsigned int __a, __vector signed int __b, 8476 __vector signed int __c) { 8477 return (__vector signed int)__a * __b + __c; 8478 } 8479 8480 static inline __ATTRS_o_ai __vector signed int 8481 vec_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 8486 static inline __ATTRS_o_ai __vector unsigned int 8487 vec_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 8494 static inline __ATTRS_o_ai __vector signed char 8495 vec_mhadd(__vector signed char __a, __vector signed char __b, 8496 __vector signed char __c) { 8497 return __builtin_s390_vmahb(__a, __b, __c); 8498 } 8499 8500 static inline __ATTRS_o_ai __vector unsigned char 8501 vec_mhadd(__vector unsigned char __a, __vector unsigned char __b, 8502 __vector unsigned char __c) { 8503 return __builtin_s390_vmalhb(__a, __b, __c); 8504 } 8505 8506 static inline __ATTRS_o_ai __vector signed short 8507 vec_mhadd(__vector signed short __a, __vector signed short __b, 8508 __vector signed short __c) { 8509 return __builtin_s390_vmahh(__a, __b, __c); 8510 } 8511 8512 static inline __ATTRS_o_ai __vector unsigned short 8513 vec_mhadd(__vector unsigned short __a, __vector unsigned short __b, 8514 __vector unsigned short __c) { 8515 return __builtin_s390_vmalhh(__a, __b, __c); 8516 } 8517 8518 static inline __ATTRS_o_ai __vector signed int 8519 vec_mhadd(__vector signed int __a, __vector signed int __b, 8520 __vector signed int __c) { 8521 return __builtin_s390_vmahf(__a, __b, __c); 8522 } 8523 8524 static inline __ATTRS_o_ai __vector unsigned int 8525 vec_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 8532 static inline __ATTRS_o_ai __vector signed short 8533 vec_meadd(__vector signed char __a, __vector signed char __b, 8534 __vector signed short __c) { 8535 return __builtin_s390_vmaeb(__a, __b, __c); 8536 } 8537 8538 static inline __ATTRS_o_ai __vector unsigned short 8539 vec_meadd(__vector unsigned char __a, __vector unsigned char __b, 8540 __vector unsigned short __c) { 8541 return __builtin_s390_vmaleb(__a, __b, __c); 8542 } 8543 8544 static inline __ATTRS_o_ai __vector signed int 8545 vec_meadd(__vector signed short __a, __vector signed short __b, 8546 __vector signed int __c) { 8547 return __builtin_s390_vmaeh(__a, __b, __c); 8548 } 8549 8550 static inline __ATTRS_o_ai __vector unsigned int 8551 vec_meadd(__vector unsigned short __a, __vector unsigned short __b, 8552 __vector unsigned int __c) { 8553 return __builtin_s390_vmaleh(__a, __b, __c); 8554 } 8555 8556 static inline __ATTRS_o_ai __vector signed long long 8557 vec_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 8562 static inline __ATTRS_o_ai __vector unsigned long long 8563 vec_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 8570 static inline __ATTRS_o_ai __vector signed short 8571 vec_moadd(__vector signed char __a, __vector signed char __b, 8572 __vector signed short __c) { 8573 return __builtin_s390_vmaob(__a, __b, __c); 8574 } 8575 8576 static inline __ATTRS_o_ai __vector unsigned short 8577 vec_moadd(__vector unsigned char __a, __vector unsigned char __b, 8578 __vector unsigned short __c) { 8579 return __builtin_s390_vmalob(__a, __b, __c); 8580 } 8581 8582 static inline __ATTRS_o_ai __vector signed int 8583 vec_moadd(__vector signed short __a, __vector signed short __b, 8584 __vector signed int __c) { 8585 return __builtin_s390_vmaoh(__a, __b, __c); 8586 } 8587 8588 static inline __ATTRS_o_ai __vector unsigned int 8589 vec_moadd(__vector unsigned short __a, __vector unsigned short __b, 8590 __vector unsigned int __c) { 8591 return __builtin_s390_vmaloh(__a, __b, __c); 8592 } 8593 8594 static inline __ATTRS_o_ai __vector signed long long 8595 vec_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 8600 static inline __ATTRS_o_ai __vector unsigned long long 8601 vec_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 8608 static inline __ATTRS_o_ai __vector signed char 8609 vec_mulh(__vector signed char __a, __vector signed char __b) { 8610 return __builtin_s390_vmhb(__a, __b); 8611 } 8612 8613 static inline __ATTRS_o_ai __vector unsigned char 8614 vec_mulh(__vector unsigned char __a, __vector unsigned char __b) { 8615 return __builtin_s390_vmlhb(__a, __b); 8616 } 8617 8618 static inline __ATTRS_o_ai __vector signed short 8619 vec_mulh(__vector signed short __a, __vector signed short __b) { 8620 return __builtin_s390_vmhh(__a, __b); 8621 } 8622 8623 static inline __ATTRS_o_ai __vector unsigned short 8624 vec_mulh(__vector unsigned short __a, __vector unsigned short __b) { 8625 return __builtin_s390_vmlhh(__a, __b); 8626 } 8627 8628 static inline __ATTRS_o_ai __vector signed int 8629 vec_mulh(__vector signed int __a, __vector signed int __b) { 8630 return __builtin_s390_vmhf(__a, __b); 8631 } 8632 8633 static inline __ATTRS_o_ai __vector unsigned int 8634 vec_mulh(__vector unsigned int __a, __vector unsigned int __b) { 8635 return __builtin_s390_vmlhf(__a, __b); 8636 } 8637 8638 /*-- vec_mule ---------------------------------------------------------------*/ 8639 8640 static inline __ATTRS_o_ai __vector signed short 8641 vec_mule(__vector signed char __a, __vector signed char __b) { 8642 return __builtin_s390_vmeb(__a, __b); 8643 } 8644 8645 static inline __ATTRS_o_ai __vector unsigned short 8646 vec_mule(__vector unsigned char __a, __vector unsigned char __b) { 8647 return __builtin_s390_vmleb(__a, __b); 8648 } 8649 8650 static inline __ATTRS_o_ai __vector signed int 8651 vec_mule(__vector signed short __a, __vector signed short __b) { 8652 return __builtin_s390_vmeh(__a, __b); 8653 } 8654 8655 static inline __ATTRS_o_ai __vector unsigned int 8656 vec_mule(__vector unsigned short __a, __vector unsigned short __b) { 8657 return __builtin_s390_vmleh(__a, __b); 8658 } 8659 8660 static inline __ATTRS_o_ai __vector signed long long 8661 vec_mule(__vector signed int __a, __vector signed int __b) { 8662 return __builtin_s390_vmef(__a, __b); 8663 } 8664 8665 static inline __ATTRS_o_ai __vector unsigned long long 8666 vec_mule(__vector unsigned int __a, __vector unsigned int __b) { 8667 return __builtin_s390_vmlef(__a, __b); 8668 } 8669 8670 /*-- vec_mulo ---------------------------------------------------------------*/ 8671 8672 static inline __ATTRS_o_ai __vector signed short 8673 vec_mulo(__vector signed char __a, __vector signed char __b) { 8674 return __builtin_s390_vmob(__a, __b); 8675 } 8676 8677 static inline __ATTRS_o_ai __vector unsigned short 8678 vec_mulo(__vector unsigned char __a, __vector unsigned char __b) { 8679 return __builtin_s390_vmlob(__a, __b); 8680 } 8681 8682 static inline __ATTRS_o_ai __vector signed int 8683 vec_mulo(__vector signed short __a, __vector signed short __b) { 8684 return __builtin_s390_vmoh(__a, __b); 8685 } 8686 8687 static inline __ATTRS_o_ai __vector unsigned int 8688 vec_mulo(__vector unsigned short __a, __vector unsigned short __b) { 8689 return __builtin_s390_vmloh(__a, __b); 8690 } 8691 8692 static inline __ATTRS_o_ai __vector signed long long 8693 vec_mulo(__vector signed int __a, __vector signed int __b) { 8694 return __builtin_s390_vmof(__a, __b); 8695 } 8696 8697 static inline __ATTRS_o_ai __vector unsigned long long 8698 vec_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 8711 static inline __ATTRS_ai __vector unsigned char 8712 vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) { 8713 return __builtin_s390_vsq(__a, __b); 8714 } 8715 8716 /*-- vec_subc ---------------------------------------------------------------*/ 8717 8718 static inline __ATTRS_o_ai __vector unsigned char 8719 vec_subc(__vector unsigned char __a, __vector unsigned char __b) { 8720 return __builtin_s390_vscbib(__a, __b); 8721 } 8722 8723 static inline __ATTRS_o_ai __vector unsigned short 8724 vec_subc(__vector unsigned short __a, __vector unsigned short __b) { 8725 return __builtin_s390_vscbih(__a, __b); 8726 } 8727 8728 static inline __ATTRS_o_ai __vector unsigned int 8729 vec_subc(__vector unsigned int __a, __vector unsigned int __b) { 8730 return __builtin_s390_vscbif(__a, __b); 8731 } 8732 8733 static inline __ATTRS_o_ai __vector unsigned long long 8734 vec_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 8740 static inline __ATTRS_ai __vector unsigned char 8741 vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) { 8742 return __builtin_s390_vscbiq(__a, __b); 8743 } 8744 8745 /*-- vec_sube_u128 ----------------------------------------------------------*/ 8746 8747 static inline __ATTRS_ai __vector unsigned char 8748 vec_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 8755 static inline __ATTRS_ai __vector unsigned char 8756 vec_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 8763 static inline __ATTRS_o_ai __vector unsigned long long 8764 vec_sum2(__vector unsigned short __a, __vector unsigned short __b) { 8765 return __builtin_s390_vsumgh(__a, __b); 8766 } 8767 8768 static inline __ATTRS_o_ai __vector unsigned long long 8769 vec_sum2(__vector unsigned int __a, __vector unsigned int __b) { 8770 return __builtin_s390_vsumgf(__a, __b); 8771 } 8772 8773 /*-- vec_sum_u128 -----------------------------------------------------------*/ 8774 8775 static inline __ATTRS_o_ai __vector unsigned char 8776 vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) { 8777 return __builtin_s390_vsumqf(__a, __b); 8778 } 8779 8780 static inline __ATTRS_o_ai __vector unsigned char 8781 vec_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 8787 static inline __ATTRS_o_ai __vector unsigned int 8788 vec_sum4(__vector unsigned char __a, __vector unsigned char __b) { 8789 return __builtin_s390_vsumb(__a, __b); 8790 } 8791 8792 static inline __ATTRS_o_ai __vector unsigned int 8793 vec_sum4(__vector unsigned short __a, __vector unsigned short __b) { 8794 return __builtin_s390_vsumh(__a, __b); 8795 } 8796 8797 /*-- vec_test_mask ----------------------------------------------------------*/ 8798 8799 static inline __ATTRS_o_ai int 8800 vec_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 8805 static inline __ATTRS_o_ai int 8806 vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) { 8807 return __builtin_s390_vtm(__a, __b); 8808 } 8809 8810 static inline __ATTRS_o_ai int 8811 vec_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 8816 static inline __ATTRS_o_ai int 8817 vec_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 8822 static inline __ATTRS_o_ai int 8823 vec_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 8828 static inline __ATTRS_o_ai int 8829 vec_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 8834 static inline __ATTRS_o_ai int 8835 vec_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 8840 static inline __ATTRS_o_ai int 8841 vec_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 8848 static inline __ATTRS_o_ai int 8849 vec_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 8855 static inline __ATTRS_o_ai int 8856 vec_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 8864 static inline __ATTRS_o_ai __vector float 8865 vec_madd(__vector float __a, __vector float __b, __vector float __c) { 8866 return __builtin_s390_vfmasb(__a, __b, __c); 8867 } 8868 #endif 8869 8870 static inline __ATTRS_o_ai __vector double 8871 vec_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 8878 static inline __ATTRS_o_ai __vector float 8879 vec_msub(__vector float __a, __vector float __b, __vector float __c) { 8880 return __builtin_s390_vfmssb(__a, __b, __c); 8881 } 8882 #endif 8883 8884 static inline __ATTRS_o_ai __vector double 8885 vec_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 8892 static inline __ATTRS_o_ai __vector float 8893 vec_nmadd(__vector float __a, __vector float __b, __vector float __c) { 8894 return __builtin_s390_vfnmasb(__a, __b, __c); 8895 } 8896 8897 static inline __ATTRS_o_ai __vector double 8898 vec_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 8906 static inline __ATTRS_o_ai __vector float 8907 vec_nmsub(__vector float __a, __vector float __b, __vector float __c) { 8908 return __builtin_s390_vfnmssb(__a, __b, __c); 8909 } 8910 8911 static inline __ATTRS_o_ai __vector double 8912 vec_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 8920 static inline __ATTRS_o_ai __vector float 8921 vec_sqrt(__vector float __a) { 8922 return __builtin_s390_vfsqsb(__a); 8923 } 8924 #endif 8925 8926 static inline __ATTRS_o_ai __vector double 8927 vec_sqrt(__vector double __a) { 8928 return __builtin_s390_vfsqdb(__a); 8929 } 8930 8931 /*-- vec_ld2f ---------------------------------------------------------------*/ 8932 8933 // This prototype is deprecated. 8934 static inline __ATTRS_ai __vector double 8935 vec_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. 8943 static inline __ATTRS_ai void 8944 vec_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. 8952 static inline __ATTRS_o_ai __vector double 8953 vec_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. 8962 static inline __ATTRS_o_ai __vector double 8963 vec_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. 8974 static inline __ATTRS_o_ai __vector signed long long 8975 vec_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. 8985 static inline __ATTRS_o_ai __vector unsigned long long 8986 vec_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 8996 static inline __ATTRS_ai __vector double 8997 vec_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 9007 static inline __ATTRS_ai __vector float 9008 vec_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 9017 static inline __ATTRS_o_ai __vector double 9018 vec_double(__vector signed long long __a) { 9019 return __builtin_convertvector(__a, __vector double); 9020 } 9021 9022 static inline __ATTRS_o_ai __vector double 9023 vec_double(__vector unsigned long long __a) { 9024 return __builtin_convertvector(__a, __vector double); 9025 } 9026 9027 /*-- vec_float --------------------------------------------------------------*/ 9028 9029 #if __ARCH__ >= 13 9030 9031 static inline __ATTRS_o_ai __vector float 9032 vec_float(__vector signed int __a) { 9033 return __builtin_convertvector(__a, __vector float); 9034 } 9035 9036 static inline __ATTRS_o_ai __vector float 9037 vec_float(__vector unsigned int __a) { 9038 return __builtin_convertvector(__a, __vector float); 9039 } 9040 9041 #endif 9042 9043 /*-- vec_signed -------------------------------------------------------------*/ 9044 9045 static inline __ATTRS_o_ai __vector signed long long 9046 vec_signed(__vector double __a) { 9047 return __builtin_convertvector(__a, __vector signed long long); 9048 } 9049 9050 #if __ARCH__ >= 13 9051 static inline __ATTRS_o_ai __vector signed int 9052 vec_signed(__vector float __a) { 9053 return __builtin_convertvector(__a, __vector signed int); 9054 } 9055 #endif 9056 9057 /*-- vec_unsigned -----------------------------------------------------------*/ 9058 9059 static inline __ATTRS_o_ai __vector unsigned long long 9060 vec_unsigned(__vector double __a) { 9061 return __builtin_convertvector(__a, __vector unsigned long long); 9062 } 9063 9064 #if __ARCH__ >= 13 9065 static inline __ATTRS_o_ai __vector unsigned int 9066 vec_unsigned(__vector float __a) { 9067 return __builtin_convertvector(__a, __vector unsigned int); 9068 } 9069 #endif 9070 9071 /*-- vec_roundp -------------------------------------------------------------*/ 9072 9073 #if __ARCH__ >= 12 9074 static inline __ATTRS_o_ai __vector float 9075 vec_roundp(__vector float __a) { 9076 return __builtin_s390_vfisb(__a, 4, 6); 9077 } 9078 #endif 9079 9080 static inline __ATTRS_o_ai __vector double 9081 vec_roundp(__vector double __a) { 9082 return __builtin_s390_vfidb(__a, 4, 6); 9083 } 9084 9085 /*-- vec_ceil ---------------------------------------------------------------*/ 9086 9087 #if __ARCH__ >= 12 9088 static inline __ATTRS_o_ai __vector float 9089 vec_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 9095 static inline __ATTRS_o_ai __vector double 9096 vec_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 9104 static inline __ATTRS_o_ai __vector float 9105 vec_roundm(__vector float __a) { 9106 return __builtin_s390_vfisb(__a, 4, 7); 9107 } 9108 #endif 9109 9110 static inline __ATTRS_o_ai __vector double 9111 vec_roundm(__vector double __a) { 9112 return __builtin_s390_vfidb(__a, 4, 7); 9113 } 9114 9115 /*-- vec_floor --------------------------------------------------------------*/ 9116 9117 #if __ARCH__ >= 12 9118 static inline __ATTRS_o_ai __vector float 9119 vec_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 9125 static inline __ATTRS_o_ai __vector double 9126 vec_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 9134 static inline __ATTRS_o_ai __vector float 9135 vec_roundz(__vector float __a) { 9136 return __builtin_s390_vfisb(__a, 4, 5); 9137 } 9138 #endif 9139 9140 static inline __ATTRS_o_ai __vector double 9141 vec_roundz(__vector double __a) { 9142 return __builtin_s390_vfidb(__a, 4, 5); 9143 } 9144 9145 /*-- vec_trunc --------------------------------------------------------------*/ 9146 9147 #if __ARCH__ >= 12 9148 static inline __ATTRS_o_ai __vector float 9149 vec_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 9155 static inline __ATTRS_o_ai __vector double 9156 vec_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 9164 static inline __ATTRS_o_ai __vector float 9165 vec_roundc(__vector float __a) { 9166 return __builtin_s390_vfisb(__a, 4, 0); 9167 } 9168 #endif 9169 9170 static inline __ATTRS_o_ai __vector double 9171 vec_roundc(__vector double __a) { 9172 return __builtin_s390_vfidb(__a, 4, 0); 9173 } 9174 9175 /*-- vec_rint ---------------------------------------------------------------*/ 9176 9177 #if __ARCH__ >= 12 9178 static inline __ATTRS_o_ai __vector float 9179 vec_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 9185 static inline __ATTRS_o_ai __vector double 9186 vec_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 9194 static inline __ATTRS_o_ai __vector float 9195 vec_round(__vector float __a) { 9196 return __builtin_s390_vfisb(__a, 4, 4); 9197 } 9198 #endif 9199 9200 static inline __ATTRS_o_ai __vector double 9201 vec_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 9208 extern __ATTRS_o __vector __bool int 9209 vec_fp_test_data_class(__vector float __a, int __b, int *__c) 9210 __constant_range(__b, 0, 4095); 9211 9212 extern __ATTRS_o __vector __bool long long 9213 vec_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 9264 static inline __ATTRS_o_ai __vector signed char 9265 vec_cp_until_zero(__vector signed char __a) { 9266 return ((__vector signed char) 9267 __builtin_s390_vistrb((__vector unsigned char)__a)); 9268 } 9269 9270 static inline __ATTRS_o_ai __vector __bool char 9271 vec_cp_until_zero(__vector __bool char __a) { 9272 return ((__vector __bool char) 9273 __builtin_s390_vistrb((__vector unsigned char)__a)); 9274 } 9275 9276 static inline __ATTRS_o_ai __vector unsigned char 9277 vec_cp_until_zero(__vector unsigned char __a) { 9278 return __builtin_s390_vistrb(__a); 9279 } 9280 9281 static inline __ATTRS_o_ai __vector signed short 9282 vec_cp_until_zero(__vector signed short __a) { 9283 return ((__vector signed short) 9284 __builtin_s390_vistrh((__vector unsigned short)__a)); 9285 } 9286 9287 static inline __ATTRS_o_ai __vector __bool short 9288 vec_cp_until_zero(__vector __bool short __a) { 9289 return ((__vector __bool short) 9290 __builtin_s390_vistrh((__vector unsigned short)__a)); 9291 } 9292 9293 static inline __ATTRS_o_ai __vector unsigned short 9294 vec_cp_until_zero(__vector unsigned short __a) { 9295 return __builtin_s390_vistrh(__a); 9296 } 9297 9298 static inline __ATTRS_o_ai __vector signed int 9299 vec_cp_until_zero(__vector signed int __a) { 9300 return ((__vector signed int) 9301 __builtin_s390_vistrf((__vector unsigned int)__a)); 9302 } 9303 9304 static inline __ATTRS_o_ai __vector __bool int 9305 vec_cp_until_zero(__vector __bool int __a) { 9306 return ((__vector __bool int) 9307 __builtin_s390_vistrf((__vector unsigned int)__a)); 9308 } 9309 9310 static inline __ATTRS_o_ai __vector unsigned int 9311 vec_cp_until_zero(__vector unsigned int __a) { 9312 return __builtin_s390_vistrf(__a); 9313 } 9314 9315 /*-- vec_cp_until_zero_cc ---------------------------------------------------*/ 9316 9317 static inline __ATTRS_o_ai __vector signed char 9318 vec_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 9323 static inline __ATTRS_o_ai __vector __bool char 9324 vec_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 9329 static inline __ATTRS_o_ai __vector unsigned char 9330 vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) { 9331 return __builtin_s390_vistrbs(__a, __cc); 9332 } 9333 9334 static inline __ATTRS_o_ai __vector signed short 9335 vec_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 9340 static inline __ATTRS_o_ai __vector __bool short 9341 vec_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 9346 static inline __ATTRS_o_ai __vector unsigned short 9347 vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) { 9348 return __builtin_s390_vistrhs(__a, __cc); 9349 } 9350 9351 static inline __ATTRS_o_ai __vector signed int 9352 vec_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 9357 static inline __ATTRS_o_ai __vector __bool int 9358 vec_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 9363 static inline __ATTRS_o_ai __vector unsigned int 9364 vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) { 9365 return __builtin_s390_vistrfs(__a, __cc); 9366 } 9367 9368 /*-- vec_cmpeq_idx ----------------------------------------------------------*/ 9369 9370 static inline __ATTRS_o_ai __vector signed char 9371 vec_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 9377 static inline __ATTRS_o_ai __vector unsigned char 9378 vec_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 9383 static inline __ATTRS_o_ai __vector unsigned char 9384 vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) { 9385 return __builtin_s390_vfeeb(__a, __b); 9386 } 9387 9388 static inline __ATTRS_o_ai __vector signed short 9389 vec_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 9395 static inline __ATTRS_o_ai __vector unsigned short 9396 vec_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 9401 static inline __ATTRS_o_ai __vector unsigned short 9402 vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) { 9403 return __builtin_s390_vfeeh(__a, __b); 9404 } 9405 9406 static inline __ATTRS_o_ai __vector signed int 9407 vec_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 9413 static inline __ATTRS_o_ai __vector unsigned int 9414 vec_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 9419 static inline __ATTRS_o_ai __vector unsigned int 9420 vec_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 9426 static inline __ATTRS_o_ai __vector signed char 9427 vec_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 9433 static inline __ATTRS_o_ai __vector unsigned char 9434 vec_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 9439 static inline __ATTRS_o_ai __vector unsigned char 9440 vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b, 9441 int *__cc) { 9442 return __builtin_s390_vfeebs(__a, __b, __cc); 9443 } 9444 9445 static inline __ATTRS_o_ai __vector signed short 9446 vec_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 9453 static inline __ATTRS_o_ai __vector unsigned short 9454 vec_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 9459 static inline __ATTRS_o_ai __vector unsigned short 9460 vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b, 9461 int *__cc) { 9462 return __builtin_s390_vfeehs(__a, __b, __cc); 9463 } 9464 9465 static inline __ATTRS_o_ai __vector signed int 9466 vec_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 9472 static inline __ATTRS_o_ai __vector unsigned int 9473 vec_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 9478 static inline __ATTRS_o_ai __vector unsigned int 9479 vec_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 9486 static inline __ATTRS_o_ai __vector signed char 9487 vec_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 9493 static inline __ATTRS_o_ai __vector unsigned char 9494 vec_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 9499 static inline __ATTRS_o_ai __vector unsigned char 9500 vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) { 9501 return __builtin_s390_vfeezb(__a, __b); 9502 } 9503 9504 static inline __ATTRS_o_ai __vector signed short 9505 vec_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 9511 static inline __ATTRS_o_ai __vector unsigned short 9512 vec_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 9517 static inline __ATTRS_o_ai __vector unsigned short 9518 vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) { 9519 return __builtin_s390_vfeezh(__a, __b); 9520 } 9521 9522 static inline __ATTRS_o_ai __vector signed int 9523 vec_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 9529 static inline __ATTRS_o_ai __vector unsigned int 9530 vec_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 9535 static inline __ATTRS_o_ai __vector unsigned int 9536 vec_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 9542 static inline __ATTRS_o_ai __vector signed char 9543 vec_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 9550 static inline __ATTRS_o_ai __vector unsigned char 9551 vec_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 9557 static inline __ATTRS_o_ai __vector unsigned char 9558 vec_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 9563 static inline __ATTRS_o_ai __vector signed short 9564 vec_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 9571 static inline __ATTRS_o_ai __vector unsigned short 9572 vec_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 9578 static inline __ATTRS_o_ai __vector unsigned short 9579 vec_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 9584 static inline __ATTRS_o_ai __vector signed int 9585 vec_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 9592 static inline __ATTRS_o_ai __vector unsigned int 9593 vec_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 9599 static inline __ATTRS_o_ai __vector unsigned int 9600 vec_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 9607 static inline __ATTRS_o_ai __vector signed char 9608 vec_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 9614 static inline __ATTRS_o_ai __vector unsigned char 9615 vec_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 9620 static inline __ATTRS_o_ai __vector unsigned char 9621 vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) { 9622 return __builtin_s390_vfeneb(__a, __b); 9623 } 9624 9625 static inline __ATTRS_o_ai __vector signed short 9626 vec_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 9632 static inline __ATTRS_o_ai __vector unsigned short 9633 vec_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 9638 static inline __ATTRS_o_ai __vector unsigned short 9639 vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) { 9640 return __builtin_s390_vfeneh(__a, __b); 9641 } 9642 9643 static inline __ATTRS_o_ai __vector signed int 9644 vec_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 9650 static inline __ATTRS_o_ai __vector unsigned int 9651 vec_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 9656 static inline __ATTRS_o_ai __vector unsigned int 9657 vec_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 9663 static inline __ATTRS_o_ai __vector signed char 9664 vec_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 9670 static inline __ATTRS_o_ai __vector unsigned char 9671 vec_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 9676 static inline __ATTRS_o_ai __vector unsigned char 9677 vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b, 9678 int *__cc) { 9679 return __builtin_s390_vfenebs(__a, __b, __cc); 9680 } 9681 9682 static inline __ATTRS_o_ai __vector signed short 9683 vec_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 9690 static inline __ATTRS_o_ai __vector unsigned short 9691 vec_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 9697 static inline __ATTRS_o_ai __vector unsigned short 9698 vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b, 9699 int *__cc) { 9700 return __builtin_s390_vfenehs(__a, __b, __cc); 9701 } 9702 9703 static inline __ATTRS_o_ai __vector signed int 9704 vec_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 9710 static inline __ATTRS_o_ai __vector unsigned int 9711 vec_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 9716 static inline __ATTRS_o_ai __vector unsigned int 9717 vec_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 9724 static inline __ATTRS_o_ai __vector signed char 9725 vec_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 9731 static inline __ATTRS_o_ai __vector unsigned char 9732 vec_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 9737 static inline __ATTRS_o_ai __vector unsigned char 9738 vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) { 9739 return __builtin_s390_vfenezb(__a, __b); 9740 } 9741 9742 static inline __ATTRS_o_ai __vector signed short 9743 vec_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 9749 static inline __ATTRS_o_ai __vector unsigned short 9750 vec_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 9755 static inline __ATTRS_o_ai __vector unsigned short 9756 vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) { 9757 return __builtin_s390_vfenezh(__a, __b); 9758 } 9759 9760 static inline __ATTRS_o_ai __vector signed int 9761 vec_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 9767 static inline __ATTRS_o_ai __vector unsigned int 9768 vec_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 9773 static inline __ATTRS_o_ai __vector unsigned int 9774 vec_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 9780 static inline __ATTRS_o_ai __vector signed char 9781 vec_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 9788 static inline __ATTRS_o_ai __vector unsigned char 9789 vec_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 9795 static inline __ATTRS_o_ai __vector unsigned char 9796 vec_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 9801 static inline __ATTRS_o_ai __vector signed short 9802 vec_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 9809 static inline __ATTRS_o_ai __vector unsigned short 9810 vec_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 9816 static inline __ATTRS_o_ai __vector unsigned short 9817 vec_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 9822 static inline __ATTRS_o_ai __vector signed int 9823 vec_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 9830 static inline __ATTRS_o_ai __vector unsigned int 9831 vec_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 9837 static inline __ATTRS_o_ai __vector unsigned int 9838 vec_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 9845 static inline __ATTRS_o_ai __vector __bool char 9846 vec_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 9851 static inline __ATTRS_o_ai __vector __bool short 9852 vec_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 9857 static inline __ATTRS_o_ai __vector __bool int 9858 vec_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 9865 static inline __ATTRS_o_ai __vector __bool char 9866 vec_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 9871 static inline __ATTRS_o_ai __vector __bool short 9872 vec_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 9877 static inline __ATTRS_o_ai __vector __bool int 9878 vec_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 9885 static inline __ATTRS_o_ai __vector unsigned char 9886 vec_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 9891 static inline __ATTRS_o_ai __vector unsigned short 9892 vec_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 9897 static inline __ATTRS_o_ai __vector unsigned int 9898 vec_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 9905 static inline __ATTRS_o_ai __vector unsigned char 9906 vec_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 9911 static inline __ATTRS_o_ai __vector unsigned short 9912 vec_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 9917 static inline __ATTRS_o_ai __vector unsigned int 9918 vec_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 9925 static inline __ATTRS_o_ai __vector unsigned char 9926 vec_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 9931 static inline __ATTRS_o_ai __vector unsigned short 9932 vec_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 9937 static inline __ATTRS_o_ai __vector unsigned int 9938 vec_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 9945 static inline __ATTRS_o_ai __vector unsigned char 9946 vec_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 9951 static inline __ATTRS_o_ai __vector unsigned short 9952 vec_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 9957 static inline __ATTRS_o_ai __vector unsigned int 9958 vec_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 9965 static inline __ATTRS_o_ai __vector __bool char 9966 vec_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 9971 static inline __ATTRS_o_ai __vector __bool short 9972 vec_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 9977 static inline __ATTRS_o_ai __vector __bool int 9978 vec_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 9985 static inline __ATTRS_o_ai __vector __bool char 9986 vec_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 9992 static inline __ATTRS_o_ai __vector __bool short 9993 vec_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 9999 static inline __ATTRS_o_ai __vector __bool int 10000 vec_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 10008 static inline __ATTRS_o_ai __vector unsigned char 10009 vec_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 10014 static inline __ATTRS_o_ai __vector unsigned short 10015 vec_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 10020 static inline __ATTRS_o_ai __vector unsigned int 10021 vec_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 10028 static inline __ATTRS_o_ai __vector unsigned char 10029 vec_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 10034 static inline __ATTRS_o_ai __vector unsigned short 10035 vec_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 10040 static inline __ATTRS_o_ai __vector unsigned int 10041 vec_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 10048 static inline __ATTRS_o_ai __vector unsigned char 10049 vec_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 10054 static inline __ATTRS_o_ai __vector unsigned short 10055 vec_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 10060 static inline __ATTRS_o_ai __vector unsigned int 10061 vec_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 10068 static inline __ATTRS_o_ai __vector unsigned char 10069 vec_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 10075 static inline __ATTRS_o_ai __vector unsigned short 10076 vec_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 10082 static inline __ATTRS_o_ai __vector unsigned int 10083 vec_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 10091 static inline __ATTRS_o_ai __vector __bool char 10092 vec_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 10098 static inline __ATTRS_o_ai __vector __bool char 10099 vec_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 10105 static inline __ATTRS_o_ai __vector __bool char 10106 vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) { 10107 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4); 10108 } 10109 10110 static inline __ATTRS_o_ai __vector __bool short 10111 vec_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 10117 static inline __ATTRS_o_ai __vector __bool short 10118 vec_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 10124 static inline __ATTRS_o_ai __vector __bool short 10125 vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) { 10126 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4); 10127 } 10128 10129 static inline __ATTRS_o_ai __vector __bool int 10130 vec_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 10136 static inline __ATTRS_o_ai __vector __bool int 10137 vec_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 10143 static inline __ATTRS_o_ai __vector __bool int 10144 vec_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 10150 static inline __ATTRS_o_ai __vector __bool char 10151 vec_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 10158 static inline __ATTRS_o_ai __vector __bool char 10159 vec_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 10166 static inline __ATTRS_o_ai __vector __bool char 10167 vec_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 10172 static inline __ATTRS_o_ai __vector __bool short 10173 vec_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 10180 static inline __ATTRS_o_ai __vector __bool short 10181 vec_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 10188 static inline __ATTRS_o_ai __vector __bool short 10189 vec_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 10194 static inline __ATTRS_o_ai __vector __bool int 10195 vec_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 10202 static inline __ATTRS_o_ai __vector __bool int 10203 vec_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 10210 static inline __ATTRS_o_ai __vector __bool int 10211 vec_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 10218 static inline __ATTRS_o_ai __vector signed char 10219 vec_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 10225 static inline __ATTRS_o_ai __vector unsigned char 10226 vec_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 10231 static inline __ATTRS_o_ai __vector unsigned char 10232 vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) { 10233 return __builtin_s390_vfaeb(__a, __b, 0); 10234 } 10235 10236 static inline __ATTRS_o_ai __vector signed short 10237 vec_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 10243 static inline __ATTRS_o_ai __vector unsigned short 10244 vec_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 10249 static inline __ATTRS_o_ai __vector unsigned short 10250 vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) { 10251 return __builtin_s390_vfaeh(__a, __b, 0); 10252 } 10253 10254 static inline __ATTRS_o_ai __vector signed int 10255 vec_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 10261 static inline __ATTRS_o_ai __vector unsigned int 10262 vec_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 10267 static inline __ATTRS_o_ai __vector unsigned int 10268 vec_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 10274 static inline __ATTRS_o_ai __vector signed char 10275 vec_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 10282 static inline __ATTRS_o_ai __vector unsigned char 10283 vec_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 10289 static inline __ATTRS_o_ai __vector unsigned char 10290 vec_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 10295 static inline __ATTRS_o_ai __vector signed short 10296 vec_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 10303 static inline __ATTRS_o_ai __vector unsigned short 10304 vec_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 10310 static inline __ATTRS_o_ai __vector unsigned short 10311 vec_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 10316 static inline __ATTRS_o_ai __vector signed int 10317 vec_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 10324 static inline __ATTRS_o_ai __vector unsigned int 10325 vec_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 10331 static inline __ATTRS_o_ai __vector unsigned int 10332 vec_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 10339 static inline __ATTRS_o_ai __vector signed char 10340 vec_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 10347 static inline __ATTRS_o_ai __vector unsigned char 10348 vec_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 10354 static inline __ATTRS_o_ai __vector unsigned char 10355 vec_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 10360 static inline __ATTRS_o_ai __vector signed short 10361 vec_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 10368 static inline __ATTRS_o_ai __vector unsigned short 10369 vec_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 10375 static inline __ATTRS_o_ai __vector unsigned short 10376 vec_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 10381 static inline __ATTRS_o_ai __vector signed int 10382 vec_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 10389 static inline __ATTRS_o_ai __vector unsigned int 10390 vec_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 10396 static inline __ATTRS_o_ai __vector unsigned int 10397 vec_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 10404 static inline __ATTRS_o_ai __vector signed char 10405 vec_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 10412 static inline __ATTRS_o_ai __vector unsigned char 10413 vec_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 10419 static inline __ATTRS_o_ai __vector unsigned char 10420 vec_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 10425 static inline __ATTRS_o_ai __vector signed short 10426 vec_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 10433 static inline __ATTRS_o_ai __vector unsigned short 10434 vec_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 10440 static inline __ATTRS_o_ai __vector unsigned short 10441 vec_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 10446 static inline __ATTRS_o_ai __vector signed int 10447 vec_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 10454 static inline __ATTRS_o_ai __vector unsigned int 10455 vec_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 10461 static inline __ATTRS_o_ai __vector unsigned int 10462 vec_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 10469 static inline __ATTRS_o_ai __vector __bool char 10470 vec_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 10476 static inline __ATTRS_o_ai __vector __bool char 10477 vec_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 10483 static inline __ATTRS_o_ai __vector __bool char 10484 vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) { 10485 return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12); 10486 } 10487 10488 static inline __ATTRS_o_ai __vector __bool short 10489 vec_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 10495 static inline __ATTRS_o_ai __vector __bool short 10496 vec_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 10502 static inline __ATTRS_o_ai __vector __bool short 10503 vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) { 10504 return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12); 10505 } 10506 10507 static inline __ATTRS_o_ai __vector __bool int 10508 vec_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 10514 static inline __ATTRS_o_ai __vector __bool int 10515 vec_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 10521 static inline __ATTRS_o_ai __vector __bool int 10522 vec_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 10528 static inline __ATTRS_o_ai __vector __bool char 10529 vec_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 10536 static inline __ATTRS_o_ai __vector __bool char 10537 vec_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 10544 static inline __ATTRS_o_ai __vector __bool char 10545 vec_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 10550 static inline __ATTRS_o_ai __vector __bool short 10551 vec_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 10558 static inline __ATTRS_o_ai __vector __bool short 10559 vec_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 10566 static inline __ATTRS_o_ai __vector __bool short 10567 vec_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 10572 static inline __ATTRS_o_ai __vector __bool int 10573 vec_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 10580 static inline __ATTRS_o_ai __vector __bool int 10581 vec_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 10588 static inline __ATTRS_o_ai __vector __bool int 10589 vec_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 10596 static inline __ATTRS_o_ai __vector signed char 10597 vec_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 10603 static inline __ATTRS_o_ai __vector unsigned char 10604 vec_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 10609 static inline __ATTRS_o_ai __vector unsigned char 10610 vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) { 10611 return __builtin_s390_vfaeb(__a, __b, 8); 10612 } 10613 10614 static inline __ATTRS_o_ai __vector signed short 10615 vec_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 10621 static inline __ATTRS_o_ai __vector unsigned short 10622 vec_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 10627 static inline __ATTRS_o_ai __vector unsigned short 10628 vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) { 10629 return __builtin_s390_vfaeh(__a, __b, 8); 10630 } 10631 10632 static inline __ATTRS_o_ai __vector signed int 10633 vec_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 10639 static inline __ATTRS_o_ai __vector unsigned int 10640 vec_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 10645 static inline __ATTRS_o_ai __vector unsigned int 10646 vec_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 10652 static inline __ATTRS_o_ai __vector signed char 10653 vec_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 10660 static inline __ATTRS_o_ai __vector unsigned char 10661 vec_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 10667 static inline __ATTRS_o_ai __vector unsigned char 10668 vec_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 10674 static inline __ATTRS_o_ai __vector signed short 10675 vec_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 10682 static inline __ATTRS_o_ai __vector unsigned short 10683 vec_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 10689 static inline __ATTRS_o_ai __vector unsigned short 10690 vec_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 10695 static inline __ATTRS_o_ai __vector signed int 10696 vec_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 10703 static inline __ATTRS_o_ai __vector unsigned int 10704 vec_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 10710 static inline __ATTRS_o_ai __vector unsigned int 10711 vec_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 10718 static inline __ATTRS_o_ai __vector signed char 10719 vec_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 10726 static inline __ATTRS_o_ai __vector unsigned char 10727 vec_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 10733 static inline __ATTRS_o_ai __vector unsigned char 10734 vec_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 10739 static inline __ATTRS_o_ai __vector signed short 10740 vec_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 10747 static inline __ATTRS_o_ai __vector unsigned short 10748 vec_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 10754 static inline __ATTRS_o_ai __vector unsigned short 10755 vec_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 10760 static inline __ATTRS_o_ai __vector signed int 10761 vec_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 10768 static inline __ATTRS_o_ai __vector unsigned int 10769 vec_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 10775 static inline __ATTRS_o_ai __vector unsigned int 10776 vec_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 10783 static inline __ATTRS_o_ai __vector signed char 10784 vec_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 10791 static inline __ATTRS_o_ai __vector unsigned char 10792 vec_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 10798 static inline __ATTRS_o_ai __vector unsigned char 10799 vec_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 10804 static inline __ATTRS_o_ai __vector signed short 10805 vec_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 10812 static inline __ATTRS_o_ai __vector unsigned short 10813 vec_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 10819 static inline __ATTRS_o_ai __vector unsigned short 10820 vec_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 10825 static inline __ATTRS_o_ai __vector signed int 10826 vec_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 10833 static inline __ATTRS_o_ai __vector unsigned int 10834 vec_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 10840 static inline __ATTRS_o_ai __vector unsigned int 10841 vec_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 10850 static inline __ATTRS_o_ai __vector unsigned char 10851 vec_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 10857 static inline __ATTRS_o_ai __vector unsigned char 10858 vec_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 10864 static inline __ATTRS_o_ai __vector unsigned char 10865 vec_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 10870 static inline __ATTRS_o_ai __vector unsigned char 10871 vec_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 10877 static inline __ATTRS_o_ai __vector unsigned char 10878 vec_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 10884 static inline __ATTRS_o_ai __vector unsigned char 10885 vec_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 10890 static inline __ATTRS_o_ai __vector unsigned char 10891 vec_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 10897 static inline __ATTRS_o_ai __vector unsigned char 10898 vec_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 10904 static inline __ATTRS_o_ai __vector unsigned char 10905 vec_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 10916 static inline __ATTRS_o_ai __vector unsigned char 10917 vec_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 10924 static inline __ATTRS_o_ai __vector unsigned char 10925 vec_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 10932 static inline __ATTRS_o_ai __vector unsigned char 10933 vec_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 10939 static inline __ATTRS_o_ai __vector unsigned char 10940 vec_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 10947 static inline __ATTRS_o_ai __vector unsigned char 10948 vec_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 10955 static inline __ATTRS_o_ai __vector unsigned char 10956 vec_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 10962 static inline __ATTRS_o_ai __vector unsigned char 10963 vec_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 10970 static inline __ATTRS_o_ai __vector unsigned char 10971 vec_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 10978 static inline __ATTRS_o_ai __vector unsigned char 10979 vec_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