diff options
Diffstat (limited to 'clang/lib/Headers')
44 files changed, 9906 insertions, 5151 deletions
diff --git a/clang/lib/Headers/__clang_cuda_cmath.h b/clang/lib/Headers/__clang_cuda_cmath.h index 834a2e3fd134..8ba182689a4f 100644 --- a/clang/lib/Headers/__clang_cuda_cmath.h +++ b/clang/lib/Headers/__clang_cuda_cmath.h @@ -12,7 +12,9 @@ #error "This file is for CUDA compilation only." #endif +#ifndef __OPENMP_NVPTX__ #include <limits> +#endif // CUDA lets us use various std math functions on the device side. This file // works in concert with __clang_cuda_math_forward_declares.h to make this work. @@ -30,32 +32,16 @@ // implementation. Declaring in the global namespace and pulling into namespace // std covers all of the known knowns. -#ifdef _OPENMP -#define __DEVICE__ static __attribute__((always_inline)) +#ifdef __OPENMP_NVPTX__ +#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow)) #else #define __DEVICE__ static __device__ __inline__ __attribute__((always_inline)) #endif -// For C++ 17 we need to include noexcept attribute to be compatible -// with the header-defined version. This may be removed once -// variant is supported. -#if defined(_OPENMP) && defined(__cplusplus) && __cplusplus >= 201703L -#define __NOEXCEPT noexcept -#else -#define __NOEXCEPT -#endif - -#if !(defined(_OPENMP) && defined(__cplusplus)) __DEVICE__ long long abs(long long __n) { return ::llabs(__n); } __DEVICE__ long abs(long __n) { return ::labs(__n); } __DEVICE__ float abs(float __x) { return ::fabsf(__x); } __DEVICE__ double abs(double __x) { return ::fabs(__x); } -#endif -// TODO: remove once variat is supported. -#if defined(_OPENMP) && defined(__cplusplus) -__DEVICE__ const float abs(const float __x) { return ::fabsf((float)__x); } -__DEVICE__ const double abs(const double __x) { return ::fabs((double)__x); } -#endif __DEVICE__ float acos(float __x) { return ::acosf(__x); } __DEVICE__ float asin(float __x) { return ::asinf(__x); } __DEVICE__ float atan(float __x) { return ::atanf(__x); } @@ -64,11 +50,9 @@ __DEVICE__ float ceil(float __x) { return ::ceilf(__x); } __DEVICE__ float cos(float __x) { return ::cosf(__x); } __DEVICE__ float cosh(float __x) { return ::coshf(__x); } __DEVICE__ float exp(float __x) { return ::expf(__x); } -__DEVICE__ float fabs(float __x) __NOEXCEPT { return ::fabsf(__x); } +__DEVICE__ float fabs(float __x) { return ::fabsf(__x); } __DEVICE__ float floor(float __x) { return ::floorf(__x); } __DEVICE__ float fmod(float __x, float __y) { return ::fmodf(__x, __y); } -// TODO: remove when variant is supported -#ifndef _OPENMP __DEVICE__ int fpclassify(float __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); @@ -77,14 +61,15 @@ __DEVICE__ int fpclassify(double __x) { return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, __x); } -#endif __DEVICE__ float frexp(float __arg, int *__exp) { return ::frexpf(__arg, __exp); } // For inscrutable reasons, the CUDA headers define these functions for us on -// Windows. -#ifndef _MSC_VER +// Windows. For OpenMP we omit these as some old system headers have +// non-conforming `isinf(float)` and `isnan(float)` implementations that return +// an `int`. The system versions of these functions should be fine anyway. +#if !defined(_MSC_VER) && !defined(__OPENMP_NVPTX__) __DEVICE__ bool isinf(float __x) { return ::__isinff(__x); } __DEVICE__ bool isinf(double __x) { return ::__isinf(__x); } __DEVICE__ bool isfinite(float __x) { return ::__finitef(__x); } @@ -161,6 +146,8 @@ __DEVICE__ float tanh(float __x) { return ::tanhf(__x); } // libdevice doesn't provide an implementation, and we don't want to be in the // business of implementing tricky libm functions in this header. +#ifndef __OPENMP_NVPTX__ + // Now we've defined everything we promised we'd define in // __clang_cuda_math_forward_declares.h. We need to do two additional things to // fix up our math functions. @@ -457,10 +444,7 @@ using ::remainderf; using ::remquof; using ::rintf; using ::roundf; -// TODO: remove once variant is supported -#ifndef _OPENMP using ::scalblnf; -#endif using ::scalbnf; using ::sinf; using ::sinhf; @@ -479,7 +463,8 @@ _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif -#undef __NOEXCEPT +#endif // __OPENMP_NVPTX__ + #undef __DEVICE__ #endif diff --git a/clang/lib/Headers/__clang_cuda_complex_builtins.h b/clang/lib/Headers/__clang_cuda_complex_builtins.h index 576a958b16bb..8c10ff6b461f 100644 --- a/clang/lib/Headers/__clang_cuda_complex_builtins.h +++ b/clang/lib/Headers/__clang_cuda_complex_builtins.h @@ -13,10 +13,57 @@ // This header defines __muldc3, __mulsc3, __divdc3, and __divsc3. These are // libgcc functions that clang assumes are available when compiling c99 complex // operations. (These implementations come from libc++, and have been modified -// to work with CUDA.) +// to work with CUDA and OpenMP target offloading [in C and C++ mode].) -extern "C" inline __device__ double _Complex __muldc3(double __a, double __b, - double __c, double __d) { +#pragma push_macro("__DEVICE__") +#ifdef _OPENMP +#pragma omp declare target +#define __DEVICE__ __attribute__((noinline, nothrow, cold, weak)) +#else +#define __DEVICE__ __device__ inline +#endif + +// To make the algorithms available for C and C++ in CUDA and OpenMP we select +// different but equivalent function versions. TODO: For OpenMP we currently +// select the native builtins as the overload support for templates is lacking. +#if !defined(_OPENMP) +#define _ISNANd std::isnan +#define _ISNANf std::isnan +#define _ISINFd std::isinf +#define _ISINFf std::isinf +#define _ISFINITEd std::isfinite +#define _ISFINITEf std::isfinite +#define _COPYSIGNd std::copysign +#define _COPYSIGNf std::copysign +#define _SCALBNd std::scalbn +#define _SCALBNf std::scalbn +#define _ABSd std::abs +#define _ABSf std::abs +#define _LOGBd std::logb +#define _LOGBf std::logb +#else +#define _ISNANd __nv_isnand +#define _ISNANf __nv_isnanf +#define _ISINFd __nv_isinfd +#define _ISINFf __nv_isinff +#define _ISFINITEd __nv_isfinited +#define _ISFINITEf __nv_finitef +#define _COPYSIGNd __nv_copysign +#define _COPYSIGNf __nv_copysignf +#define _SCALBNd __nv_scalbn +#define _SCALBNf __nv_scalbnf +#define _ABSd __nv_fabs +#define _ABSf __nv_fabsf +#define _LOGBd __nv_logb +#define _LOGBf __nv_logbf +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + +__DEVICE__ double _Complex __muldc3(double __a, double __b, double __c, + double __d) { double __ac = __a * __c; double __bd = __b * __d; double __ad = __a * __d; @@ -24,50 +71,49 @@ extern "C" inline __device__ double _Complex __muldc3(double __a, double __b, double _Complex z; __real__(z) = __ac - __bd; __imag__(z) = __ad + __bc; - if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) { + if (_ISNANd(__real__(z)) && _ISNANd(__imag__(z))) { int __recalc = 0; - if (std::isinf(__a) || std::isinf(__b)) { - __a = std::copysign(std::isinf(__a) ? 1 : 0, __a); - __b = std::copysign(std::isinf(__b) ? 1 : 0, __b); - if (std::isnan(__c)) - __c = std::copysign(0, __c); - if (std::isnan(__d)) - __d = std::copysign(0, __d); + if (_ISINFd(__a) || _ISINFd(__b)) { + __a = _COPYSIGNd(_ISINFd(__a) ? 1 : 0, __a); + __b = _COPYSIGNd(_ISINFd(__b) ? 1 : 0, __b); + if (_ISNANd(__c)) + __c = _COPYSIGNd(0, __c); + if (_ISNANd(__d)) + __d = _COPYSIGNd(0, __d); __recalc = 1; } - if (std::isinf(__c) || std::isinf(__d)) { - __c = std::copysign(std::isinf(__c) ? 1 : 0, __c); - __d = std::copysign(std::isinf(__d) ? 1 : 0, __d); - if (std::isnan(__a)) - __a = std::copysign(0, __a); - if (std::isnan(__b)) - __b = std::copysign(0, __b); + if (_ISINFd(__c) || _ISINFd(__d)) { + __c = _COPYSIGNd(_ISINFd(__c) ? 1 : 0, __c); + __d = _COPYSIGNd(_ISINFd(__d) ? 1 : 0, __d); + if (_ISNANd(__a)) + __a = _COPYSIGNd(0, __a); + if (_ISNANd(__b)) + __b = _COPYSIGNd(0, __b); __recalc = 1; } - if (!__recalc && (std::isinf(__ac) || std::isinf(__bd) || - std::isinf(__ad) || std::isinf(__bc))) { - if (std::isnan(__a)) - __a = std::copysign(0, __a); - if (std::isnan(__b)) - __b = std::copysign(0, __b); - if (std::isnan(__c)) - __c = std::copysign(0, __c); - if (std::isnan(__d)) - __d = std::copysign(0, __d); + if (!__recalc && + (_ISINFd(__ac) || _ISINFd(__bd) || _ISINFd(__ad) || _ISINFd(__bc))) { + if (_ISNANd(__a)) + __a = _COPYSIGNd(0, __a); + if (_ISNANd(__b)) + __b = _COPYSIGNd(0, __b); + if (_ISNANd(__c)) + __c = _COPYSIGNd(0, __c); + if (_ISNANd(__d)) + __d = _COPYSIGNd(0, __d); __recalc = 1; } if (__recalc) { // Can't use std::numeric_limits<double>::infinity() -- that doesn't have // a device overload (and isn't constexpr before C++11, naturally). - __real__(z) = __builtin_huge_valf() * (__a * __c - __b * __d); - __imag__(z) = __builtin_huge_valf() * (__a * __d + __b * __c); + __real__(z) = __builtin_huge_val() * (__a * __c - __b * __d); + __imag__(z) = __builtin_huge_val() * (__a * __d + __b * __c); } } return z; } -extern "C" inline __device__ float _Complex __mulsc3(float __a, float __b, - float __c, float __d) { +__DEVICE__ float _Complex __mulsc3(float __a, float __b, float __c, float __d) { float __ac = __a * __c; float __bd = __b * __d; float __ad = __a * __d; @@ -75,36 +121,36 @@ extern "C" inline __device__ float _Complex __mulsc3(float __a, float __b, float _Complex z; __real__(z) = __ac - __bd; __imag__(z) = __ad + __bc; - if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) { + if (_ISNANf(__real__(z)) && _ISNANf(__imag__(z))) { int __recalc = 0; - if (std::isinf(__a) || std::isinf(__b)) { - __a = std::copysign(std::isinf(__a) ? 1 : 0, __a); - __b = std::copysign(std::isinf(__b) ? 1 : 0, __b); - if (std::isnan(__c)) - __c = std::copysign(0, __c); - if (std::isnan(__d)) - __d = std::copysign(0, __d); + if (_ISINFf(__a) || _ISINFf(__b)) { + __a = _COPYSIGNf(_ISINFf(__a) ? 1 : 0, __a); + __b = _COPYSIGNf(_ISINFf(__b) ? 1 : 0, __b); + if (_ISNANf(__c)) + __c = _COPYSIGNf(0, __c); + if (_ISNANf(__d)) + __d = _COPYSIGNf(0, __d); __recalc = 1; } - if (std::isinf(__c) || std::isinf(__d)) { - __c = std::copysign(std::isinf(__c) ? 1 : 0, __c); - __d = std::copysign(std::isinf(__d) ? 1 : 0, __d); - if (std::isnan(__a)) - __a = std::copysign(0, __a); - if (std::isnan(__b)) - __b = std::copysign(0, __b); + if (_ISINFf(__c) || _ISINFf(__d)) { + __c = _COPYSIGNf(_ISINFf(__c) ? 1 : 0, __c); + __d = _COPYSIGNf(_ISINFf(__d) ? 1 : 0, __d); + if (_ISNANf(__a)) + __a = _COPYSIGNf(0, __a); + if (_ISNANf(__b)) + __b = _COPYSIGNf(0, __b); __recalc = 1; } - if (!__recalc && (std::isinf(__ac) || std::isinf(__bd) || - std::isinf(__ad) || std::isinf(__bc))) { - if (std::isnan(__a)) - __a = std::copysign(0, __a); - if (std::isnan(__b)) - __b = std::copysign(0, __b); - if (std::isnan(__c)) - __c = std::copysign(0, __c); - if (std::isnan(__d)) - __d = std::copysign(0, __d); + if (!__recalc && + (_ISINFf(__ac) || _ISINFf(__bd) || _ISINFf(__ad) || _ISINFf(__bc))) { + if (_ISNANf(__a)) + __a = _COPYSIGNf(0, __a); + if (_ISNANf(__b)) + __b = _COPYSIGNf(0, __b); + if (_ISNANf(__c)) + __c = _COPYSIGNf(0, __c); + if (_ISNANf(__d)) + __d = _COPYSIGNf(0, __d); __recalc = 1; } if (__recalc) { @@ -115,36 +161,36 @@ extern "C" inline __device__ float _Complex __mulsc3(float __a, float __b, return z; } -extern "C" inline __device__ double _Complex __divdc3(double __a, double __b, - double __c, double __d) { +__DEVICE__ double _Complex __divdc3(double __a, double __b, double __c, + double __d) { int __ilogbw = 0; // Can't use std::max, because that's defined in <algorithm>, and we don't // want to pull that in for every compile. The CUDA headers define // ::max(float, float) and ::max(double, double), which is sufficient for us. - double __logbw = std::logb(max(std::abs(__c), std::abs(__d))); - if (std::isfinite(__logbw)) { + double __logbw = _LOGBd(max(_ABSd(__c), _ABSd(__d))); + if (_ISFINITEd(__logbw)) { __ilogbw = (int)__logbw; - __c = std::scalbn(__c, -__ilogbw); - __d = std::scalbn(__d, -__ilogbw); + __c = _SCALBNd(__c, -__ilogbw); + __d = _SCALBNd(__d, -__ilogbw); } double __denom = __c * __c + __d * __d; double _Complex z; - __real__(z) = std::scalbn((__a * __c + __b * __d) / __denom, -__ilogbw); - __imag__(z) = std::scalbn((__b * __c - __a * __d) / __denom, -__ilogbw); - if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) { - if ((__denom == 0.0) && (!std::isnan(__a) || !std::isnan(__b))) { - __real__(z) = std::copysign(__builtin_huge_valf(), __c) * __a; - __imag__(z) = std::copysign(__builtin_huge_valf(), __c) * __b; - } else if ((std::isinf(__a) || std::isinf(__b)) && std::isfinite(__c) && - std::isfinite(__d)) { - __a = std::copysign(std::isinf(__a) ? 1.0 : 0.0, __a); - __b = std::copysign(std::isinf(__b) ? 1.0 : 0.0, __b); - __real__(z) = __builtin_huge_valf() * (__a * __c + __b * __d); - __imag__(z) = __builtin_huge_valf() * (__b * __c - __a * __d); - } else if (std::isinf(__logbw) && __logbw > 0.0 && std::isfinite(__a) && - std::isfinite(__b)) { - __c = std::copysign(std::isinf(__c) ? 1.0 : 0.0, __c); - __d = std::copysign(std::isinf(__d) ? 1.0 : 0.0, __d); + __real__(z) = _SCALBNd((__a * __c + __b * __d) / __denom, -__ilogbw); + __imag__(z) = _SCALBNd((__b * __c - __a * __d) / __denom, -__ilogbw); + if (_ISNANd(__real__(z)) && _ISNANd(__imag__(z))) { + if ((__denom == 0.0) && (!_ISNANd(__a) || !_ISNANd(__b))) { + __real__(z) = _COPYSIGNd(__builtin_huge_val(), __c) * __a; + __imag__(z) = _COPYSIGNd(__builtin_huge_val(), __c) * __b; + } else if ((_ISINFd(__a) || _ISINFd(__b)) && _ISFINITEd(__c) && + _ISFINITEd(__d)) { + __a = _COPYSIGNd(_ISINFd(__a) ? 1.0 : 0.0, __a); + __b = _COPYSIGNd(_ISINFd(__b) ? 1.0 : 0.0, __b); + __real__(z) = __builtin_huge_val() * (__a * __c + __b * __d); + __imag__(z) = __builtin_huge_val() * (__b * __c - __a * __d); + } else if (_ISINFd(__logbw) && __logbw > 0.0 && _ISFINITEd(__a) && + _ISFINITEd(__b)) { + __c = _COPYSIGNd(_ISINFd(__c) ? 1.0 : 0.0, __c); + __d = _COPYSIGNd(_ISINFd(__d) ? 1.0 : 0.0, __d); __real__(z) = 0.0 * (__a * __c + __b * __d); __imag__(z) = 0.0 * (__b * __c - __a * __d); } @@ -152,33 +198,32 @@ extern "C" inline __device__ double _Complex __divdc3(double __a, double __b, return z; } -extern "C" inline __device__ float _Complex __divsc3(float __a, float __b, - float __c, float __d) { +__DEVICE__ float _Complex __divsc3(float __a, float __b, float __c, float __d) { int __ilogbw = 0; - float __logbw = std::logb(max(std::abs(__c), std::abs(__d))); - if (std::isfinite(__logbw)) { + float __logbw = _LOGBf(max(_ABSf(__c), _ABSf(__d))); + if (_ISFINITEf(__logbw)) { __ilogbw = (int)__logbw; - __c = std::scalbn(__c, -__ilogbw); - __d = std::scalbn(__d, -__ilogbw); + __c = _SCALBNf(__c, -__ilogbw); + __d = _SCALBNf(__d, -__ilogbw); } float __denom = __c * __c + __d * __d; float _Complex z; - __real__(z) = std::scalbn((__a * __c + __b * __d) / __denom, -__ilogbw); - __imag__(z) = std::scalbn((__b * __c - __a * __d) / __denom, -__ilogbw); - if (std::isnan(__real__(z)) && std::isnan(__imag__(z))) { - if ((__denom == 0) && (!std::isnan(__a) || !std::isnan(__b))) { - __real__(z) = std::copysign(__builtin_huge_valf(), __c) * __a; - __imag__(z) = std::copysign(__builtin_huge_valf(), __c) * __b; - } else if ((std::isinf(__a) || std::isinf(__b)) && std::isfinite(__c) && - std::isfinite(__d)) { - __a = std::copysign(std::isinf(__a) ? 1 : 0, __a); - __b = std::copysign(std::isinf(__b) ? 1 : 0, __b); + __real__(z) = _SCALBNf((__a * __c + __b * __d) / __denom, -__ilogbw); + __imag__(z) = _SCALBNf((__b * __c - __a * __d) / __denom, -__ilogbw); + if (_ISNANf(__real__(z)) && _ISNANf(__imag__(z))) { + if ((__denom == 0) && (!_ISNANf(__a) || !_ISNANf(__b))) { + __real__(z) = _COPYSIGNf(__builtin_huge_valf(), __c) * __a; + __imag__(z) = _COPYSIGNf(__builtin_huge_valf(), __c) * __b; + } else if ((_ISINFf(__a) || _ISINFf(__b)) && _ISFINITEf(__c) && + _ISFINITEf(__d)) { + __a = _COPYSIGNf(_ISINFf(__a) ? 1 : 0, __a); + __b = _COPYSIGNf(_ISINFf(__b) ? 1 : 0, __b); __real__(z) = __builtin_huge_valf() * (__a * __c + __b * __d); __imag__(z) = __builtin_huge_valf() * (__b * __c - __a * __d); - } else if (std::isinf(__logbw) && __logbw > 0 && std::isfinite(__a) && - std::isfinite(__b)) { - __c = std::copysign(std::isinf(__c) ? 1 : 0, __c); - __d = std::copysign(std::isinf(__d) ? 1 : 0, __d); + } else if (_ISINFf(__logbw) && __logbw > 0 && _ISFINITEf(__a) && + _ISFINITEf(__b)) { + __c = _COPYSIGNf(_ISINFf(__c) ? 1 : 0, __c); + __d = _COPYSIGNf(_ISINFf(__d) ? 1 : 0, __d); __real__(z) = 0 * (__a * __c + __b * __d); __imag__(z) = 0 * (__b * __c - __a * __d); } @@ -186,4 +231,29 @@ extern "C" inline __device__ float _Complex __divsc3(float __a, float __b, return z; } +#if defined(__cplusplus) +} // extern "C" +#endif + +#undef _ISNANd +#undef _ISNANf +#undef _ISINFd +#undef _ISINFf +#undef _COPYSIGNd +#undef _COPYSIGNf +#undef _ISFINITEd +#undef _ISFINITEf +#undef _SCALBNd +#undef _SCALBNf +#undef _ABSd +#undef _ABSf +#undef _LOGBd +#undef _LOGBf + +#ifdef _OPENMP +#pragma omp end declare target +#endif + +#pragma pop_macro("__DEVICE__") + #endif // __CLANG_CUDA_COMPLEX_BUILTINS diff --git a/clang/lib/Headers/__clang_cuda_device_functions.h b/clang/lib/Headers/__clang_cuda_device_functions.h index 50ad674f9483..f801e5426aa4 100644 --- a/clang/lib/Headers/__clang_cuda_device_functions.h +++ b/clang/lib/Headers/__clang_cuda_device_functions.h @@ -10,7 +10,7 @@ #ifndef __CLANG_CUDA_DEVICE_FUNCTIONS_H__ #define __CLANG_CUDA_DEVICE_FUNCTIONS_H__ -#ifndef _OPENMP +#ifndef __OPENMP_NVPTX__ #if CUDA_VERSION < 9000 #error This file is intended to be used with CUDA-9+ only. #endif @@ -20,32 +20,12 @@ // we implement in this file. We need static in order to avoid emitting unused // functions and __forceinline__ helps inlining these wrappers at -O1. #pragma push_macro("__DEVICE__") -#ifdef _OPENMP -#define __DEVICE__ static __attribute__((always_inline)) +#ifdef __OPENMP_NVPTX__ +#define __DEVICE__ static __attribute__((always_inline, nothrow)) #else #define __DEVICE__ static __device__ __forceinline__ #endif -// libdevice provides fast low precision and slow full-recision implementations -// for some functions. Which one gets selected depends on -// __CLANG_CUDA_APPROX_TRANSCENDENTALS__ which gets defined by clang if -// -ffast-math or -fcuda-approx-transcendentals are in effect. -#pragma push_macro("__FAST_OR_SLOW") -#if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__) -#define __FAST_OR_SLOW(fast, slow) fast -#else -#define __FAST_OR_SLOW(fast, slow) slow -#endif - -// For C++ 17 we need to include noexcept attribute to be compatible -// with the header-defined version. This may be removed once -// variant is supported. -#if defined(_OPENMP) && defined(__cplusplus) && __cplusplus >= 201703L -#define __NOEXCEPT noexcept -#else -#define __NOEXCEPT -#endif - __DEVICE__ int __all(int __a) { return __nvvm_vote_all(__a); } __DEVICE__ int __any(int __a) { return __nvvm_vote_any(__a); } __DEVICE__ unsigned int __ballot(int __a) { return __nvvm_vote_ballot(__a); } @@ -359,10 +339,10 @@ __DEVICE__ int __iAtomicAdd(int *__p, int __v) { return __nvvm_atom_add_gen_i(__p, __v); } __DEVICE__ int __iAtomicAdd_block(int *__p, int __v) { - __nvvm_atom_cta_add_gen_i(__p, __v); + return __nvvm_atom_cta_add_gen_i(__p, __v); } __DEVICE__ int __iAtomicAdd_system(int *__p, int __v) { - __nvvm_atom_sys_add_gen_i(__p, __v); + return __nvvm_atom_sys_add_gen_i(__p, __v); } __DEVICE__ int __iAtomicAnd(int *__p, int __v) { return __nvvm_atom_and_gen_i(__p, __v); @@ -1483,152 +1463,17 @@ __DEVICE__ unsigned int __vsubus4(unsigned int __a, unsigned int __b) { return r; } #endif // CUDA_VERSION >= 9020 -__DEVICE__ int abs(int __a) __NOEXCEPT { return __nv_abs(__a); } -__DEVICE__ double fabs(double __a) __NOEXCEPT { return __nv_fabs(__a); } -__DEVICE__ double acos(double __a) { return __nv_acos(__a); } -__DEVICE__ float acosf(float __a) { return __nv_acosf(__a); } -__DEVICE__ double acosh(double __a) { return __nv_acosh(__a); } -__DEVICE__ float acoshf(float __a) { return __nv_acoshf(__a); } -__DEVICE__ double asin(double __a) { return __nv_asin(__a); } -__DEVICE__ float asinf(float __a) { return __nv_asinf(__a); } -__DEVICE__ double asinh(double __a) { return __nv_asinh(__a); } -__DEVICE__ float asinhf(float __a) { return __nv_asinhf(__a); } -__DEVICE__ double atan(double __a) { return __nv_atan(__a); } -__DEVICE__ double atan2(double __a, double __b) { return __nv_atan2(__a, __b); } -__DEVICE__ float atan2f(float __a, float __b) { return __nv_atan2f(__a, __b); } -__DEVICE__ float atanf(float __a) { return __nv_atanf(__a); } -__DEVICE__ double atanh(double __a) { return __nv_atanh(__a); } -__DEVICE__ float atanhf(float __a) { return __nv_atanhf(__a); } -__DEVICE__ double cbrt(double __a) { return __nv_cbrt(__a); } -__DEVICE__ float cbrtf(float __a) { return __nv_cbrtf(__a); } -__DEVICE__ double ceil(double __a) { return __nv_ceil(__a); } -__DEVICE__ float ceilf(float __a) { return __nv_ceilf(__a); } -#ifndef _OPENMP -__DEVICE__ int clock() { return __nvvm_read_ptx_sreg_clock(); } -__DEVICE__ long long clock64() { return __nvvm_read_ptx_sreg_clock64(); } -#endif -__DEVICE__ double copysign(double __a, double __b) { - return __nv_copysign(__a, __b); -} -__DEVICE__ float copysignf(float __a, float __b) { - return __nv_copysignf(__a, __b); -} -__DEVICE__ double cos(double __a) { return __nv_cos(__a); } -__DEVICE__ float cosf(float __a) { - return __FAST_OR_SLOW(__nv_fast_cosf, __nv_cosf)(__a); -} -__DEVICE__ double cosh(double __a) { return __nv_cosh(__a); } -__DEVICE__ float coshf(float __a) { return __nv_coshf(__a); } -__DEVICE__ double cospi(double __a) { return __nv_cospi(__a); } -__DEVICE__ float cospif(float __a) { return __nv_cospif(__a); } -__DEVICE__ double cyl_bessel_i0(double __a) { return __nv_cyl_bessel_i0(__a); } -__DEVICE__ float cyl_bessel_i0f(float __a) { return __nv_cyl_bessel_i0f(__a); } -__DEVICE__ double cyl_bessel_i1(double __a) { return __nv_cyl_bessel_i1(__a); } -__DEVICE__ float cyl_bessel_i1f(float __a) { return __nv_cyl_bessel_i1f(__a); } -__DEVICE__ double erf(double __a) { return __nv_erf(__a); } -__DEVICE__ double erfc(double __a) { return __nv_erfc(__a); } -__DEVICE__ float erfcf(float __a) { return __nv_erfcf(__a); } -__DEVICE__ double erfcinv(double __a) { return __nv_erfcinv(__a); } -__DEVICE__ float erfcinvf(float __a) { return __nv_erfcinvf(__a); } -__DEVICE__ double erfcx(double __a) { return __nv_erfcx(__a); } -__DEVICE__ float erfcxf(float __a) { return __nv_erfcxf(__a); } -__DEVICE__ float erff(float __a) { return __nv_erff(__a); } -__DEVICE__ double erfinv(double __a) { return __nv_erfinv(__a); } -__DEVICE__ float erfinvf(float __a) { return __nv_erfinvf(__a); } -__DEVICE__ double exp(double __a) { return __nv_exp(__a); } -__DEVICE__ double exp10(double __a) { return __nv_exp10(__a); } -__DEVICE__ float exp10f(float __a) { return __nv_exp10f(__a); } -__DEVICE__ double exp2(double __a) { return __nv_exp2(__a); } -__DEVICE__ float exp2f(float __a) { return __nv_exp2f(__a); } -__DEVICE__ float expf(float __a) { return __nv_expf(__a); } -__DEVICE__ double expm1(double __a) { return __nv_expm1(__a); } -__DEVICE__ float expm1f(float __a) { return __nv_expm1f(__a); } -__DEVICE__ float fabsf(float __a) { return __nv_fabsf(__a); } -__DEVICE__ double fdim(double __a, double __b) { return __nv_fdim(__a, __b); } -__DEVICE__ float fdimf(float __a, float __b) { return __nv_fdimf(__a, __b); } -__DEVICE__ double fdivide(double __a, double __b) { return __a / __b; } -__DEVICE__ float fdividef(float __a, float __b) { -#if __FAST_MATH__ && !__CUDA_PREC_DIV - return __nv_fast_fdividef(__a, __b); -#else - return __a / __b; -#endif -} -__DEVICE__ double floor(double __f) { return __nv_floor(__f); } -__DEVICE__ float floorf(float __f) { return __nv_floorf(__f); } -__DEVICE__ double fma(double __a, double __b, double __c) { - return __nv_fma(__a, __b, __c); -} -__DEVICE__ float fmaf(float __a, float __b, float __c) { - return __nv_fmaf(__a, __b, __c); -} -__DEVICE__ double fmax(double __a, double __b) { return __nv_fmax(__a, __b); } -__DEVICE__ float fmaxf(float __a, float __b) { return __nv_fmaxf(__a, __b); } -__DEVICE__ double fmin(double __a, double __b) { return __nv_fmin(__a, __b); } -__DEVICE__ float fminf(float __a, float __b) { return __nv_fminf(__a, __b); } -__DEVICE__ double fmod(double __a, double __b) { return __nv_fmod(__a, __b); } -__DEVICE__ float fmodf(float __a, float __b) { return __nv_fmodf(__a, __b); } -__DEVICE__ double frexp(double __a, int *__b) { return __nv_frexp(__a, __b); } -__DEVICE__ float frexpf(float __a, int *__b) { return __nv_frexpf(__a, __b); } -__DEVICE__ double hypot(double __a, double __b) { return __nv_hypot(__a, __b); } -__DEVICE__ float hypotf(float __a, float __b) { return __nv_hypotf(__a, __b); } -__DEVICE__ int ilogb(double __a) { return __nv_ilogb(__a); } -__DEVICE__ int ilogbf(float __a) { return __nv_ilogbf(__a); } -__DEVICE__ double j0(double __a) { return __nv_j0(__a); } -__DEVICE__ float j0f(float __a) { return __nv_j0f(__a); } -__DEVICE__ double j1(double __a) { return __nv_j1(__a); } -__DEVICE__ float j1f(float __a) { return __nv_j1f(__a); } -__DEVICE__ double jn(int __n, double __a) { return __nv_jn(__n, __a); } -__DEVICE__ float jnf(int __n, float __a) { return __nv_jnf(__n, __a); } -#if defined(__LP64__) || defined(_WIN64) -__DEVICE__ long labs(long __a) __NOEXCEPT { return __nv_llabs(__a); }; -#else -__DEVICE__ long labs(long __a) __NOEXCEPT { return __nv_abs(__a); }; -#endif -__DEVICE__ double ldexp(double __a, int __b) { return __nv_ldexp(__a, __b); } -__DEVICE__ float ldexpf(float __a, int __b) { return __nv_ldexpf(__a, __b); } -__DEVICE__ double lgamma(double __a) { return __nv_lgamma(__a); } -__DEVICE__ float lgammaf(float __a) { return __nv_lgammaf(__a); } -__DEVICE__ long long llabs(long long __a) __NOEXCEPT { return __nv_llabs(__a); } -__DEVICE__ long long llmax(long long __a, long long __b) { - return __nv_llmax(__a, __b); -} -__DEVICE__ long long llmin(long long __a, long long __b) { - return __nv_llmin(__a, __b); -} -__DEVICE__ long long llrint(double __a) { return __nv_llrint(__a); } -__DEVICE__ long long llrintf(float __a) { return __nv_llrintf(__a); } -__DEVICE__ long long llround(double __a) { return __nv_llround(__a); } -__DEVICE__ long long llroundf(float __a) { return __nv_llroundf(__a); } -__DEVICE__ double log(double __a) { return __nv_log(__a); } -__DEVICE__ double log10(double __a) { return __nv_log10(__a); } -__DEVICE__ float log10f(float __a) { return __nv_log10f(__a); } -__DEVICE__ double log1p(double __a) { return __nv_log1p(__a); } -__DEVICE__ float log1pf(float __a) { return __nv_log1pf(__a); } -__DEVICE__ double log2(double __a) { return __nv_log2(__a); } -__DEVICE__ float log2f(float __a) { - return __FAST_OR_SLOW(__nv_fast_log2f, __nv_log2f)(__a); -} -__DEVICE__ double logb(double __a) { return __nv_logb(__a); } -__DEVICE__ float logbf(float __a) { return __nv_logbf(__a); } -__DEVICE__ float logf(float __a) { - return __FAST_OR_SLOW(__nv_fast_logf, __nv_logf)(__a); -} -#if defined(__LP64__) || defined(_WIN64) -__DEVICE__ long lrint(double __a) { return llrint(__a); } -__DEVICE__ long lrintf(float __a) { return __float2ll_rn(__a); } -__DEVICE__ long lround(double __a) { return llround(__a); } -__DEVICE__ long lroundf(float __a) { return llroundf(__a); } -#else -__DEVICE__ long lrint(double __a) { return (long)rint(__a); } -__DEVICE__ long lrintf(float __a) { return __float2int_rn(__a); } -__DEVICE__ long lround(double __a) { return round(__a); } -__DEVICE__ long lroundf(float __a) { return roundf(__a); } + +// For OpenMP we require the user to include <time.h> as we need to know what +// clock_t is on the system. +#ifndef __OPENMP_NVPTX__ +__DEVICE__ /* clock_t= */ int clock() { return __nvvm_read_ptx_sreg_clock(); } #endif -__DEVICE__ int max(int __a, int __b) { return __nv_max(__a, __b); } +__DEVICE__ long long clock64() { return __nvvm_read_ptx_sreg_clock64(); } + // These functions shouldn't be declared when including this header // for math function resolution purposes. -#ifndef _OPENMP +#ifndef __OPENMP_NVPTX__ __DEVICE__ void *memcpy(void *__a, const void *__b, size_t __c) { return __builtin_memcpy(__a, __b, __c); } @@ -1636,158 +1481,6 @@ __DEVICE__ void *memset(void *__a, int __b, size_t __c) { return __builtin_memset(__a, __b, __c); } #endif -__DEVICE__ int min(int __a, int __b) { return __nv_min(__a, __b); } -__DEVICE__ double modf(double __a, double *__b) { return __nv_modf(__a, __b); } -__DEVICE__ float modff(float __a, float *__b) { return __nv_modff(__a, __b); } -__DEVICE__ double nearbyint(double __a) { return __nv_nearbyint(__a); } -__DEVICE__ float nearbyintf(float __a) { return __nv_nearbyintf(__a); } -__DEVICE__ double nextafter(double __a, double __b) { - return __nv_nextafter(__a, __b); -} -__DEVICE__ float nextafterf(float __a, float __b) { - return __nv_nextafterf(__a, __b); -} -__DEVICE__ double norm(int __dim, const double *__t) { - return __nv_norm(__dim, __t); -} -__DEVICE__ double norm3d(double __a, double __b, double __c) { - return __nv_norm3d(__a, __b, __c); -} -__DEVICE__ float norm3df(float __a, float __b, float __c) { - return __nv_norm3df(__a, __b, __c); -} -__DEVICE__ double norm4d(double __a, double __b, double __c, double __d) { - return __nv_norm4d(__a, __b, __c, __d); -} -__DEVICE__ float norm4df(float __a, float __b, float __c, float __d) { - return __nv_norm4df(__a, __b, __c, __d); -} -__DEVICE__ double normcdf(double __a) { return __nv_normcdf(__a); } -__DEVICE__ float normcdff(float __a) { return __nv_normcdff(__a); } -__DEVICE__ double normcdfinv(double __a) { return __nv_normcdfinv(__a); } -__DEVICE__ float normcdfinvf(float __a) { return __nv_normcdfinvf(__a); } -__DEVICE__ float normf(int __dim, const float *__t) { - return __nv_normf(__dim, __t); -} -__DEVICE__ double pow(double __a, double __b) { return __nv_pow(__a, __b); } -__DEVICE__ float powf(float __a, float __b) { return __nv_powf(__a, __b); } -__DEVICE__ double powi(double __a, int __b) { return __nv_powi(__a, __b); } -__DEVICE__ float powif(float __a, int __b) { return __nv_powif(__a, __b); } -__DEVICE__ double rcbrt(double __a) { return __nv_rcbrt(__a); } -__DEVICE__ float rcbrtf(float __a) { return __nv_rcbrtf(__a); } -__DEVICE__ double remainder(double __a, double __b) { - return __nv_remainder(__a, __b); -} -__DEVICE__ float remainderf(float __a, float __b) { - return __nv_remainderf(__a, __b); -} -__DEVICE__ double remquo(double __a, double __b, int *__c) { - return __nv_remquo(__a, __b, __c); -} -__DEVICE__ float remquof(float __a, float __b, int *__c) { - return __nv_remquof(__a, __b, __c); -} -__DEVICE__ double rhypot(double __a, double __b) { - return __nv_rhypot(__a, __b); -} -__DEVICE__ float rhypotf(float __a, float __b) { - return __nv_rhypotf(__a, __b); -} -__DEVICE__ double rint(double __a) { return __nv_rint(__a); } -__DEVICE__ float rintf(float __a) { return __nv_rintf(__a); } -__DEVICE__ double rnorm(int __a, const double *__b) { - return __nv_rnorm(__a, __b); -} -__DEVICE__ double rnorm3d(double __a, double __b, double __c) { - return __nv_rnorm3d(__a, __b, __c); -} -__DEVICE__ float rnorm3df(float __a, float __b, float __c) { - return __nv_rnorm3df(__a, __b, __c); -} -__DEVICE__ double rnorm4d(double __a, double __b, double __c, double __d) { - return __nv_rnorm4d(__a, __b, __c, __d); -} -__DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d) { - return __nv_rnorm4df(__a, __b, __c, __d); -} -__DEVICE__ float rnormf(int __dim, const float *__t) { - return __nv_rnormf(__dim, __t); -} -__DEVICE__ double round(double __a) { return __nv_round(__a); } -__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); } -__DEVICE__ double rsqrt(double __a) { return __nv_rsqrt(__a); } -__DEVICE__ float rsqrtf(float __a) { return __nv_rsqrtf(__a); } -__DEVICE__ double scalbn(double __a, int __b) { return __nv_scalbn(__a, __b); } -__DEVICE__ float scalbnf(float __a, int __b) { return __nv_scalbnf(__a, __b); } -// TODO: remove once variant is supported -#ifndef _OPENMP -__DEVICE__ double scalbln(double __a, long __b) { - if (__b > INT_MAX) - return __a > 0 ? HUGE_VAL : -HUGE_VAL; - if (__b < INT_MIN) - return __a > 0 ? 0.0 : -0.0; - return scalbn(__a, (int)__b); -} -__DEVICE__ float scalblnf(float __a, long __b) { - if (__b > INT_MAX) - return __a > 0 ? HUGE_VALF : -HUGE_VALF; - if (__b < INT_MIN) - return __a > 0 ? 0.f : -0.f; - return scalbnf(__a, (int)__b); -} -#endif -__DEVICE__ double sin(double __a) { return __nv_sin(__a); } -__DEVICE__ void sincos(double __a, double *__s, double *__c) { - return __nv_sincos(__a, __s, __c); -} -__DEVICE__ void sincosf(float __a, float *__s, float *__c) { - return __FAST_OR_SLOW(__nv_fast_sincosf, __nv_sincosf)(__a, __s, __c); -} -__DEVICE__ void sincospi(double __a, double *__s, double *__c) { - return __nv_sincospi(__a, __s, __c); -} -__DEVICE__ void sincospif(float __a, float *__s, float *__c) { - return __nv_sincospif(__a, __s, __c); -} -__DEVICE__ float sinf(float __a) { - return __FAST_OR_SLOW(__nv_fast_sinf, __nv_sinf)(__a); -} -__DEVICE__ double sinh(double __a) { return __nv_sinh(__a); } -__DEVICE__ float sinhf(float __a) { return __nv_sinhf(__a); } -__DEVICE__ double sinpi(double __a) { return __nv_sinpi(__a); } -__DEVICE__ float sinpif(float __a) { return __nv_sinpif(__a); } -__DEVICE__ double sqrt(double __a) { return __nv_sqrt(__a); } -__DEVICE__ float sqrtf(float __a) { return __nv_sqrtf(__a); } -__DEVICE__ double tan(double __a) { return __nv_tan(__a); } -__DEVICE__ float tanf(float __a) { return __nv_tanf(__a); } -__DEVICE__ double tanh(double __a) { return __nv_tanh(__a); } -__DEVICE__ float tanhf(float __a) { return __nv_tanhf(__a); } -__DEVICE__ double tgamma(double __a) { return __nv_tgamma(__a); } -__DEVICE__ float tgammaf(float __a) { return __nv_tgammaf(__a); } -__DEVICE__ double trunc(double __a) { return __nv_trunc(__a); } -__DEVICE__ float truncf(float __a) { return __nv_truncf(__a); } -__DEVICE__ unsigned long long ullmax(unsigned long long __a, - unsigned long long __b) { - return __nv_ullmax(__a, __b); -} -__DEVICE__ unsigned long long ullmin(unsigned long long __a, - unsigned long long __b) { - return __nv_ullmin(__a, __b); -} -__DEVICE__ unsigned int umax(unsigned int __a, unsigned int __b) { - return __nv_umax(__a, __b); -} -__DEVICE__ unsigned int umin(unsigned int __a, unsigned int __b) { - return __nv_umin(__a, __b); -} -__DEVICE__ double y0(double __a) { return __nv_y0(__a); } -__DEVICE__ float y0f(float __a) { return __nv_y0f(__a); } -__DEVICE__ double y1(double __a) { return __nv_y1(__a); } -__DEVICE__ float y1f(float __a) { return __nv_y1f(__a); } -__DEVICE__ double yn(int __a, double __b) { return __nv_yn(__a, __b); } -__DEVICE__ float ynf(int __a, float __b) { return __nv_ynf(__a, __b); } -#undef __NOEXCEPT #pragma pop_macro("__DEVICE__") -#pragma pop_macro("__FAST_OR_SLOW") #endif // __CLANG_CUDA_DEVICE_FUNCTIONS_H__ diff --git a/clang/lib/Headers/__clang_cuda_intrinsics.h b/clang/lib/Headers/__clang_cuda_intrinsics.h index b67461a146fc..c7bff6a9d8fe 100644 --- a/clang/lib/Headers/__clang_cuda_intrinsics.h +++ b/clang/lib/Headers/__clang_cuda_intrinsics.h @@ -45,7 +45,7 @@ _Static_assert(sizeof(__val) == sizeof(__Bits)); \ _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \ __Bits __tmp; \ - memcpy(&__val, &__tmp, sizeof(__val)); \ + memcpy(&__tmp, &__val, sizeof(__val)); \ __tmp.__a = ::__FnName(__tmp.__a, __offset, __width); \ __tmp.__b = ::__FnName(__tmp.__b, __offset, __width); \ long long __ret; \ @@ -129,7 +129,7 @@ __MAKE_SHUFFLES(__shfl_xor, __nvvm_shfl_bfly_i32, __nvvm_shfl_bfly_f32, 0x1f, _Static_assert(sizeof(__val) == sizeof(__Bits)); \ _Static_assert(sizeof(__Bits) == 2 * sizeof(int)); \ __Bits __tmp; \ - memcpy(&__val, &__tmp, sizeof(__val)); \ + memcpy(&__tmp, &__val, sizeof(__val)); \ __tmp.__a = ::__FnName(__mask, __tmp.__a, __offset, __width); \ __tmp.__b = ::__FnName(__mask, __tmp.__b, __offset, __width); \ long long __ret; \ diff --git a/clang/lib/Headers/__clang_cuda_libdevice_declares.h b/clang/lib/Headers/__clang_cuda_libdevice_declares.h index 4d70353394c8..6173b589e3ef 100644 --- a/clang/lib/Headers/__clang_cuda_libdevice_declares.h +++ b/clang/lib/Headers/__clang_cuda_libdevice_declares.h @@ -14,7 +14,7 @@ extern "C" { #endif -#if defined(_OPENMP) +#if defined(__OPENMP_NVPTX__) #define __DEVICE__ #elif defined(__CUDA__) #define __DEVICE__ __device__ diff --git a/clang/lib/Headers/__clang_cuda_math.h b/clang/lib/Headers/__clang_cuda_math.h new file mode 100644 index 000000000000..332e616702ac --- /dev/null +++ b/clang/lib/Headers/__clang_cuda_math.h @@ -0,0 +1,347 @@ +/*===---- __clang_cuda_math.h - Device-side CUDA math support --------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ +#ifndef __CLANG_CUDA_MATH_H__ +#define __CLANG_CUDA_MATH_H__ +#ifndef __CUDA__ +#error "This file is for CUDA compilation only." +#endif + +#ifndef __OPENMP_NVPTX__ +#if CUDA_VERSION < 9000 +#error This file is intended to be used with CUDA-9+ only. +#endif +#endif + +// __DEVICE__ is a helper macro with common set of attributes for the wrappers +// we implement in this file. We need static in order to avoid emitting unused +// functions and __forceinline__ helps inlining these wrappers at -O1. +#pragma push_macro("__DEVICE__") +#ifdef __OPENMP_NVPTX__ +#if defined(__cplusplus) +#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow)) +#else +#define __DEVICE__ static __attribute__((always_inline, nothrow)) +#endif +#else +#define __DEVICE__ static __device__ __forceinline__ +#endif + +// Specialized version of __DEVICE__ for functions with void return type. Needed +// because the OpenMP overlay requires constexpr functions here but prior to +// c++14 void return functions could not be constexpr. +#pragma push_macro("__DEVICE_VOID__") +#ifdef __OPENMP_NVPTX__ && defined(__cplusplus) && __cplusplus < 201402L +#define __DEVICE_VOID__ static __attribute__((always_inline, nothrow)) +#else +#define __DEVICE_VOID__ __DEVICE__ +#endif + +// libdevice provides fast low precision and slow full-recision implementations +// for some functions. Which one gets selected depends on +// __CLANG_CUDA_APPROX_TRANSCENDENTALS__ which gets defined by clang if +// -ffast-math or -fcuda-approx-transcendentals are in effect. +#pragma push_macro("__FAST_OR_SLOW") +#if defined(__CLANG_CUDA_APPROX_TRANSCENDENTALS__) +#define __FAST_OR_SLOW(fast, slow) fast +#else +#define __FAST_OR_SLOW(fast, slow) slow +#endif + +__DEVICE__ int abs(int __a) { return __nv_abs(__a); } +__DEVICE__ double fabs(double __a) { return __nv_fabs(__a); } +__DEVICE__ double acos(double __a) { return __nv_acos(__a); } +__DEVICE__ float acosf(float __a) { return __nv_acosf(__a); } +__DEVICE__ double acosh(double __a) { return __nv_acosh(__a); } +__DEVICE__ float acoshf(float __a) { return __nv_acoshf(__a); } +__DEVICE__ double asin(double __a) { return __nv_asin(__a); } +__DEVICE__ float asinf(float __a) { return __nv_asinf(__a); } +__DEVICE__ double asinh(double __a) { return __nv_asinh(__a); } +__DEVICE__ float asinhf(float __a) { return __nv_asinhf(__a); } +__DEVICE__ double atan(double __a) { return __nv_atan(__a); } +__DEVICE__ double atan2(double __a, double __b) { return __nv_atan2(__a, __b); } +__DEVICE__ float atan2f(float __a, float __b) { return __nv_atan2f(__a, __b); } +__DEVICE__ float atanf(float __a) { return __nv_atanf(__a); } +__DEVICE__ double atanh(double __a) { return __nv_atanh(__a); } +__DEVICE__ float atanhf(float __a) { return __nv_atanhf(__a); } +__DEVICE__ double cbrt(double __a) { return __nv_cbrt(__a); } +__DEVICE__ float cbrtf(float __a) { return __nv_cbrtf(__a); } +__DEVICE__ double ceil(double __a) { return __nv_ceil(__a); } +__DEVICE__ float ceilf(float __a) { return __nv_ceilf(__a); } +__DEVICE__ double copysign(double __a, double __b) { + return __nv_copysign(__a, __b); +} +__DEVICE__ float copysignf(float __a, float __b) { + return __nv_copysignf(__a, __b); +} +__DEVICE__ double cos(double __a) { return __nv_cos(__a); } +__DEVICE__ float cosf(float __a) { + return __FAST_OR_SLOW(__nv_fast_cosf, __nv_cosf)(__a); +} +__DEVICE__ double cosh(double __a) { return __nv_cosh(__a); } +__DEVICE__ float coshf(float __a) { return __nv_coshf(__a); } +__DEVICE__ double cospi(double __a) { return __nv_cospi(__a); } +__DEVICE__ float cospif(float __a) { return __nv_cospif(__a); } +__DEVICE__ double cyl_bessel_i0(double __a) { return __nv_cyl_bessel_i0(__a); } +__DEVICE__ float cyl_bessel_i0f(float __a) { return __nv_cyl_bessel_i0f(__a); } +__DEVICE__ double cyl_bessel_i1(double __a) { return __nv_cyl_bessel_i1(__a); } +__DEVICE__ float cyl_bessel_i1f(float __a) { return __nv_cyl_bessel_i1f(__a); } +__DEVICE__ double erf(double __a) { return __nv_erf(__a); } +__DEVICE__ double erfc(double __a) { return __nv_erfc(__a); } +__DEVICE__ float erfcf(float __a) { return __nv_erfcf(__a); } +__DEVICE__ double erfcinv(double __a) { return __nv_erfcinv(__a); } +__DEVICE__ float erfcinvf(float __a) { return __nv_erfcinvf(__a); } +__DEVICE__ double erfcx(double __a) { return __nv_erfcx(__a); } +__DEVICE__ float erfcxf(float __a) { return __nv_erfcxf(__a); } +__DEVICE__ float erff(float __a) { return __nv_erff(__a); } +__DEVICE__ double erfinv(double __a) { return __nv_erfinv(__a); } +__DEVICE__ float erfinvf(float __a) { return __nv_erfinvf(__a); } +__DEVICE__ double exp(double __a) { return __nv_exp(__a); } +__DEVICE__ double exp10(double __a) { return __nv_exp10(__a); } +__DEVICE__ float exp10f(float __a) { return __nv_exp10f(__a); } +__DEVICE__ double exp2(double __a) { return __nv_exp2(__a); } +__DEVICE__ float exp2f(float __a) { return __nv_exp2f(__a); } +__DEVICE__ float expf(float __a) { return __nv_expf(__a); } +__DEVICE__ double expm1(double __a) { return __nv_expm1(__a); } +__DEVICE__ float expm1f(float __a) { return __nv_expm1f(__a); } +__DEVICE__ float fabsf(float __a) { return __nv_fabsf(__a); } +__DEVICE__ double fdim(double __a, double __b) { return __nv_fdim(__a, __b); } +__DEVICE__ float fdimf(float __a, float __b) { return __nv_fdimf(__a, __b); } +__DEVICE__ double fdivide(double __a, double __b) { return __a / __b; } +__DEVICE__ float fdividef(float __a, float __b) { +#if __FAST_MATH__ && !__CUDA_PREC_DIV + return __nv_fast_fdividef(__a, __b); +#else + return __a / __b; +#endif +} +__DEVICE__ double floor(double __f) { return __nv_floor(__f); } +__DEVICE__ float floorf(float __f) { return __nv_floorf(__f); } +__DEVICE__ double fma(double __a, double __b, double __c) { + return __nv_fma(__a, __b, __c); +} +__DEVICE__ float fmaf(float __a, float __b, float __c) { + return __nv_fmaf(__a, __b, __c); +} +__DEVICE__ double fmax(double __a, double __b) { return __nv_fmax(__a, __b); } +__DEVICE__ float fmaxf(float __a, float __b) { return __nv_fmaxf(__a, __b); } +__DEVICE__ double fmin(double __a, double __b) { return __nv_fmin(__a, __b); } +__DEVICE__ float fminf(float __a, float __b) { return __nv_fminf(__a, __b); } +__DEVICE__ double fmod(double __a, double __b) { return __nv_fmod(__a, __b); } +__DEVICE__ float fmodf(float __a, float __b) { return __nv_fmodf(__a, __b); } +__DEVICE__ double frexp(double __a, int *__b) { return __nv_frexp(__a, __b); } +__DEVICE__ float frexpf(float __a, int *__b) { return __nv_frexpf(__a, __b); } +__DEVICE__ double hypot(double __a, double __b) { return __nv_hypot(__a, __b); } +__DEVICE__ float hypotf(float __a, float __b) { return __nv_hypotf(__a, __b); } +__DEVICE__ int ilogb(double __a) { return __nv_ilogb(__a); } +__DEVICE__ int ilogbf(float __a) { return __nv_ilogbf(__a); } +__DEVICE__ double j0(double __a) { return __nv_j0(__a); } +__DEVICE__ float j0f(float __a) { return __nv_j0f(__a); } +__DEVICE__ double j1(double __a) { return __nv_j1(__a); } +__DEVICE__ float j1f(float __a) { return __nv_j1f(__a); } +__DEVICE__ double jn(int __n, double __a) { return __nv_jn(__n, __a); } +__DEVICE__ float jnf(int __n, float __a) { return __nv_jnf(__n, __a); } +#if defined(__LP64__) || defined(_WIN64) +__DEVICE__ long labs(long __a) { return __nv_llabs(__a); }; +#else +__DEVICE__ long labs(long __a) { return __nv_abs(__a); }; +#endif +__DEVICE__ double ldexp(double __a, int __b) { return __nv_ldexp(__a, __b); } +__DEVICE__ float ldexpf(float __a, int __b) { return __nv_ldexpf(__a, __b); } +__DEVICE__ double lgamma(double __a) { return __nv_lgamma(__a); } +__DEVICE__ float lgammaf(float __a) { return __nv_lgammaf(__a); } +__DEVICE__ long long llabs(long long __a) { return __nv_llabs(__a); } +__DEVICE__ long long llmax(long long __a, long long __b) { + return __nv_llmax(__a, __b); +} +__DEVICE__ long long llmin(long long __a, long long __b) { + return __nv_llmin(__a, __b); +} +__DEVICE__ long long llrint(double __a) { return __nv_llrint(__a); } +__DEVICE__ long long llrintf(float __a) { return __nv_llrintf(__a); } +__DEVICE__ long long llround(double __a) { return __nv_llround(__a); } +__DEVICE__ long long llroundf(float __a) { return __nv_llroundf(__a); } +__DEVICE__ double log(double __a) { return __nv_log(__a); } +__DEVICE__ double log10(double __a) { return __nv_log10(__a); } +__DEVICE__ float log10f(float __a) { return __nv_log10f(__a); } +__DEVICE__ double log1p(double __a) { return __nv_log1p(__a); } +__DEVICE__ float log1pf(float __a) { return __nv_log1pf(__a); } +__DEVICE__ double log2(double __a) { return __nv_log2(__a); } +__DEVICE__ float log2f(float __a) { + return __FAST_OR_SLOW(__nv_fast_log2f, __nv_log2f)(__a); +} +__DEVICE__ double logb(double __a) { return __nv_logb(__a); } +__DEVICE__ float logbf(float __a) { return __nv_logbf(__a); } +__DEVICE__ float logf(float __a) { + return __FAST_OR_SLOW(__nv_fast_logf, __nv_logf)(__a); +} +#if defined(__LP64__) || defined(_WIN64) +__DEVICE__ long lrint(double __a) { return llrint(__a); } +__DEVICE__ long lrintf(float __a) { return __float2ll_rn(__a); } +__DEVICE__ long lround(double __a) { return llround(__a); } +__DEVICE__ long lroundf(float __a) { return llroundf(__a); } +#else +__DEVICE__ long lrint(double __a) { return (long)rint(__a); } +__DEVICE__ long lrintf(float __a) { return __float2int_rn(__a); } +__DEVICE__ long lround(double __a) { return round(__a); } +__DEVICE__ long lroundf(float __a) { return roundf(__a); } +#endif +__DEVICE__ int max(int __a, int __b) { return __nv_max(__a, __b); } +__DEVICE__ int min(int __a, int __b) { return __nv_min(__a, __b); } +__DEVICE__ double modf(double __a, double *__b) { return __nv_modf(__a, __b); } +__DEVICE__ float modff(float __a, float *__b) { return __nv_modff(__a, __b); } +__DEVICE__ double nearbyint(double __a) { return __nv_nearbyint(__a); } +__DEVICE__ float nearbyintf(float __a) { return __nv_nearbyintf(__a); } +__DEVICE__ double nextafter(double __a, double __b) { + return __nv_nextafter(__a, __b); +} +__DEVICE__ float nextafterf(float __a, float __b) { + return __nv_nextafterf(__a, __b); +} +__DEVICE__ double norm(int __dim, const double *__t) { + return __nv_norm(__dim, __t); +} +__DEVICE__ double norm3d(double __a, double __b, double __c) { + return __nv_norm3d(__a, __b, __c); +} +__DEVICE__ float norm3df(float __a, float __b, float __c) { + return __nv_norm3df(__a, __b, __c); +} +__DEVICE__ double norm4d(double __a, double __b, double __c, double __d) { + return __nv_norm4d(__a, __b, __c, __d); +} +__DEVICE__ float norm4df(float __a, float __b, float __c, float __d) { + return __nv_norm4df(__a, __b, __c, __d); +} +__DEVICE__ double normcdf(double __a) { return __nv_normcdf(__a); } +__DEVICE__ float normcdff(float __a) { return __nv_normcdff(__a); } +__DEVICE__ double normcdfinv(double __a) { return __nv_normcdfinv(__a); } +__DEVICE__ float normcdfinvf(float __a) { return __nv_normcdfinvf(__a); } +__DEVICE__ float normf(int __dim, const float *__t) { + return __nv_normf(__dim, __t); +} +__DEVICE__ double pow(double __a, double __b) { return __nv_pow(__a, __b); } +__DEVICE__ float powf(float __a, float __b) { return __nv_powf(__a, __b); } +__DEVICE__ double powi(double __a, int __b) { return __nv_powi(__a, __b); } +__DEVICE__ float powif(float __a, int __b) { return __nv_powif(__a, __b); } +__DEVICE__ double rcbrt(double __a) { return __nv_rcbrt(__a); } +__DEVICE__ float rcbrtf(float __a) { return __nv_rcbrtf(__a); } +__DEVICE__ double remainder(double __a, double __b) { + return __nv_remainder(__a, __b); +} +__DEVICE__ float remainderf(float __a, float __b) { + return __nv_remainderf(__a, __b); +} +__DEVICE__ double remquo(double __a, double __b, int *__c) { + return __nv_remquo(__a, __b, __c); +} +__DEVICE__ float remquof(float __a, float __b, int *__c) { + return __nv_remquof(__a, __b, __c); +} +__DEVICE__ double rhypot(double __a, double __b) { + return __nv_rhypot(__a, __b); +} +__DEVICE__ float rhypotf(float __a, float __b) { + return __nv_rhypotf(__a, __b); +} +__DEVICE__ double rint(double __a) { return __nv_rint(__a); } +__DEVICE__ float rintf(float __a) { return __nv_rintf(__a); } +__DEVICE__ double rnorm(int __a, const double *__b) { + return __nv_rnorm(__a, __b); +} +__DEVICE__ double rnorm3d(double __a, double __b, double __c) { + return __nv_rnorm3d(__a, __b, __c); +} +__DEVICE__ float rnorm3df(float __a, float __b, float __c) { + return __nv_rnorm3df(__a, __b, __c); +} +__DEVICE__ double rnorm4d(double __a, double __b, double __c, double __d) { + return __nv_rnorm4d(__a, __b, __c, __d); +} +__DEVICE__ float rnorm4df(float __a, float __b, float __c, float __d) { + return __nv_rnorm4df(__a, __b, __c, __d); +} +__DEVICE__ float rnormf(int __dim, const float *__t) { + return __nv_rnormf(__dim, __t); +} +__DEVICE__ double round(double __a) { return __nv_round(__a); } +__DEVICE__ float roundf(float __a) { return __nv_roundf(__a); } +__DEVICE__ double rsqrt(double __a) { return __nv_rsqrt(__a); } +__DEVICE__ float rsqrtf(float __a) { return __nv_rsqrtf(__a); } +__DEVICE__ double scalbn(double __a, int __b) { return __nv_scalbn(__a, __b); } +__DEVICE__ float scalbnf(float __a, int __b) { return __nv_scalbnf(__a, __b); } +__DEVICE__ double scalbln(double __a, long __b) { + if (__b > INT_MAX) + return __a > 0 ? HUGE_VAL : -HUGE_VAL; + if (__b < INT_MIN) + return __a > 0 ? 0.0 : -0.0; + return scalbn(__a, (int)__b); +} +__DEVICE__ float scalblnf(float __a, long __b) { + if (__b > INT_MAX) + return __a > 0 ? HUGE_VALF : -HUGE_VALF; + if (__b < INT_MIN) + return __a > 0 ? 0.f : -0.f; + return scalbnf(__a, (int)__b); +} +__DEVICE__ double sin(double __a) { return __nv_sin(__a); } +__DEVICE_VOID__ void sincos(double __a, double *__s, double *__c) { + return __nv_sincos(__a, __s, __c); +} +__DEVICE_VOID__ void sincosf(float __a, float *__s, float *__c) { + return __FAST_OR_SLOW(__nv_fast_sincosf, __nv_sincosf)(__a, __s, __c); +} +__DEVICE_VOID__ void sincospi(double __a, double *__s, double *__c) { + return __nv_sincospi(__a, __s, __c); +} +__DEVICE_VOID__ void sincospif(float __a, float *__s, float *__c) { + return __nv_sincospif(__a, __s, __c); +} +__DEVICE__ float sinf(float __a) { + return __FAST_OR_SLOW(__nv_fast_sinf, __nv_sinf)(__a); +} +__DEVICE__ double sinh(double __a) { return __nv_sinh(__a); } +__DEVICE__ float sinhf(float __a) { return __nv_sinhf(__a); } +__DEVICE__ double sinpi(double __a) { return __nv_sinpi(__a); } +__DEVICE__ float sinpif(float __a) { return __nv_sinpif(__a); } +__DEVICE__ double sqrt(double __a) { return __nv_sqrt(__a); } +__DEVICE__ float sqrtf(float __a) { return __nv_sqrtf(__a); } +__DEVICE__ double tan(double __a) { return __nv_tan(__a); } +__DEVICE__ float tanf(float __a) { return __nv_tanf(__a); } +__DEVICE__ double tanh(double __a) { return __nv_tanh(__a); } +__DEVICE__ float tanhf(float __a) { return __nv_tanhf(__a); } +__DEVICE__ double tgamma(double __a) { return __nv_tgamma(__a); } +__DEVICE__ float tgammaf(float __a) { return __nv_tgammaf(__a); } +__DEVICE__ double trunc(double __a) { return __nv_trunc(__a); } +__DEVICE__ float truncf(float __a) { return __nv_truncf(__a); } +__DEVICE__ unsigned long long ullmax(unsigned long long __a, + unsigned long long __b) { + return __nv_ullmax(__a, __b); +} +__DEVICE__ unsigned long long ullmin(unsigned long long __a, + unsigned long long __b) { + return __nv_ullmin(__a, __b); +} +__DEVICE__ unsigned int umax(unsigned int __a, unsigned int __b) { + return __nv_umax(__a, __b); +} +__DEVICE__ unsigned int umin(unsigned int __a, unsigned int __b) { + return __nv_umin(__a, __b); +} +__DEVICE__ double y0(double __a) { return __nv_y0(__a); } +__DEVICE__ float y0f(float __a) { return __nv_y0f(__a); } +__DEVICE__ double y1(double __a) { return __nv_y1(__a); } +__DEVICE__ float y1f(float __a) { return __nv_y1f(__a); } +__DEVICE__ double yn(int __a, double __b) { return __nv_yn(__a, __b); } +__DEVICE__ float ynf(int __a, float __b) { return __nv_ynf(__a, __b); } + +#pragma pop_macro("__DEVICE__") +#pragma pop_macro("__DEVICE_VOID__") +#pragma pop_macro("__FAST_OR_SLOW") + +#endif // __CLANG_CUDA_DEVICE_FUNCTIONS_H__ diff --git a/clang/lib/Headers/__clang_cuda_math_forward_declares.h b/clang/lib/Headers/__clang_cuda_math_forward_declares.h index 0afe4db556db..8a270859e4a5 100644 --- a/clang/lib/Headers/__clang_cuda_math_forward_declares.h +++ b/clang/lib/Headers/__clang_cuda_math_forward_declares.h @@ -8,8 +8,8 @@ */ #ifndef __CLANG__CUDA_MATH_FORWARD_DECLARES_H__ #define __CLANG__CUDA_MATH_FORWARD_DECLARES_H__ -#ifndef __CUDA__ -#error "This file is for CUDA compilation only." +#if !defined(__CUDA__) && !__HIP__ +#error "This file is for CUDA/HIP compilation only." #endif // This file forward-declares of some math functions we (or the CUDA headers) @@ -20,37 +20,14 @@ // would preclude the use of our own __device__ overloads for these functions. #pragma push_macro("__DEVICE__") -#ifdef _OPENMP -#define __DEVICE__ static __inline__ __attribute__((always_inline)) -#else #define __DEVICE__ \ static __inline__ __attribute__((always_inline)) __attribute__((device)) -#endif - -// For C++ 17 we need to include noexcept attribute to be compatible -// with the header-defined version. This may be removed once -// variant is supported. -#if defined(_OPENMP) && defined(__cplusplus) && __cplusplus >= 201703L -#define __NOEXCEPT noexcept -#else -#define __NOEXCEPT -#endif -#if !(defined(_OPENMP) && defined(__cplusplus)) __DEVICE__ long abs(long); __DEVICE__ long long abs(long long); __DEVICE__ double abs(double); __DEVICE__ float abs(float); -#endif -// While providing the CUDA declarations and definitions for math functions, -// we may manually define additional functions. -// TODO: Once variant is supported the additional functions will have -// to be removed. -#if defined(_OPENMP) && defined(__cplusplus) -__DEVICE__ const double abs(const double); -__DEVICE__ const float abs(const float); -#endif -__DEVICE__ int abs(int) __NOEXCEPT; +__DEVICE__ int abs(int); __DEVICE__ double acos(double); __DEVICE__ float acos(float); __DEVICE__ double acosh(double); @@ -85,8 +62,8 @@ __DEVICE__ double exp(double); __DEVICE__ float exp(float); __DEVICE__ double expm1(double); __DEVICE__ float expm1(float); -__DEVICE__ double fabs(double) __NOEXCEPT; -__DEVICE__ float fabs(float) __NOEXCEPT; +__DEVICE__ double fabs(double); +__DEVICE__ float fabs(float); __DEVICE__ double fdim(double, double); __DEVICE__ float fdim(float, float); __DEVICE__ double floor(double); @@ -136,12 +113,12 @@ __DEVICE__ bool isnormal(double); __DEVICE__ bool isnormal(float); __DEVICE__ bool isunordered(double, double); __DEVICE__ bool isunordered(float, float); -__DEVICE__ long labs(long) __NOEXCEPT; +__DEVICE__ long labs(long); __DEVICE__ double ldexp(double, int); __DEVICE__ float ldexp(float, int); __DEVICE__ double lgamma(double); __DEVICE__ float lgamma(float); -__DEVICE__ long long llabs(long long) __NOEXCEPT; +__DEVICE__ long long llabs(long long); __DEVICE__ long long llrint(double); __DEVICE__ long long llrint(float); __DEVICE__ double log10(double); @@ -152,9 +129,6 @@ __DEVICE__ double log2(double); __DEVICE__ float log2(float); __DEVICE__ double logb(double); __DEVICE__ float logb(float); -#if defined(_OPENMP) && defined(__cplusplus) -__DEVICE__ long double log(long double); -#endif __DEVICE__ double log(double); __DEVICE__ float log(float); __DEVICE__ long lrint(double); @@ -302,7 +276,6 @@ _GLIBCXX_END_NAMESPACE_VERSION } // namespace std #endif -#undef __NOEXCEPT #pragma pop_macro("__DEVICE__") #endif diff --git a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h index 3e362dd967db..f43ed55de489 100644 --- a/clang/lib/Headers/__clang_cuda_runtime_wrapper.h +++ b/clang/lib/Headers/__clang_cuda_runtime_wrapper.h @@ -31,11 +31,17 @@ // Include some forward declares that must come before cmath. #include <__clang_cuda_math_forward_declares.h> +// Define __CUDACC__ early as libstdc++ standard headers with GNU extensions +// enabled depend on it to avoid using __float128, which is unsupported in +// CUDA. +#define __CUDACC__ + // Include some standard headers to avoid CUDA headers including them // while some required macros (like __THROW) are in a weird state. #include <cmath> #include <cstdlib> #include <stdlib.h> +#undef __CUDACC__ // Preserve common macros that will be changed below by us or by CUDA // headers. @@ -48,7 +54,7 @@ #include "cuda.h" #if !defined(CUDA_VERSION) #error "cuda.h did not define CUDA_VERSION" -#elif CUDA_VERSION < 7000 || CUDA_VERSION > 10010 +#elif CUDA_VERSION < 7000 #error "Unsupported CUDA version!" #endif @@ -83,13 +89,15 @@ #if CUDA_VERSION < 9000 #define __CUDABE__ #else +#define __CUDACC__ #define __CUDA_LIBDEVICE__ #endif // Disables definitions of device-side runtime support stubs in // cuda_device_runtime_api.h +#include "host_defines.h" +#undef __CUDACC__ #include "driver_types.h" #include "host_config.h" -#include "host_defines.h" // Temporarily replace "nv_weak" with weak, so __attribute__((nv_weak)) in // cuda_device_runtime_api.h ends up being __attribute__((weak)) which is the @@ -141,11 +149,12 @@ inline __host__ double __signbitd(double x) { // to provide our own. #include <__clang_cuda_libdevice_declares.h> -// Wrappers for many device-side standard library functions became compiler -// builtins in CUDA-9 and have been removed from the CUDA headers. Clang now -// provides its own implementation of the wrappers. +// Wrappers for many device-side standard library functions, incl. math +// functions, became compiler builtins in CUDA-9 and have been removed from the +// CUDA headers. Clang now provides its own implementation of the wrappers. #if CUDA_VERSION >= 9000 #include <__clang_cuda_device_functions.h> +#include <__clang_cuda_math.h> #endif // __THROW is redefined to be empty by device_functions_decls.h in CUDA. Clang's diff --git a/clang/lib/Headers/__clang_hip_libdevice_declares.h b/clang/lib/Headers/__clang_hip_libdevice_declares.h new file mode 100644 index 000000000000..e1cd49a39c65 --- /dev/null +++ b/clang/lib/Headers/__clang_hip_libdevice_declares.h @@ -0,0 +1,326 @@ +/*===---- __clang_hip_libdevice_declares.h - HIP device library decls -------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_HIP_LIBDEVICE_DECLARES_H__ +#define __CLANG_HIP_LIBDEVICE_DECLARES_H__ + +extern "C" { + +// BEGIN FLOAT +__device__ __attribute__((const)) float __ocml_acos_f32(float); +__device__ __attribute__((pure)) float __ocml_acosh_f32(float); +__device__ __attribute__((const)) float __ocml_asin_f32(float); +__device__ __attribute__((pure)) float __ocml_asinh_f32(float); +__device__ __attribute__((const)) float __ocml_atan2_f32(float, float); +__device__ __attribute__((const)) float __ocml_atan_f32(float); +__device__ __attribute__((pure)) float __ocml_atanh_f32(float); +__device__ __attribute__((pure)) float __ocml_cbrt_f32(float); +__device__ __attribute__((const)) float __ocml_ceil_f32(float); +__device__ __attribute__((const)) __device__ float __ocml_copysign_f32(float, + float); +__device__ float __ocml_cos_f32(float); +__device__ float __ocml_native_cos_f32(float); +__device__ __attribute__((pure)) __device__ float __ocml_cosh_f32(float); +__device__ float __ocml_cospi_f32(float); +__device__ float __ocml_i0_f32(float); +__device__ float __ocml_i1_f32(float); +__device__ __attribute__((pure)) float __ocml_erfc_f32(float); +__device__ __attribute__((pure)) float __ocml_erfcinv_f32(float); +__device__ __attribute__((pure)) float __ocml_erfcx_f32(float); +__device__ __attribute__((pure)) float __ocml_erf_f32(float); +__device__ __attribute__((pure)) float __ocml_erfinv_f32(float); +__device__ __attribute__((pure)) float __ocml_exp10_f32(float); +__device__ __attribute__((pure)) float __ocml_native_exp10_f32(float); +__device__ __attribute__((pure)) float __ocml_exp2_f32(float); +__device__ __attribute__((pure)) float __ocml_exp_f32(float); +__device__ __attribute__((pure)) float __ocml_native_exp_f32(float); +__device__ __attribute__((pure)) float __ocml_expm1_f32(float); +__device__ __attribute__((const)) float __ocml_fabs_f32(float); +__device__ __attribute__((const)) float __ocml_fdim_f32(float, float); +__device__ __attribute__((const)) float __ocml_floor_f32(float); +__device__ __attribute__((const)) float __ocml_fma_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_fmax_f32(float, float); +__device__ __attribute__((const)) float __ocml_fmin_f32(float, float); +__device__ __attribute__((const)) __device__ float __ocml_fmod_f32(float, + float); +__device__ float __ocml_frexp_f32(float, + __attribute__((address_space(5))) int *); +__device__ __attribute__((const)) float __ocml_hypot_f32(float, float); +__device__ __attribute__((const)) int __ocml_ilogb_f32(float); +__device__ __attribute__((const)) int __ocml_isfinite_f32(float); +__device__ __attribute__((const)) int __ocml_isinf_f32(float); +__device__ __attribute__((const)) int __ocml_isnan_f32(float); +__device__ float __ocml_j0_f32(float); +__device__ float __ocml_j1_f32(float); +__device__ __attribute__((const)) float __ocml_ldexp_f32(float, int); +__device__ float __ocml_lgamma_f32(float); +__device__ __attribute__((pure)) float __ocml_log10_f32(float); +__device__ __attribute__((pure)) float __ocml_native_log10_f32(float); +__device__ __attribute__((pure)) float __ocml_log1p_f32(float); +__device__ __attribute__((pure)) float __ocml_log2_f32(float); +__device__ __attribute__((pure)) float __ocml_native_log2_f32(float); +__device__ __attribute__((const)) float __ocml_logb_f32(float); +__device__ __attribute__((pure)) float __ocml_log_f32(float); +__device__ __attribute__((pure)) float __ocml_native_log_f32(float); +__device__ float __ocml_modf_f32(float, + __attribute__((address_space(5))) float *); +__device__ __attribute__((const)) float __ocml_nearbyint_f32(float); +__device__ __attribute__((const)) float __ocml_nextafter_f32(float, float); +__device__ __attribute__((const)) float __ocml_len3_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_len4_f32(float, float, float, + float); +__device__ __attribute__((pure)) float __ocml_ncdf_f32(float); +__device__ __attribute__((pure)) float __ocml_ncdfinv_f32(float); +__device__ __attribute__((pure)) float __ocml_pow_f32(float, float); +__device__ __attribute__((pure)) float __ocml_rcbrt_f32(float); +__device__ __attribute__((const)) float __ocml_remainder_f32(float, float); +__device__ float __ocml_remquo_f32(float, float, + __attribute__((address_space(5))) int *); +__device__ __attribute__((const)) float __ocml_rhypot_f32(float, float); +__device__ __attribute__((const)) float __ocml_rint_f32(float); +__device__ __attribute__((const)) float __ocml_rlen3_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_rlen4_f32(float, float, float, + float); +__device__ __attribute__((const)) float __ocml_round_f32(float); +__device__ __attribute__((pure)) float __ocml_rsqrt_f32(float); +__device__ __attribute__((const)) float __ocml_scalb_f32(float, float); +__device__ __attribute__((const)) float __ocml_scalbn_f32(float, int); +__device__ __attribute__((const)) int __ocml_signbit_f32(float); +__device__ float __ocml_sincos_f32(float, + __attribute__((address_space(5))) float *); +__device__ float __ocml_sincospi_f32(float, + __attribute__((address_space(5))) float *); +__device__ float __ocml_sin_f32(float); +__device__ float __ocml_native_sin_f32(float); +__device__ __attribute__((pure)) float __ocml_sinh_f32(float); +__device__ float __ocml_sinpi_f32(float); +__device__ __attribute__((const)) float __ocml_sqrt_f32(float); +__device__ __attribute__((const)) float __ocml_native_sqrt_f32(float); +__device__ float __ocml_tan_f32(float); +__device__ __attribute__((pure)) float __ocml_tanh_f32(float); +__device__ float __ocml_tgamma_f32(float); +__device__ __attribute__((const)) float __ocml_trunc_f32(float); +__device__ float __ocml_y0_f32(float); +__device__ float __ocml_y1_f32(float); + +// BEGIN INTRINSICS +__device__ __attribute__((const)) float __ocml_add_rte_f32(float, float); +__device__ __attribute__((const)) float __ocml_add_rtn_f32(float, float); +__device__ __attribute__((const)) float __ocml_add_rtp_f32(float, float); +__device__ __attribute__((const)) float __ocml_add_rtz_f32(float, float); +__device__ __attribute__((const)) float __ocml_sub_rte_f32(float, float); +__device__ __attribute__((const)) float __ocml_sub_rtn_f32(float, float); +__device__ __attribute__((const)) float __ocml_sub_rtp_f32(float, float); +__device__ __attribute__((const)) float __ocml_sub_rtz_f32(float, float); +__device__ __attribute__((const)) float __ocml_mul_rte_f32(float, float); +__device__ __attribute__((const)) float __ocml_mul_rtn_f32(float, float); +__device__ __attribute__((const)) float __ocml_mul_rtp_f32(float, float); +__device__ __attribute__((const)) float __ocml_mul_rtz_f32(float, float); +__device__ __attribute__((const)) float __ocml_div_rte_f32(float, float); +__device__ __attribute__((const)) float __ocml_div_rtn_f32(float, float); +__device__ __attribute__((const)) float __ocml_div_rtp_f32(float, float); +__device__ __attribute__((const)) float __ocml_div_rtz_f32(float, float); +__device__ __attribute__((const)) float __ocml_sqrt_rte_f32(float, float); +__device__ __attribute__((const)) float __ocml_sqrt_rtn_f32(float, float); +__device__ __attribute__((const)) float __ocml_sqrt_rtp_f32(float, float); +__device__ __attribute__((const)) float __ocml_sqrt_rtz_f32(float, float); +__device__ __attribute__((const)) float __ocml_fma_rte_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_fma_rtn_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_fma_rtp_f32(float, float, float); +__device__ __attribute__((const)) float __ocml_fma_rtz_f32(float, float, float); + +__device__ __attribute__((const)) float +__llvm_amdgcn_cos_f32(float) __asm("llvm.amdgcn.cos.f32"); +__device__ __attribute__((const)) float +__llvm_amdgcn_rcp_f32(float) __asm("llvm.amdgcn.rcp.f32"); +__device__ __attribute__((const)) float +__llvm_amdgcn_rsq_f32(float) __asm("llvm.amdgcn.rsq.f32"); +__device__ __attribute__((const)) float +__llvm_amdgcn_sin_f32(float) __asm("llvm.amdgcn.sin.f32"); +// END INTRINSICS +// END FLOAT + +// BEGIN DOUBLE +__device__ __attribute__((const)) double __ocml_acos_f64(double); +__device__ __attribute__((pure)) double __ocml_acosh_f64(double); +__device__ __attribute__((const)) double __ocml_asin_f64(double); +__device__ __attribute__((pure)) double __ocml_asinh_f64(double); +__device__ __attribute__((const)) double __ocml_atan2_f64(double, double); +__device__ __attribute__((const)) double __ocml_atan_f64(double); +__device__ __attribute__((pure)) double __ocml_atanh_f64(double); +__device__ __attribute__((pure)) double __ocml_cbrt_f64(double); +__device__ __attribute__((const)) double __ocml_ceil_f64(double); +__device__ __attribute__((const)) double __ocml_copysign_f64(double, double); +__device__ double __ocml_cos_f64(double); +__device__ __attribute__((pure)) double __ocml_cosh_f64(double); +__device__ double __ocml_cospi_f64(double); +__device__ double __ocml_i0_f64(double); +__device__ double __ocml_i1_f64(double); +__device__ __attribute__((pure)) double __ocml_erfc_f64(double); +__device__ __attribute__((pure)) double __ocml_erfcinv_f64(double); +__device__ __attribute__((pure)) double __ocml_erfcx_f64(double); +__device__ __attribute__((pure)) double __ocml_erf_f64(double); +__device__ __attribute__((pure)) double __ocml_erfinv_f64(double); +__device__ __attribute__((pure)) double __ocml_exp10_f64(double); +__device__ __attribute__((pure)) double __ocml_exp2_f64(double); +__device__ __attribute__((pure)) double __ocml_exp_f64(double); +__device__ __attribute__((pure)) double __ocml_expm1_f64(double); +__device__ __attribute__((const)) double __ocml_fabs_f64(double); +__device__ __attribute__((const)) double __ocml_fdim_f64(double, double); +__device__ __attribute__((const)) double __ocml_floor_f64(double); +__device__ __attribute__((const)) double __ocml_fma_f64(double, double, double); +__device__ __attribute__((const)) double __ocml_fmax_f64(double, double); +__device__ __attribute__((const)) double __ocml_fmin_f64(double, double); +__device__ __attribute__((const)) double __ocml_fmod_f64(double, double); +__device__ double __ocml_frexp_f64(double, + __attribute__((address_space(5))) int *); +__device__ __attribute__((const)) double __ocml_hypot_f64(double, double); +__device__ __attribute__((const)) int __ocml_ilogb_f64(double); +__device__ __attribute__((const)) int __ocml_isfinite_f64(double); +__device__ __attribute__((const)) int __ocml_isinf_f64(double); +__device__ __attribute__((const)) int __ocml_isnan_f64(double); +__device__ double __ocml_j0_f64(double); +__device__ double __ocml_j1_f64(double); +__device__ __attribute__((const)) double __ocml_ldexp_f64(double, int); +__device__ double __ocml_lgamma_f64(double); +__device__ __attribute__((pure)) double __ocml_log10_f64(double); +__device__ __attribute__((pure)) double __ocml_log1p_f64(double); +__device__ __attribute__((pure)) double __ocml_log2_f64(double); +__device__ __attribute__((const)) double __ocml_logb_f64(double); +__device__ __attribute__((pure)) double __ocml_log_f64(double); +__device__ double __ocml_modf_f64(double, + __attribute__((address_space(5))) double *); +__device__ __attribute__((const)) double __ocml_nearbyint_f64(double); +__device__ __attribute__((const)) double __ocml_nextafter_f64(double, double); +__device__ __attribute__((const)) double __ocml_len3_f64(double, double, + double); +__device__ __attribute__((const)) double __ocml_len4_f64(double, double, double, + double); +__device__ __attribute__((pure)) double __ocml_ncdf_f64(double); +__device__ __attribute__((pure)) double __ocml_ncdfinv_f64(double); +__device__ __attribute__((pure)) double __ocml_pow_f64(double, double); +__device__ __attribute__((pure)) double __ocml_rcbrt_f64(double); +__device__ __attribute__((const)) double __ocml_remainder_f64(double, double); +__device__ double __ocml_remquo_f64(double, double, + __attribute__((address_space(5))) int *); +__device__ __attribute__((const)) double __ocml_rhypot_f64(double, double); +__device__ __attribute__((const)) double __ocml_rint_f64(double); +__device__ __attribute__((const)) double __ocml_rlen3_f64(double, double, + double); +__device__ __attribute__((const)) double __ocml_rlen4_f64(double, double, + double, double); +__device__ __attribute__((const)) double __ocml_round_f64(double); +__device__ __attribute__((pure)) double __ocml_rsqrt_f64(double); +__device__ __attribute__((const)) double __ocml_scalb_f64(double, double); +__device__ __attribute__((const)) double __ocml_scalbn_f64(double, int); +__device__ __attribute__((const)) int __ocml_signbit_f64(double); +__device__ double __ocml_sincos_f64(double, + __attribute__((address_space(5))) double *); +__device__ double +__ocml_sincospi_f64(double, __attribute__((address_space(5))) double *); +__device__ double __ocml_sin_f64(double); +__device__ __attribute__((pure)) double __ocml_sinh_f64(double); +__device__ double __ocml_sinpi_f64(double); +__device__ __attribute__((const)) double __ocml_sqrt_f64(double); +__device__ double __ocml_tan_f64(double); +__device__ __attribute__((pure)) double __ocml_tanh_f64(double); +__device__ double __ocml_tgamma_f64(double); +__device__ __attribute__((const)) double __ocml_trunc_f64(double); +__device__ double __ocml_y0_f64(double); +__device__ double __ocml_y1_f64(double); + +// BEGIN INTRINSICS +__device__ __attribute__((const)) double __ocml_add_rte_f64(double, double); +__device__ __attribute__((const)) double __ocml_add_rtn_f64(double, double); +__device__ __attribute__((const)) double __ocml_add_rtp_f64(double, double); +__device__ __attribute__((const)) double __ocml_add_rtz_f64(double, double); +__device__ __attribute__((const)) double __ocml_sub_rte_f64(double, double); +__device__ __attribute__((const)) double __ocml_sub_rtn_f64(double, double); +__device__ __attribute__((const)) double __ocml_sub_rtp_f64(double, double); +__device__ __attribute__((const)) double __ocml_sub_rtz_f64(double, double); +__device__ __attribute__((const)) double __ocml_mul_rte_f64(double, double); +__device__ __attribute__((const)) double __ocml_mul_rtn_f64(double, double); +__device__ __attribute__((const)) double __ocml_mul_rtp_f64(double, double); +__device__ __attribute__((const)) double __ocml_mul_rtz_f64(double, double); +__device__ __attribute__((const)) double __ocml_div_rte_f64(double, double); +__device__ __attribute__((const)) double __ocml_div_rtn_f64(double, double); +__device__ __attribute__((const)) double __ocml_div_rtp_f64(double, double); +__device__ __attribute__((const)) double __ocml_div_rtz_f64(double, double); +__device__ __attribute__((const)) double __ocml_sqrt_rte_f64(double, double); +__device__ __attribute__((const)) double __ocml_sqrt_rtn_f64(double, double); +__device__ __attribute__((const)) double __ocml_sqrt_rtp_f64(double, double); +__device__ __attribute__((const)) double __ocml_sqrt_rtz_f64(double, double); +__device__ __attribute__((const)) double __ocml_fma_rte_f64(double, double, + double); +__device__ __attribute__((const)) double __ocml_fma_rtn_f64(double, double, + double); +__device__ __attribute__((const)) double __ocml_fma_rtp_f64(double, double, + double); +__device__ __attribute__((const)) double __ocml_fma_rtz_f64(double, double, + double); + +__device__ __attribute__((const)) double +__llvm_amdgcn_rcp_f64(double) __asm("llvm.amdgcn.rcp.f64"); +__device__ __attribute__((const)) double +__llvm_amdgcn_rsq_f64(double) __asm("llvm.amdgcn.rsq.f64"); + +__device__ __attribute__((const)) _Float16 __ocml_ceil_f16(_Float16); +__device__ _Float16 __ocml_cos_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_exp_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_exp10_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_exp2_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_floor_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_fma_f16(_Float16, _Float16, + _Float16); +__device__ __attribute__((const)) _Float16 __ocml_fabs_f16(_Float16); +__device__ __attribute__((const)) int __ocml_isinf_f16(_Float16); +__device__ __attribute__((const)) int __ocml_isnan_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_log_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_log10_f16(_Float16); +__device__ __attribute__((pure)) _Float16 __ocml_log2_f16(_Float16); +__device__ __attribute__((const)) _Float16 __llvm_amdgcn_rcp_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_rint_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_rsqrt_f16(_Float16); +__device__ _Float16 __ocml_sin_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_sqrt_f16(_Float16); +__device__ __attribute__((const)) _Float16 __ocml_trunc_f16(_Float16); + +typedef _Float16 __2f16 __attribute__((ext_vector_type(2))); +typedef short __2i16 __attribute__((ext_vector_type(2))); + +__device__ __attribute__((const)) float __ockl_fdot2(__2f16 a, __2f16 b, + float c, bool s); +__device__ __attribute__((const)) __2f16 __ocml_ceil_2f16(__2f16); +__device__ __attribute__((const)) __2f16 __ocml_fabs_2f16(__2f16); +__device__ __2f16 __ocml_cos_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_exp_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_exp10_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_exp2_2f16(__2f16); +__device__ __attribute__((const)) __2f16 __ocml_floor_2f16(__2f16); +__device__ __attribute__((const)) +__2f16 __ocml_fma_2f16(__2f16, __2f16, __2f16); +__device__ __attribute__((const)) __2i16 __ocml_isinf_2f16(__2f16); +__device__ __attribute__((const)) __2i16 __ocml_isnan_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_log_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_log10_2f16(__2f16); +__device__ __attribute__((pure)) __2f16 __ocml_log2_2f16(__2f16); +__device__ inline __2f16 +__llvm_amdgcn_rcp_2f16(__2f16 __x) // Not currently exposed by ROCDL. +{ + return __2f16{__llvm_amdgcn_rcp_f16(__x.x), __llvm_amdgcn_rcp_f16(__x.y)}; +} +__device__ __attribute__((const)) __2f16 __ocml_rint_2f16(__2f16); +__device__ __attribute__((const)) __2f16 __ocml_rsqrt_2f16(__2f16); +__device__ __2f16 __ocml_sin_2f16(__2f16); +__device__ __attribute__((const)) __2f16 __ocml_sqrt_2f16(__2f16); +__device__ __attribute__((const)) __2f16 __ocml_trunc_2f16(__2f16); + +} // extern "C" + +#endif // __CLANG_HIP_LIBDEVICE_DECLARES_H__ diff --git a/clang/lib/Headers/__clang_hip_math.h b/clang/lib/Headers/__clang_hip_math.h new file mode 100644 index 000000000000..cf7014b9aefe --- /dev/null +++ b/clang/lib/Headers/__clang_hip_math.h @@ -0,0 +1,1185 @@ +/*===---- __clang_hip_math.h - HIP math decls -------------------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_HIP_MATH_H__ +#define __CLANG_HIP_MATH_H__ + +#include <algorithm> +#include <limits.h> +#include <limits> +#include <stdint.h> + +#pragma push_macro("__DEVICE__") +#pragma push_macro("__RETURN_TYPE") + +// to be consistent with __clang_cuda_math_forward_declares +#define __DEVICE__ static __device__ +#define __RETURN_TYPE bool + +__DEVICE__ +inline uint64_t __make_mantissa_base8(const char *__tagp) { + uint64_t __r = 0; + while (__tagp) { + char __tmp = *__tagp; + + if (__tmp >= '0' && __tmp <= '7') + __r = (__r * 8u) + __tmp - '0'; + else + return 0; + + ++__tagp; + } + + return __r; +} + +__DEVICE__ +inline uint64_t __make_mantissa_base10(const char *__tagp) { + uint64_t __r = 0; + while (__tagp) { + char __tmp = *__tagp; + + if (__tmp >= '0' && __tmp <= '9') + __r = (__r * 10u) + __tmp - '0'; + else + return 0; + + ++__tagp; + } + + return __r; +} + +__DEVICE__ +inline uint64_t __make_mantissa_base16(const char *__tagp) { + uint64_t __r = 0; + while (__tagp) { + char __tmp = *__tagp; + + if (__tmp >= '0' && __tmp <= '9') + __r = (__r * 16u) + __tmp - '0'; + else if (__tmp >= 'a' && __tmp <= 'f') + __r = (__r * 16u) + __tmp - 'a' + 10; + else if (__tmp >= 'A' && __tmp <= 'F') + __r = (__r * 16u) + __tmp - 'A' + 10; + else + return 0; + + ++__tagp; + } + + return __r; +} + +__DEVICE__ +inline uint64_t __make_mantissa(const char *__tagp) { + if (!__tagp) + return 0u; + + if (*__tagp == '0') { + ++__tagp; + + if (*__tagp == 'x' || *__tagp == 'X') + return __make_mantissa_base16(__tagp); + else + return __make_mantissa_base8(__tagp); + } + + return __make_mantissa_base10(__tagp); +} + +// BEGIN FLOAT +__DEVICE__ +inline float abs(float __x) { return __ocml_fabs_f32(__x); } +__DEVICE__ +inline float acosf(float __x) { return __ocml_acos_f32(__x); } +__DEVICE__ +inline float acoshf(float __x) { return __ocml_acosh_f32(__x); } +__DEVICE__ +inline float asinf(float __x) { return __ocml_asin_f32(__x); } +__DEVICE__ +inline float asinhf(float __x) { return __ocml_asinh_f32(__x); } +__DEVICE__ +inline float atan2f(float __x, float __y) { return __ocml_atan2_f32(__x, __y); } +__DEVICE__ +inline float atanf(float __x) { return __ocml_atan_f32(__x); } +__DEVICE__ +inline float atanhf(float __x) { return __ocml_atanh_f32(__x); } +__DEVICE__ +inline float cbrtf(float __x) { return __ocml_cbrt_f32(__x); } +__DEVICE__ +inline float ceilf(float __x) { return __ocml_ceil_f32(__x); } +__DEVICE__ +inline float copysignf(float __x, float __y) { + return __ocml_copysign_f32(__x, __y); +} +__DEVICE__ +inline float cosf(float __x) { return __ocml_cos_f32(__x); } +__DEVICE__ +inline float coshf(float __x) { return __ocml_cosh_f32(__x); } +__DEVICE__ +inline float cospif(float __x) { return __ocml_cospi_f32(__x); } +__DEVICE__ +inline float cyl_bessel_i0f(float __x) { return __ocml_i0_f32(__x); } +__DEVICE__ +inline float cyl_bessel_i1f(float __x) { return __ocml_i1_f32(__x); } +__DEVICE__ +inline float erfcf(float __x) { return __ocml_erfc_f32(__x); } +__DEVICE__ +inline float erfcinvf(float __x) { return __ocml_erfcinv_f32(__x); } +__DEVICE__ +inline float erfcxf(float __x) { return __ocml_erfcx_f32(__x); } +__DEVICE__ +inline float erff(float __x) { return __ocml_erf_f32(__x); } +__DEVICE__ +inline float erfinvf(float __x) { return __ocml_erfinv_f32(__x); } +__DEVICE__ +inline float exp10f(float __x) { return __ocml_exp10_f32(__x); } +__DEVICE__ +inline float exp2f(float __x) { return __ocml_exp2_f32(__x); } +__DEVICE__ +inline float expf(float __x) { return __ocml_exp_f32(__x); } +__DEVICE__ +inline float expm1f(float __x) { return __ocml_expm1_f32(__x); } +__DEVICE__ +inline float fabsf(float __x) { return __ocml_fabs_f32(__x); } +__DEVICE__ +inline float fdimf(float __x, float __y) { return __ocml_fdim_f32(__x, __y); } +__DEVICE__ +inline float fdividef(float __x, float __y) { return __x / __y; } +__DEVICE__ +inline float floorf(float __x) { return __ocml_floor_f32(__x); } +__DEVICE__ +inline float fmaf(float __x, float __y, float __z) { + return __ocml_fma_f32(__x, __y, __z); +} +__DEVICE__ +inline float fmaxf(float __x, float __y) { return __ocml_fmax_f32(__x, __y); } +__DEVICE__ +inline float fminf(float __x, float __y) { return __ocml_fmin_f32(__x, __y); } +__DEVICE__ +inline float fmodf(float __x, float __y) { return __ocml_fmod_f32(__x, __y); } +__DEVICE__ +inline float frexpf(float __x, int *__nptr) { + int __tmp; + float __r = + __ocml_frexp_f32(__x, (__attribute__((address_space(5))) int *)&__tmp); + *__nptr = __tmp; + + return __r; +} +__DEVICE__ +inline float hypotf(float __x, float __y) { return __ocml_hypot_f32(__x, __y); } +__DEVICE__ +inline int ilogbf(float __x) { return __ocml_ilogb_f32(__x); } +__DEVICE__ +inline __RETURN_TYPE isfinite(float __x) { return __ocml_isfinite_f32(__x); } +__DEVICE__ +inline __RETURN_TYPE isinf(float __x) { return __ocml_isinf_f32(__x); } +__DEVICE__ +inline __RETURN_TYPE isnan(float __x) { return __ocml_isnan_f32(__x); } +__DEVICE__ +inline float j0f(float __x) { return __ocml_j0_f32(__x); } +__DEVICE__ +inline float j1f(float __x) { return __ocml_j1_f32(__x); } +__DEVICE__ +inline float jnf(int __n, + float __x) { // TODO: we could use Ahmes multiplication + // and the Miller & Brown algorithm + // for linear recurrences to get O(log n) steps, but it's unclear if + // it'd be beneficial in this case. + if (__n == 0) + return j0f(__x); + if (__n == 1) + return j1f(__x); + + float __x0 = j0f(__x); + float __x1 = j1f(__x); + for (int __i = 1; __i < __n; ++__i) { + float __x2 = (2 * __i) / __x * __x1 - __x0; + __x0 = __x1; + __x1 = __x2; + } + + return __x1; +} +__DEVICE__ +inline float ldexpf(float __x, int __e) { return __ocml_ldexp_f32(__x, __e); } +__DEVICE__ +inline float lgammaf(float __x) { return __ocml_lgamma_f32(__x); } +__DEVICE__ +inline long long int llrintf(float __x) { return __ocml_rint_f32(__x); } +__DEVICE__ +inline long long int llroundf(float __x) { return __ocml_round_f32(__x); } +__DEVICE__ +inline float log10f(float __x) { return __ocml_log10_f32(__x); } +__DEVICE__ +inline float log1pf(float __x) { return __ocml_log1p_f32(__x); } +__DEVICE__ +inline float log2f(float __x) { return __ocml_log2_f32(__x); } +__DEVICE__ +inline float logbf(float __x) { return __ocml_logb_f32(__x); } +__DEVICE__ +inline float logf(float __x) { return __ocml_log_f32(__x); } +__DEVICE__ +inline long int lrintf(float __x) { return __ocml_rint_f32(__x); } +__DEVICE__ +inline long int lroundf(float __x) { return __ocml_round_f32(__x); } +__DEVICE__ +inline float modff(float __x, float *__iptr) { + float __tmp; + float __r = + __ocml_modf_f32(__x, (__attribute__((address_space(5))) float *)&__tmp); + *__iptr = __tmp; + + return __r; +} +__DEVICE__ +inline float nanf(const char *__tagp) { + union { + float val; + struct ieee_float { + uint32_t mantissa : 22; + uint32_t quiet : 1; + uint32_t exponent : 8; + uint32_t sign : 1; + } bits; + + static_assert(sizeof(float) == sizeof(ieee_float), ""); + } __tmp; + + __tmp.bits.sign = 0u; + __tmp.bits.exponent = ~0u; + __tmp.bits.quiet = 1u; + __tmp.bits.mantissa = __make_mantissa(__tagp); + + return __tmp.val; +} +__DEVICE__ +inline float nearbyintf(float __x) { return __ocml_nearbyint_f32(__x); } +__DEVICE__ +inline float nextafterf(float __x, float __y) { + return __ocml_nextafter_f32(__x, __y); +} +__DEVICE__ +inline float norm3df(float __x, float __y, float __z) { + return __ocml_len3_f32(__x, __y, __z); +} +__DEVICE__ +inline float norm4df(float __x, float __y, float __z, float __w) { + return __ocml_len4_f32(__x, __y, __z, __w); +} +__DEVICE__ +inline float normcdff(float __x) { return __ocml_ncdf_f32(__x); } +__DEVICE__ +inline float normcdfinvf(float __x) { return __ocml_ncdfinv_f32(__x); } +__DEVICE__ +inline float +normf(int __dim, + const float *__a) { // TODO: placeholder until OCML adds support. + float __r = 0; + while (__dim--) { + __r += __a[0] * __a[0]; + ++__a; + } + + return __ocml_sqrt_f32(__r); +} +__DEVICE__ +inline float powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } +__DEVICE__ +inline float rcbrtf(float __x) { return __ocml_rcbrt_f32(__x); } +__DEVICE__ +inline float remainderf(float __x, float __y) { + return __ocml_remainder_f32(__x, __y); +} +__DEVICE__ +inline float remquof(float __x, float __y, int *__quo) { + int __tmp; + float __r = __ocml_remquo_f32( + __x, __y, (__attribute__((address_space(5))) int *)&__tmp); + *__quo = __tmp; + + return __r; +} +__DEVICE__ +inline float rhypotf(float __x, float __y) { + return __ocml_rhypot_f32(__x, __y); +} +__DEVICE__ +inline float rintf(float __x) { return __ocml_rint_f32(__x); } +__DEVICE__ +inline float rnorm3df(float __x, float __y, float __z) { + return __ocml_rlen3_f32(__x, __y, __z); +} + +__DEVICE__ +inline float rnorm4df(float __x, float __y, float __z, float __w) { + return __ocml_rlen4_f32(__x, __y, __z, __w); +} +__DEVICE__ +inline float +rnormf(int __dim, + const float *__a) { // TODO: placeholder until OCML adds support. + float __r = 0; + while (__dim--) { + __r += __a[0] * __a[0]; + ++__a; + } + + return __ocml_rsqrt_f32(__r); +} +__DEVICE__ +inline float roundf(float __x) { return __ocml_round_f32(__x); } +__DEVICE__ +inline float rsqrtf(float __x) { return __ocml_rsqrt_f32(__x); } +__DEVICE__ +inline float scalblnf(float __x, long int __n) { + return (__n < INT_MAX) ? __ocml_scalbn_f32(__x, __n) + : __ocml_scalb_f32(__x, __n); +} +__DEVICE__ +inline float scalbnf(float __x, int __n) { return __ocml_scalbn_f32(__x, __n); } +__DEVICE__ +inline __RETURN_TYPE signbit(float __x) { return __ocml_signbit_f32(__x); } +__DEVICE__ +inline void sincosf(float __x, float *__sinptr, float *__cosptr) { + float __tmp; + + *__sinptr = + __ocml_sincos_f32(__x, (__attribute__((address_space(5))) float *)&__tmp); + *__cosptr = __tmp; +} +__DEVICE__ +inline void sincospif(float __x, float *__sinptr, float *__cosptr) { + float __tmp; + + *__sinptr = __ocml_sincospi_f32( + __x, (__attribute__((address_space(5))) float *)&__tmp); + *__cosptr = __tmp; +} +__DEVICE__ +inline float sinf(float __x) { return __ocml_sin_f32(__x); } +__DEVICE__ +inline float sinhf(float __x) { return __ocml_sinh_f32(__x); } +__DEVICE__ +inline float sinpif(float __x) { return __ocml_sinpi_f32(__x); } +__DEVICE__ +inline float sqrtf(float __x) { return __ocml_sqrt_f32(__x); } +__DEVICE__ +inline float tanf(float __x) { return __ocml_tan_f32(__x); } +__DEVICE__ +inline float tanhf(float __x) { return __ocml_tanh_f32(__x); } +__DEVICE__ +inline float tgammaf(float __x) { return __ocml_tgamma_f32(__x); } +__DEVICE__ +inline float truncf(float __x) { return __ocml_trunc_f32(__x); } +__DEVICE__ +inline float y0f(float __x) { return __ocml_y0_f32(__x); } +__DEVICE__ +inline float y1f(float __x) { return __ocml_y1_f32(__x); } +__DEVICE__ +inline float ynf(int __n, + float __x) { // TODO: we could use Ahmes multiplication + // and the Miller & Brown algorithm + // for linear recurrences to get O(log n) steps, but it's unclear if + // it'd be beneficial in this case. Placeholder until OCML adds + // support. + if (__n == 0) + return y0f(__x); + if (__n == 1) + return y1f(__x); + + float __x0 = y0f(__x); + float __x1 = y1f(__x); + for (int __i = 1; __i < __n; ++__i) { + float __x2 = (2 * __i) / __x * __x1 - __x0; + __x0 = __x1; + __x1 = __x2; + } + + return __x1; +} + +// BEGIN INTRINSICS +__DEVICE__ +inline float __cosf(float __x) { return __ocml_native_cos_f32(__x); } +__DEVICE__ +inline float __exp10f(float __x) { return __ocml_native_exp10_f32(__x); } +__DEVICE__ +inline float __expf(float __x) { return __ocml_native_exp_f32(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fadd_rd(float __x, float __y) { + return __ocml_add_rtn_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __fadd_rn(float __x, float __y) { return __x + __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fadd_ru(float __x, float __y) { + return __ocml_add_rtp_f32(__x, __y); +} +__DEVICE__ +inline float __fadd_rz(float __x, float __y) { + return __ocml_add_rtz_f32(__x, __y); +} +__DEVICE__ +inline float __fdiv_rd(float __x, float __y) { + return __ocml_div_rtn_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __fdiv_rn(float __x, float __y) { return __x / __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fdiv_ru(float __x, float __y) { + return __ocml_div_rtp_f32(__x, __y); +} +__DEVICE__ +inline float __fdiv_rz(float __x, float __y) { + return __ocml_div_rtz_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __fdividef(float __x, float __y) { return __x / __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fmaf_rd(float __x, float __y, float __z) { + return __ocml_fma_rtn_f32(__x, __y, __z); +} +#endif +__DEVICE__ +inline float __fmaf_rn(float __x, float __y, float __z) { + return __ocml_fma_f32(__x, __y, __z); +} +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fmaf_ru(float __x, float __y, float __z) { + return __ocml_fma_rtp_f32(__x, __y, __z); +} +__DEVICE__ +inline float __fmaf_rz(float __x, float __y, float __z) { + return __ocml_fma_rtz_f32(__x, __y, __z); +} +__DEVICE__ +inline float __fmul_rd(float __x, float __y) { + return __ocml_mul_rtn_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __fmul_rn(float __x, float __y) { return __x * __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fmul_ru(float __x, float __y) { + return __ocml_mul_rtp_f32(__x, __y); +} +__DEVICE__ +inline float __fmul_rz(float __x, float __y) { + return __ocml_mul_rtz_f32(__x, __y); +} +__DEVICE__ +inline float __frcp_rd(float __x) { return __llvm_amdgcn_rcp_f32(__x); } +#endif +__DEVICE__ +inline float __frcp_rn(float __x) { return __llvm_amdgcn_rcp_f32(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __frcp_ru(float __x) { return __llvm_amdgcn_rcp_f32(__x); } +__DEVICE__ +inline float __frcp_rz(float __x) { return __llvm_amdgcn_rcp_f32(__x); } +#endif +__DEVICE__ +inline float __frsqrt_rn(float __x) { return __llvm_amdgcn_rsq_f32(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fsqrt_rd(float __x) { return __ocml_sqrt_rtn_f32(__x); } +#endif +__DEVICE__ +inline float __fsqrt_rn(float __x) { return __ocml_native_sqrt_f32(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fsqrt_ru(float __x) { return __ocml_sqrt_rtp_f32(__x); } +__DEVICE__ +inline float __fsqrt_rz(float __x) { return __ocml_sqrt_rtz_f32(__x); } +__DEVICE__ +inline float __fsub_rd(float __x, float __y) { + return __ocml_sub_rtn_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __fsub_rn(float __x, float __y) { return __x - __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline float __fsub_ru(float __x, float __y) { + return __ocml_sub_rtp_f32(__x, __y); +} +__DEVICE__ +inline float __fsub_rz(float __x, float __y) { + return __ocml_sub_rtz_f32(__x, __y); +} +#endif +__DEVICE__ +inline float __log10f(float __x) { return __ocml_native_log10_f32(__x); } +__DEVICE__ +inline float __log2f(float __x) { return __ocml_native_log2_f32(__x); } +__DEVICE__ +inline float __logf(float __x) { return __ocml_native_log_f32(__x); } +__DEVICE__ +inline float __powf(float __x, float __y) { return __ocml_pow_f32(__x, __y); } +__DEVICE__ +inline float __saturatef(float __x) { + return (__x < 0) ? 0 : ((__x > 1) ? 1 : __x); +} +__DEVICE__ +inline void __sincosf(float __x, float *__sinptr, float *__cosptr) { + *__sinptr = __ocml_native_sin_f32(__x); + *__cosptr = __ocml_native_cos_f32(__x); +} +__DEVICE__ +inline float __sinf(float __x) { return __ocml_native_sin_f32(__x); } +__DEVICE__ +inline float __tanf(float __x) { return __ocml_tan_f32(__x); } +// END INTRINSICS +// END FLOAT + +// BEGIN DOUBLE +__DEVICE__ +inline double abs(double __x) { return __ocml_fabs_f64(__x); } +__DEVICE__ +inline double acos(double __x) { return __ocml_acos_f64(__x); } +__DEVICE__ +inline double acosh(double __x) { return __ocml_acosh_f64(__x); } +__DEVICE__ +inline double asin(double __x) { return __ocml_asin_f64(__x); } +__DEVICE__ +inline double asinh(double __x) { return __ocml_asinh_f64(__x); } +__DEVICE__ +inline double atan(double __x) { return __ocml_atan_f64(__x); } +__DEVICE__ +inline double atan2(double __x, double __y) { + return __ocml_atan2_f64(__x, __y); +} +__DEVICE__ +inline double atanh(double __x) { return __ocml_atanh_f64(__x); } +__DEVICE__ +inline double cbrt(double __x) { return __ocml_cbrt_f64(__x); } +__DEVICE__ +inline double ceil(double __x) { return __ocml_ceil_f64(__x); } +__DEVICE__ +inline double copysign(double __x, double __y) { + return __ocml_copysign_f64(__x, __y); +} +__DEVICE__ +inline double cos(double __x) { return __ocml_cos_f64(__x); } +__DEVICE__ +inline double cosh(double __x) { return __ocml_cosh_f64(__x); } +__DEVICE__ +inline double cospi(double __x) { return __ocml_cospi_f64(__x); } +__DEVICE__ +inline double cyl_bessel_i0(double __x) { return __ocml_i0_f64(__x); } +__DEVICE__ +inline double cyl_bessel_i1(double __x) { return __ocml_i1_f64(__x); } +__DEVICE__ +inline double erf(double __x) { return __ocml_erf_f64(__x); } +__DEVICE__ +inline double erfc(double __x) { return __ocml_erfc_f64(__x); } +__DEVICE__ +inline double erfcinv(double __x) { return __ocml_erfcinv_f64(__x); } +__DEVICE__ +inline double erfcx(double __x) { return __ocml_erfcx_f64(__x); } +__DEVICE__ +inline double erfinv(double __x) { return __ocml_erfinv_f64(__x); } +__DEVICE__ +inline double exp(double __x) { return __ocml_exp_f64(__x); } +__DEVICE__ +inline double exp10(double __x) { return __ocml_exp10_f64(__x); } +__DEVICE__ +inline double exp2(double __x) { return __ocml_exp2_f64(__x); } +__DEVICE__ +inline double expm1(double __x) { return __ocml_expm1_f64(__x); } +__DEVICE__ +inline double fabs(double __x) { return __ocml_fabs_f64(__x); } +__DEVICE__ +inline double fdim(double __x, double __y) { return __ocml_fdim_f64(__x, __y); } +__DEVICE__ +inline double floor(double __x) { return __ocml_floor_f64(__x); } +__DEVICE__ +inline double fma(double __x, double __y, double __z) { + return __ocml_fma_f64(__x, __y, __z); +} +__DEVICE__ +inline double fmax(double __x, double __y) { return __ocml_fmax_f64(__x, __y); } +__DEVICE__ +inline double fmin(double __x, double __y) { return __ocml_fmin_f64(__x, __y); } +__DEVICE__ +inline double fmod(double __x, double __y) { return __ocml_fmod_f64(__x, __y); } +__DEVICE__ +inline double frexp(double __x, int *__nptr) { + int __tmp; + double __r = + __ocml_frexp_f64(__x, (__attribute__((address_space(5))) int *)&__tmp); + *__nptr = __tmp; + + return __r; +} +__DEVICE__ +inline double hypot(double __x, double __y) { + return __ocml_hypot_f64(__x, __y); +} +__DEVICE__ +inline int ilogb(double __x) { return __ocml_ilogb_f64(__x); } +__DEVICE__ +inline __RETURN_TYPE isfinite(double __x) { return __ocml_isfinite_f64(__x); } +__DEVICE__ +inline __RETURN_TYPE isinf(double __x) { return __ocml_isinf_f64(__x); } +__DEVICE__ +inline __RETURN_TYPE isnan(double __x) { return __ocml_isnan_f64(__x); } +__DEVICE__ +inline double j0(double __x) { return __ocml_j0_f64(__x); } +__DEVICE__ +inline double j1(double __x) { return __ocml_j1_f64(__x); } +__DEVICE__ +inline double jn(int __n, + double __x) { // TODO: we could use Ahmes multiplication + // and the Miller & Brown algorithm + // for linear recurrences to get O(log n) steps, but it's unclear if + // it'd be beneficial in this case. Placeholder until OCML adds + // support. + if (__n == 0) + return j0f(__x); + if (__n == 1) + return j1f(__x); + + double __x0 = j0f(__x); + double __x1 = j1f(__x); + for (int __i = 1; __i < __n; ++__i) { + double __x2 = (2 * __i) / __x * __x1 - __x0; + __x0 = __x1; + __x1 = __x2; + } + + return __x1; +} +__DEVICE__ +inline double ldexp(double __x, int __e) { return __ocml_ldexp_f64(__x, __e); } +__DEVICE__ +inline double lgamma(double __x) { return __ocml_lgamma_f64(__x); } +__DEVICE__ +inline long long int llrint(double __x) { return __ocml_rint_f64(__x); } +__DEVICE__ +inline long long int llround(double __x) { return __ocml_round_f64(__x); } +__DEVICE__ +inline double log(double __x) { return __ocml_log_f64(__x); } +__DEVICE__ +inline double log10(double __x) { return __ocml_log10_f64(__x); } +__DEVICE__ +inline double log1p(double __x) { return __ocml_log1p_f64(__x); } +__DEVICE__ +inline double log2(double __x) { return __ocml_log2_f64(__x); } +__DEVICE__ +inline double logb(double __x) { return __ocml_logb_f64(__x); } +__DEVICE__ +inline long int lrint(double __x) { return __ocml_rint_f64(__x); } +__DEVICE__ +inline long int lround(double __x) { return __ocml_round_f64(__x); } +__DEVICE__ +inline double modf(double __x, double *__iptr) { + double __tmp; + double __r = + __ocml_modf_f64(__x, (__attribute__((address_space(5))) double *)&__tmp); + *__iptr = __tmp; + + return __r; +} +__DEVICE__ +inline double nan(const char *__tagp) { +#if !_WIN32 + union { + double val; + struct ieee_double { + uint64_t mantissa : 51; + uint32_t quiet : 1; + uint32_t exponent : 11; + uint32_t sign : 1; + } bits; + static_assert(sizeof(double) == sizeof(ieee_double), ""); + } __tmp; + + __tmp.bits.sign = 0u; + __tmp.bits.exponent = ~0u; + __tmp.bits.quiet = 1u; + __tmp.bits.mantissa = __make_mantissa(__tagp); + + return __tmp.val; +#else + static_assert(sizeof(uint64_t) == sizeof(double)); + uint64_t val = __make_mantissa(__tagp); + val |= 0xFFF << 51; + return *reinterpret_cast<double *>(&val); +#endif +} +__DEVICE__ +inline double nearbyint(double __x) { return __ocml_nearbyint_f64(__x); } +__DEVICE__ +inline double nextafter(double __x, double __y) { + return __ocml_nextafter_f64(__x, __y); +} +__DEVICE__ +inline double +norm(int __dim, + const double *__a) { // TODO: placeholder until OCML adds support. + double __r = 0; + while (__dim--) { + __r += __a[0] * __a[0]; + ++__a; + } + + return __ocml_sqrt_f64(__r); +} +__DEVICE__ +inline double norm3d(double __x, double __y, double __z) { + return __ocml_len3_f64(__x, __y, __z); +} +__DEVICE__ +inline double norm4d(double __x, double __y, double __z, double __w) { + return __ocml_len4_f64(__x, __y, __z, __w); +} +__DEVICE__ +inline double normcdf(double __x) { return __ocml_ncdf_f64(__x); } +__DEVICE__ +inline double normcdfinv(double __x) { return __ocml_ncdfinv_f64(__x); } +__DEVICE__ +inline double pow(double __x, double __y) { return __ocml_pow_f64(__x, __y); } +__DEVICE__ +inline double rcbrt(double __x) { return __ocml_rcbrt_f64(__x); } +__DEVICE__ +inline double remainder(double __x, double __y) { + return __ocml_remainder_f64(__x, __y); +} +__DEVICE__ +inline double remquo(double __x, double __y, int *__quo) { + int __tmp; + double __r = __ocml_remquo_f64( + __x, __y, (__attribute__((address_space(5))) int *)&__tmp); + *__quo = __tmp; + + return __r; +} +__DEVICE__ +inline double rhypot(double __x, double __y) { + return __ocml_rhypot_f64(__x, __y); +} +__DEVICE__ +inline double rint(double __x) { return __ocml_rint_f64(__x); } +__DEVICE__ +inline double +rnorm(int __dim, + const double *__a) { // TODO: placeholder until OCML adds support. + double __r = 0; + while (__dim--) { + __r += __a[0] * __a[0]; + ++__a; + } + + return __ocml_rsqrt_f64(__r); +} +__DEVICE__ +inline double rnorm3d(double __x, double __y, double __z) { + return __ocml_rlen3_f64(__x, __y, __z); +} +__DEVICE__ +inline double rnorm4d(double __x, double __y, double __z, double __w) { + return __ocml_rlen4_f64(__x, __y, __z, __w); +} +__DEVICE__ +inline double round(double __x) { return __ocml_round_f64(__x); } +__DEVICE__ +inline double rsqrt(double __x) { return __ocml_rsqrt_f64(__x); } +__DEVICE__ +inline double scalbln(double __x, long int __n) { + return (__n < INT_MAX) ? __ocml_scalbn_f64(__x, __n) + : __ocml_scalb_f64(__x, __n); +} +__DEVICE__ +inline double scalbn(double __x, int __n) { + return __ocml_scalbn_f64(__x, __n); +} +__DEVICE__ +inline __RETURN_TYPE signbit(double __x) { return __ocml_signbit_f64(__x); } +__DEVICE__ +inline double sin(double __x) { return __ocml_sin_f64(__x); } +__DEVICE__ +inline void sincos(double __x, double *__sinptr, double *__cosptr) { + double __tmp; + *__sinptr = __ocml_sincos_f64( + __x, (__attribute__((address_space(5))) double *)&__tmp); + *__cosptr = __tmp; +} +__DEVICE__ +inline void sincospi(double __x, double *__sinptr, double *__cosptr) { + double __tmp; + *__sinptr = __ocml_sincospi_f64( + __x, (__attribute__((address_space(5))) double *)&__tmp); + *__cosptr = __tmp; +} +__DEVICE__ +inline double sinh(double __x) { return __ocml_sinh_f64(__x); } +__DEVICE__ +inline double sinpi(double __x) { return __ocml_sinpi_f64(__x); } +__DEVICE__ +inline double sqrt(double __x) { return __ocml_sqrt_f64(__x); } +__DEVICE__ +inline double tan(double __x) { return __ocml_tan_f64(__x); } +__DEVICE__ +inline double tanh(double __x) { return __ocml_tanh_f64(__x); } +__DEVICE__ +inline double tgamma(double __x) { return __ocml_tgamma_f64(__x); } +__DEVICE__ +inline double trunc(double __x) { return __ocml_trunc_f64(__x); } +__DEVICE__ +inline double y0(double __x) { return __ocml_y0_f64(__x); } +__DEVICE__ +inline double y1(double __x) { return __ocml_y1_f64(__x); } +__DEVICE__ +inline double yn(int __n, + double __x) { // TODO: we could use Ahmes multiplication + // and the Miller & Brown algorithm + // for linear recurrences to get O(log n) steps, but it's unclear if + // it'd be beneficial in this case. Placeholder until OCML adds + // support. + if (__n == 0) + return j0f(__x); + if (__n == 1) + return j1f(__x); + + double __x0 = j0f(__x); + double __x1 = j1f(__x); + for (int __i = 1; __i < __n; ++__i) { + double __x2 = (2 * __i) / __x * __x1 - __x0; + __x0 = __x1; + __x1 = __x2; + } + + return __x1; +} + +// BEGIN INTRINSICS +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __dadd_rd(double __x, double __y) { + return __ocml_add_rtn_f64(__x, __y); +} +#endif +__DEVICE__ +inline double __dadd_rn(double __x, double __y) { return __x + __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __dadd_ru(double __x, double __y) { + return __ocml_add_rtp_f64(__x, __y); +} +__DEVICE__ +inline double __dadd_rz(double __x, double __y) { + return __ocml_add_rtz_f64(__x, __y); +} +__DEVICE__ +inline double __ddiv_rd(double __x, double __y) { + return __ocml_div_rtn_f64(__x, __y); +} +#endif +__DEVICE__ +inline double __ddiv_rn(double __x, double __y) { return __x / __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __ddiv_ru(double __x, double __y) { + return __ocml_div_rtp_f64(__x, __y); +} +__DEVICE__ +inline double __ddiv_rz(double __x, double __y) { + return __ocml_div_rtz_f64(__x, __y); +} +__DEVICE__ +inline double __dmul_rd(double __x, double __y) { + return __ocml_mul_rtn_f64(__x, __y); +} +#endif +__DEVICE__ +inline double __dmul_rn(double __x, double __y) { return __x * __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __dmul_ru(double __x, double __y) { + return __ocml_mul_rtp_f64(__x, __y); +} +__DEVICE__ +inline double __dmul_rz(double __x, double __y) { + return __ocml_mul_rtz_f64(__x, __y); +} +__DEVICE__ +inline double __drcp_rd(double __x) { return __llvm_amdgcn_rcp_f64(__x); } +#endif +__DEVICE__ +inline double __drcp_rn(double __x) { return __llvm_amdgcn_rcp_f64(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __drcp_ru(double __x) { return __llvm_amdgcn_rcp_f64(__x); } +__DEVICE__ +inline double __drcp_rz(double __x) { return __llvm_amdgcn_rcp_f64(__x); } +__DEVICE__ +inline double __dsqrt_rd(double __x) { return __ocml_sqrt_rtn_f64(__x); } +#endif +__DEVICE__ +inline double __dsqrt_rn(double __x) { return __ocml_sqrt_f64(__x); } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __dsqrt_ru(double __x) { return __ocml_sqrt_rtp_f64(__x); } +__DEVICE__ +inline double __dsqrt_rz(double __x) { return __ocml_sqrt_rtz_f64(__x); } +__DEVICE__ +inline double __dsub_rd(double __x, double __y) { + return __ocml_sub_rtn_f64(__x, __y); +} +#endif +__DEVICE__ +inline double __dsub_rn(double __x, double __y) { return __x - __y; } +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __dsub_ru(double __x, double __y) { + return __ocml_sub_rtp_f64(__x, __y); +} +__DEVICE__ +inline double __dsub_rz(double __x, double __y) { + return __ocml_sub_rtz_f64(__x, __y); +} +__DEVICE__ +inline double __fma_rd(double __x, double __y, double __z) { + return __ocml_fma_rtn_f64(__x, __y, __z); +} +#endif +__DEVICE__ +inline double __fma_rn(double __x, double __y, double __z) { + return __ocml_fma_f64(__x, __y, __z); +} +#if defined OCML_BASIC_ROUNDED_OPERATIONS +__DEVICE__ +inline double __fma_ru(double __x, double __y, double __z) { + return __ocml_fma_rtp_f64(__x, __y, __z); +} +__DEVICE__ +inline double __fma_rz(double __x, double __y, double __z) { + return __ocml_fma_rtz_f64(__x, __y, __z); +} +#endif +// END INTRINSICS +// END DOUBLE + +// BEGIN INTEGER +__DEVICE__ +inline int abs(int __x) { + int __sgn = __x >> (sizeof(int) * CHAR_BIT - 1); + return (__x ^ __sgn) - __sgn; +} +__DEVICE__ +inline long labs(long __x) { + long __sgn = __x >> (sizeof(long) * CHAR_BIT - 1); + return (__x ^ __sgn) - __sgn; +} +__DEVICE__ +inline long long llabs(long long __x) { + long long __sgn = __x >> (sizeof(long long) * CHAR_BIT - 1); + return (__x ^ __sgn) - __sgn; +} + +#if defined(__cplusplus) +__DEVICE__ +inline long abs(long __x) { return labs(__x); } +__DEVICE__ +inline long long abs(long long __x) { return llabs(__x); } +#endif +// END INTEGER + +__DEVICE__ +inline _Float16 fma(_Float16 __x, _Float16 __y, _Float16 __z) { + return __ocml_fma_f16(__x, __y, __z); +} + +__DEVICE__ +inline float fma(float __x, float __y, float __z) { + return fmaf(__x, __y, __z); +} + +#pragma push_macro("__DEF_FUN1") +#pragma push_macro("__DEF_FUN2") +#pragma push_macro("__DEF_FUNI") +#pragma push_macro("__DEF_FLOAT_FUN2I") +#pragma push_macro("__HIP_OVERLOAD1") +#pragma push_macro("__HIP_OVERLOAD2") + +// __hip_enable_if::type is a type function which returns __T if __B is true. +template <bool __B, class __T = void> struct __hip_enable_if {}; + +template <class __T> struct __hip_enable_if<true, __T> { typedef __T type; }; + +// __HIP_OVERLOAD1 is used to resolve function calls with integer argument to +// avoid compilation error due to ambibuity. e.g. floor(5) is resolved with +// floor(double). +#define __HIP_OVERLOAD1(__retty, __fn) \ + template <typename __T> \ + __DEVICE__ typename __hip_enable_if<std::numeric_limits<__T>::is_integer, \ + __retty>::type \ + __fn(__T __x) { \ + return ::__fn((double)__x); \ + } + +// __HIP_OVERLOAD2 is used to resolve function calls with mixed float/double +// or integer argument to avoid compilation error due to ambibuity. e.g. +// max(5.0f, 6.0) is resolved with max(double, double). +#define __HIP_OVERLOAD2(__retty, __fn) \ + template <typename __T1, typename __T2> \ + __DEVICE__ \ + typename __hip_enable_if<std::numeric_limits<__T1>::is_specialized && \ + std::numeric_limits<__T2>::is_specialized, \ + __retty>::type \ + __fn(__T1 __x, __T2 __y) { \ + return __fn((double)__x, (double)__y); \ + } + +// Define cmath functions with float argument and returns float. +#define __DEF_FUN1(__retty, __func) \ + __DEVICE__ \ + inline float __func(float __x) { return __func##f(__x); } \ + __HIP_OVERLOAD1(__retty, __func) + +// Define cmath functions with float argument and returns __retty. +#define __DEF_FUNI(__retty, __func) \ + __DEVICE__ \ + inline __retty __func(float __x) { return __func##f(__x); } \ + __HIP_OVERLOAD1(__retty, __func) + +// define cmath functions with two float arguments. +#define __DEF_FUN2(__retty, __func) \ + __DEVICE__ \ + inline float __func(float __x, float __y) { return __func##f(__x, __y); } \ + __HIP_OVERLOAD2(__retty, __func) + +__DEF_FUN1(double, acos) +__DEF_FUN1(double, acosh) +__DEF_FUN1(double, asin) +__DEF_FUN1(double, asinh) +__DEF_FUN1(double, atan) +__DEF_FUN2(double, atan2); +__DEF_FUN1(double, atanh) +__DEF_FUN1(double, cbrt) +__DEF_FUN1(double, ceil) +__DEF_FUN2(double, copysign); +__DEF_FUN1(double, cos) +__DEF_FUN1(double, cosh) +__DEF_FUN1(double, erf) +__DEF_FUN1(double, erfc) +__DEF_FUN1(double, exp) +__DEF_FUN1(double, exp2) +__DEF_FUN1(double, expm1) +__DEF_FUN1(double, fabs) +__DEF_FUN2(double, fdim); +__DEF_FUN1(double, floor) +__DEF_FUN2(double, fmax); +__DEF_FUN2(double, fmin); +__DEF_FUN2(double, fmod); +//__HIP_OVERLOAD1(int, fpclassify) +__DEF_FUN2(double, hypot); +__DEF_FUNI(int, ilogb) +__HIP_OVERLOAD1(bool, isfinite) +__HIP_OVERLOAD2(bool, isgreater); +__HIP_OVERLOAD2(bool, isgreaterequal); +__HIP_OVERLOAD1(bool, isinf); +__HIP_OVERLOAD2(bool, isless); +__HIP_OVERLOAD2(bool, islessequal); +__HIP_OVERLOAD2(bool, islessgreater); +__HIP_OVERLOAD1(bool, isnan); +//__HIP_OVERLOAD1(bool, isnormal) +__HIP_OVERLOAD2(bool, isunordered); +__DEF_FUN1(double, lgamma) +__DEF_FUN1(double, log) +__DEF_FUN1(double, log10) +__DEF_FUN1(double, log1p) +__DEF_FUN1(double, log2) +__DEF_FUN1(double, logb) +__DEF_FUNI(long long, llrint) +__DEF_FUNI(long long, llround) +__DEF_FUNI(long, lrint) +__DEF_FUNI(long, lround) +__DEF_FUN1(double, nearbyint); +__DEF_FUN2(double, nextafter); +__DEF_FUN2(double, pow); +__DEF_FUN2(double, remainder); +__DEF_FUN1(double, rint); +__DEF_FUN1(double, round); +__HIP_OVERLOAD1(bool, signbit) +__DEF_FUN1(double, sin) +__DEF_FUN1(double, sinh) +__DEF_FUN1(double, sqrt) +__DEF_FUN1(double, tan) +__DEF_FUN1(double, tanh) +__DEF_FUN1(double, tgamma) +__DEF_FUN1(double, trunc); + +// define cmath functions with a float and an integer argument. +#define __DEF_FLOAT_FUN2I(__func) \ + __DEVICE__ \ + inline float __func(float __x, int __y) { return __func##f(__x, __y); } +__DEF_FLOAT_FUN2I(scalbn) + +template <class T> __DEVICE__ inline T min(T __arg1, T __arg2) { + return (__arg1 < __arg2) ? __arg1 : __arg2; +} + +template <class T> __DEVICE__ inline T max(T __arg1, T __arg2) { + return (__arg1 > __arg2) ? __arg1 : __arg2; +} + +__DEVICE__ inline int min(int __arg1, int __arg2) { + return (__arg1 < __arg2) ? __arg1 : __arg2; +} +__DEVICE__ inline int max(int __arg1, int __arg2) { + return (__arg1 > __arg2) ? __arg1 : __arg2; +} + +__DEVICE__ +inline float max(float __x, float __y) { return fmaxf(__x, __y); } + +__DEVICE__ +inline double max(double __x, double __y) { return fmax(__x, __y); } + +__DEVICE__ +inline float min(float __x, float __y) { return fminf(__x, __y); } + +__DEVICE__ +inline double min(double __x, double __y) { return fmin(__x, __y); } + +__HIP_OVERLOAD2(double, max) +__HIP_OVERLOAD2(double, min) + +__host__ inline static int min(int __arg1, int __arg2) { + return std::min(__arg1, __arg2); +} + +__host__ inline static int max(int __arg1, int __arg2) { + return std::max(__arg1, __arg2); +} + +#pragma pop_macro("__DEF_FUN1") +#pragma pop_macro("__DEF_FUN2") +#pragma pop_macro("__DEF_FUNI") +#pragma pop_macro("__DEF_FLOAT_FUN2I") +#pragma pop_macro("__HIP_OVERLOAD1") +#pragma pop_macro("__HIP_OVERLOAD2") +#pragma pop_macro("__DEVICE__") +#pragma pop_macro("__RETURN_TYPE") + +#endif // __CLANG_HIP_MATH_H__ diff --git a/clang/lib/Headers/__clang_hip_runtime_wrapper.h b/clang/lib/Headers/__clang_hip_runtime_wrapper.h new file mode 100644 index 000000000000..addae5605a5b --- /dev/null +++ b/clang/lib/Headers/__clang_hip_runtime_wrapper.h @@ -0,0 +1,64 @@ +/*===---- __clang_hip_runtime_wrapper.h - HIP runtime support ---------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +/* + * WARNING: This header is intended to be directly -include'd by + * the compiler and is not supposed to be included by users. + * + */ + +#ifndef __CLANG_HIP_RUNTIME_WRAPPER_H__ +#define __CLANG_HIP_RUNTIME_WRAPPER_H__ + +#if __HIP__ + +#include <cmath> +#include <cstdlib> +#include <stdlib.h> + +#define __host__ __attribute__((host)) +#define __device__ __attribute__((device)) +#define __global__ __attribute__((global)) +#define __shared__ __attribute__((shared)) +#define __constant__ __attribute__((constant)) + +#if __HIP_ENABLE_DEVICE_MALLOC__ +extern "C" __device__ void *__hip_malloc(size_t __size); +extern "C" __device__ void *__hip_free(void *__ptr); +static inline __device__ void *malloc(size_t __size) { + return __hip_malloc(__size); +} +static inline __device__ void *free(void *__ptr) { return __hip_free(__ptr); } +#else +static inline __device__ void *malloc(size_t __size) { + __builtin_trap(); + return nullptr; +} +static inline __device__ void *free(void *__ptr) { + __builtin_trap(); + return nullptr; +} +#endif + +#include <__clang_hip_libdevice_declares.h> +#include <__clang_hip_math.h> + +#if !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ +#include <__clang_cuda_math_forward_declares.h> +#include <__clang_cuda_complex_builtins.h> + +#include <algorithm> +#include <complex> +#include <new> +#endif // !_OPENMP || __HIP_ENABLE_CUDA_WRAPPER_FOR_OPENMP__ + +#define __CLANG_HIP_RUNTIME_WRAPPER_INCLUDED__ 1 + +#endif // __HIP__ +#endif // __CLANG_HIP_RUNTIME_WRAPPER_H__ diff --git a/clang/lib/Headers/altivec.h b/clang/lib/Headers/altivec.h index 7e231a2a428e..ac5f43836316 100644 --- a/clang/lib/Headers/altivec.h +++ b/clang/lib/Headers/altivec.h @@ -16761,6 +16761,408 @@ static vector signed short __ATTRS_o_ai vec_nabs(vector signed short __a) { static vector signed char __ATTRS_o_ai vec_nabs(vector signed char __a) { return __builtin_altivec_vminsb(__a, -__a); } + +#ifdef __POWER10_VECTOR__ +/* vec_pdep */ + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_pdep(vector unsigned long long __a, vector unsigned long long __b) { + return __builtin_altivec_vpdepd(__a, __b); +} + +/* vec_pext */ + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_pext(vector unsigned long long __a, vector unsigned long long __b) { + return __builtin_altivec_vpextd(__a, __b); +} + +/* vec_cfuge */ + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_cfuge(vector unsigned long long __a, vector unsigned long long __b) { + return __builtin_altivec_vcfuged(__a, __b); +} + +/* vec_gnb */ + +#define vec_gnb(__a, __b) __builtin_altivec_vgnb(__a, __b) + +/* vec_ternarylogic */ +#ifdef __VSX__ +#define vec_ternarylogic(__a, __b, __c, __imm) \ + _Generic((__a), vector unsigned char \ + : __builtin_vsx_xxeval((vector unsigned long long)(__a), \ + (vector unsigned long long)(__b), \ + (vector unsigned long long)(__c), (__imm)), \ + vector unsigned short \ + : __builtin_vsx_xxeval((vector unsigned long long)(__a), \ + (vector unsigned long long)(__b), \ + (vector unsigned long long)(__c), (__imm)), \ + vector unsigned int \ + : __builtin_vsx_xxeval((vector unsigned long long)(__a), \ + (vector unsigned long long)(__b), \ + (vector unsigned long long)(__c), (__imm)), \ + vector unsigned long long \ + : __builtin_vsx_xxeval((vector unsigned long long)(__a), \ + (vector unsigned long long)(__b), \ + (vector unsigned long long)(__c), (__imm)), \ + vector unsigned __int128 \ + : __builtin_vsx_xxeval((vector unsigned long long)(__a), \ + (vector unsigned long long)(__b), \ + (vector unsigned long long)(__c), (__imm))) +#endif /* __VSX__ */ + +/* vec_genpcvm */ + +#ifdef __VSX__ +#define vec_genpcvm(__a, __imm) \ + _Generic((__a), vector unsigned char \ + : __builtin_vsx_xxgenpcvbm((__a), (int)(__imm)), \ + vector unsigned short \ + : __builtin_vsx_xxgenpcvhm((__a), (int)(__imm)), \ + vector unsigned int \ + : __builtin_vsx_xxgenpcvwm((__a), (int)(__imm)), \ + vector unsigned long long \ + : __builtin_vsx_xxgenpcvdm((__a), (int)(__imm))) +#endif /* __VSX__ */ + +/* vec_clrl */ + +static __inline__ vector signed char __ATTRS_o_ai +vec_clrl(vector signed char __a, unsigned int __n) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vclrrb(__a, __n); +#else + return __builtin_altivec_vclrlb( __a, __n); +#endif +} + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_clrl(vector unsigned char __a, unsigned int __n) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vclrrb((vector signed char)__a, __n); +#else + return __builtin_altivec_vclrlb((vector signed char)__a, __n); +#endif +} + +/* vec_clrr */ + +static __inline__ vector signed char __ATTRS_o_ai +vec_clrr(vector signed char __a, unsigned int __n) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vclrlb(__a, __n); +#else + return __builtin_altivec_vclrrb( __a, __n); +#endif +} + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_clrr(vector unsigned char __a, unsigned int __n) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vclrlb((vector signed char)__a, __n); +#else + return __builtin_altivec_vclrrb((vector signed char)__a, __n); +#endif +} + +/* vec_cntlzm */ + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_cntlzm(vector unsigned long long __a, vector unsigned long long __b) { + return __builtin_altivec_vclzdm(__a, __b); +} + +/* vec_cnttzm */ + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_cnttzm(vector unsigned long long __a, vector unsigned long long __b) { + return __builtin_altivec_vctzdm(__a, __b); +} + +/* vec_sldbi */ + +#define vec_sldb(__a, __b, __c) __builtin_altivec_vsldbi(__a, __b, (__c & 0x7)) + +/* vec_srdbi */ + +#define vec_srdb(__a, __b, __c) __builtin_altivec_vsrdbi(__a, __b, (__c & 0x7)) + +/* vec_insertl */ + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_insertl(unsigned char __a, vector unsigned char __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsbrx(__b, __c, __a); +#else + return __builtin_altivec_vinsblx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned short __ATTRS_o_ai +vec_insertl(unsigned short __a, vector unsigned short __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinshrx(__b, __c, __a); +#else + return __builtin_altivec_vinshlx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned int __ATTRS_o_ai +vec_insertl(unsigned int __a, vector unsigned int __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinswrx(__b, __c, __a); +#else + return __builtin_altivec_vinswlx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_insertl(unsigned long long __a, vector unsigned long long __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsdrx(__b, __c, __a); +#else + return __builtin_altivec_vinsdlx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_insertl(vector unsigned char __a, vector unsigned char __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsbvrx(__b, __c, __a); +#else + return __builtin_altivec_vinsbvlx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned short __ATTRS_o_ai +vec_insertl(vector unsigned short __a, vector unsigned short __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinshvrx(__b, __c, __a); +#else + return __builtin_altivec_vinshvlx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned int __ATTRS_o_ai +vec_insertl(vector unsigned int __a, vector unsigned int __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinswvrx(__b, __c, __a); +#else + return __builtin_altivec_vinswvlx(__b, __c, __a); +#endif +} + +/* vec_inserth */ + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_inserth(unsigned char __a, vector unsigned char __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsblx(__b, __c, __a); +#else + return __builtin_altivec_vinsbrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned short __ATTRS_o_ai +vec_inserth(unsigned short __a, vector unsigned short __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinshlx(__b, __c, __a); +#else + return __builtin_altivec_vinshrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned int __ATTRS_o_ai +vec_inserth(unsigned int __a, vector unsigned int __b, unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinswlx(__b, __c, __a); +#else + return __builtin_altivec_vinswrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_inserth(unsigned long long __a, vector unsigned long long __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsdlx(__b, __c, __a); +#else + return __builtin_altivec_vinsdrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_inserth(vector unsigned char __a, vector unsigned char __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinsbvlx(__b, __c, __a); +#else + return __builtin_altivec_vinsbvrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned short __ATTRS_o_ai +vec_inserth(vector unsigned short __a, vector unsigned short __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinshvlx(__b, __c, __a); +#else + return __builtin_altivec_vinshvrx(__b, __c, __a); +#endif +} + +static __inline__ vector unsigned int __ATTRS_o_ai +vec_inserth(vector unsigned int __a, vector unsigned int __b, + unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + return __builtin_altivec_vinswvlx(__b, __c, __a); +#else + return __builtin_altivec_vinswvrx(__b, __c, __a); +#endif +} + +#ifdef __VSX__ + +/* vec_permx */ + +#define vec_permx(__a, __b, __c, __d) \ + __builtin_vsx_xxpermx((__a), (__b), (__c), (__d)) + +/* vec_blendv */ + +static __inline__ vector signed char __ATTRS_o_ai +vec_blendv(vector signed char __a, vector signed char __b, + vector unsigned char __c) { + return __builtin_vsx_xxblendvb(__a, __b, __c); +} + +static __inline__ vector unsigned char __ATTRS_o_ai +vec_blendv(vector unsigned char __a, vector unsigned char __b, + vector unsigned char __c) { + return __builtin_vsx_xxblendvb(__a, __b, __c); +} + +static __inline__ vector signed short __ATTRS_o_ai +vec_blendv(vector signed short __a, vector signed short __b, + vector unsigned short __c) { + return __builtin_vsx_xxblendvh(__a, __b, __c); +} + +static __inline__ vector unsigned short __ATTRS_o_ai +vec_blendv(vector unsigned short __a, vector unsigned short __b, + vector unsigned short __c) { + return __builtin_vsx_xxblendvh(__a, __b, __c); +} + +static __inline__ vector signed int __ATTRS_o_ai +vec_blendv(vector signed int __a, vector signed int __b, + vector unsigned int __c) { + return __builtin_vsx_xxblendvw(__a, __b, __c); +} + +static __inline__ vector unsigned int __ATTRS_o_ai +vec_blendv(vector unsigned int __a, vector unsigned int __b, + vector unsigned int __c) { + return __builtin_vsx_xxblendvw(__a, __b, __c); +} + +static __inline__ vector signed long long __ATTRS_o_ai +vec_blendv(vector signed long long __a, vector signed long long __b, + vector unsigned long long __c) { + return __builtin_vsx_xxblendvd(__a, __b, __c); +} + +static __inline__ vector unsigned long long __ATTRS_o_ai +vec_blendv(vector unsigned long long __a, vector unsigned long long __b, + vector unsigned long long __c) { + return __builtin_vsx_xxblendvd(__a, __b, __c); +} + +static __inline__ vector float __ATTRS_o_ai +vec_blendv(vector float __a, vector float __b, vector unsigned int __c) { + return __builtin_vsx_xxblendvw(__a, __b, __c); +} + +static __inline__ vector double __ATTRS_o_ai +vec_blendv(vector double __a, vector double __b, + vector unsigned long long __c) { + return __builtin_vsx_xxblendvd(__a, __b, __c); +} + +/* vec_splati */ + +#define vec_splati(__a) \ + _Generic((__a), signed int \ + : ((vector signed int)__a), unsigned int \ + : ((vector unsigned int)__a), float \ + : ((vector float)__a)) + +/* vec_spatid */ + +static __inline__ vector double __ATTRS_o_ai vec_splatid(const float __a) { + return ((vector double)((double)__a)); +} + +/* vec_splati_ins */ + +static __inline__ vector signed int __ATTRS_o_ai vec_splati_ins( + vector signed int __a, const unsigned int __b, const signed int __c) { +#ifdef __LITTLE_ENDIAN__ + __a[1 - __b] = __c; + __a[3 - __b] = __c; +#else + __a[__b] = __c; + __a[2 + __b] = __c; +#endif + return __a; +} + +static __inline__ vector unsigned int __ATTRS_o_ai vec_splati_ins( + vector unsigned int __a, const unsigned int __b, const unsigned int __c) { +#ifdef __LITTLE_ENDIAN__ + __a[1 - __b] = __c; + __a[3 - __b] = __c; +#else + __a[__b] = __c; + __a[2 + __b] = __c; +#endif + return __a; +} + +static __inline__ vector float __ATTRS_o_ai +vec_splati_ins(vector float __a, const unsigned int __b, const float __c) { +#ifdef __LITTLE_ENDIAN__ + __a[1 - __b] = __c; + __a[3 - __b] = __c; +#else + __a[__b] = __c; + __a[2 + __b] = __c; +#endif + return __a; +} + +/* vec_test_lsbb_all_ones */ + +static __inline__ int __ATTRS_o_ai +vec_test_lsbb_all_ones(vector unsigned char __a) { + return __builtin_vsx_xvtlsbb(__a, 1); +} + +/* vec_test_lsbb_all_zeros */ + +static __inline__ int __ATTRS_o_ai +vec_test_lsbb_all_zeros(vector unsigned char __a) { + return __builtin_vsx_xvtlsbb(__a, 0); +} +#endif /* __VSX__ */ +#endif /* __POWER10_VECTOR__ */ + #undef __ATTRS_o_ai #endif /* __ALTIVEC_H */ diff --git a/clang/lib/Headers/amxintrin.h b/clang/lib/Headers/amxintrin.h new file mode 100644 index 000000000000..58254e21c81a --- /dev/null +++ b/clang/lib/Headers/amxintrin.h @@ -0,0 +1,225 @@ +/*===--------------- amxintrin.h - AMX intrinsics -*- C/C++ -*---------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===------------------------------------------------------------------------=== + */ + +#ifndef __IMMINTRIN_H +#error "Never use <amxintrin.h> directly; include <immintrin.h> instead." +#endif /* __IMMINTRIN_H */ + +#ifndef __AMXINTRIN_H +#define __AMXINTRIN_H +#ifdef __x86_64__ + +#define __DEFAULT_FN_ATTRS \ + __attribute__((__always_inline__, __nodebug__, __target__("amx-tile"))) + +/// Load tile configuration from a 64-byte memory location specified by +/// "mem_addr". The tile configuration includes the tile type palette, the +/// number of bytes per row, and the number of rows. If the specified +/// palette_id is zero, that signifies the init state for both the tile +/// config and the tile data, and the tiles are zeroed. Any invalid +/// configurations will result in #GP fault. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> LDTILECFG </c> instruction. +/// +/// \param __config +/// A pointer to 512-bits configuration +static __inline__ void __DEFAULT_FN_ATTRS +_tile_loadconfig(const void *__config) +{ + __builtin_ia32_tile_loadconfig(__config); +} + +/// Stores the current tile configuration to a 64-byte memory location +/// specified by "mem_addr". The tile configuration includes the tile type +/// palette, the number of bytes per row, and the number of rows. If tiles +/// are not configured, all zeroes will be stored to memory. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> STTILECFG </c> instruction. +/// +/// \param __config +/// A pointer to 512-bits configuration +static __inline__ void __DEFAULT_FN_ATTRS +_tile_storeconfig(void *__config) +{ + __builtin_ia32_tile_storeconfig(__config); +} + +/// Release the tile configuration to return to the init state, which +/// releases all storage it currently holds. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TILERELEASE </c> instruction. +static __inline__ void __DEFAULT_FN_ATTRS +_tile_release(void) +{ + __builtin_ia32_tilerelease(); +} + +/// Load tile rows from memory specifieid by "base" address and "stride" into +/// destination tile "dst" using the tile configuration previously configured +/// via "_tile_loadconfig". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TILELOADD </c> instruction. +/// +/// \param dst +/// A destination tile. Max size is 1024 Bytes. +/// \param base +/// A pointer to base address. +/// \param stride +/// The stride between the rows' data to be loaded in memory. +#define _tile_loadd(dst, base, stride) \ + __builtin_ia32_tileloadd64((dst), ((const void *)(base)), (__SIZE_TYPE__)(stride)) + +/// Load tile rows from memory specifieid by "base" address and "stride" into +/// destination tile "dst" using the tile configuration previously configured +/// via "_tile_loadconfig". This intrinsic provides a hint to the implementation +/// that the data will likely not be reused in the near future and the data +/// caching can be optimized accordingly. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TILELOADDT1 </c> instruction. +/// +/// \param dst +/// A destination tile. Max size is 1024 Bytes. +/// \param base +/// A pointer to base address. +/// \param stride +/// The stride between the rows' data to be loaded in memory. +#define _tile_stream_loadd(dst, base, stride) \ + __builtin_ia32_tileloaddt164((dst), ((const void *)(base)), (__SIZE_TYPE__)(stride)) + +/// Store the tile specified by "src" to memory specifieid by "base" address and +/// "stride" using the tile configuration previously configured via +/// "_tile_loadconfig". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TILESTORED </c> instruction. +/// +/// \param dst +/// A destination tile. Max size is 1024 Bytes. +/// \param base +/// A pointer to base address. +/// \param stride +/// The stride between the rows' data to be stored in memory. +#define _tile_stored(dst, base, stride) \ + __builtin_ia32_tilestored64((dst), ((void *)(base)), (__SIZE_TYPE__)(stride)) + +/// Zero the tile specified by "tdest". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TILEZERO </c> instruction. +/// +/// \param tile +/// The destination tile to be zero. Max size is 1024 Bytes. +#define _tile_zero(tile) __builtin_ia32_tilezero((tile)) + +/// Compute dot-product of bytes in tiles with a source/destination accumulator. +/// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with +/// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit +/// results. Sum these 4 results with the corresponding 32-bit integer in "dst", +/// and store the 32-bit result back to tile "dst". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TDPBSSD </c> instruction. +/// +/// \param dst +/// The destination tile. Max size is 1024 Bytes. +/// \param src0 +/// The 1st source tile. Max size is 1024 Bytes. +/// \param src1 +/// The 2nd source tile. Max size is 1024 Bytes. +#define _tile_dpbssd(dst, src0, src1) __builtin_ia32_tdpbssd((dst), (src0), (src1)) + +/// Compute dot-product of bytes in tiles with a source/destination accumulator. +/// Multiply groups of 4 adjacent pairs of signed 8-bit integers in src0 with +/// corresponding unsigned 8-bit integers in src1, producing 4 intermediate +/// 32-bit results. Sum these 4 results with the corresponding 32-bit integer +/// in "dst", and store the 32-bit result back to tile "dst". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TDPBSUD </c> instruction. +/// +/// \param dst +/// The destination tile. Max size is 1024 Bytes. +/// \param src0 +/// The 1st source tile. Max size is 1024 Bytes. +/// \param src1 +/// The 2nd source tile. Max size is 1024 Bytes. +#define _tile_dpbsud(dst, src0, src1) __builtin_ia32_tdpbsud((dst), (src0), (src1)) + +/// Compute dot-product of bytes in tiles with a source/destination accumulator. +/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with +/// corresponding signed 8-bit integers in src1, producing 4 intermediate 32-bit +/// results. Sum these 4 results with the corresponding 32-bit integer in "dst", +/// and store the 32-bit result back to tile "dst". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TDPBUSD </c> instruction. +/// +/// \param dst +/// The destination tile. Max size is 1024 Bytes. +/// \param src0 +/// The 1st source tile. Max size is 1024 Bytes. +/// \param src1 +/// The 2nd source tile. Max size is 1024 Bytes. +#define _tile_dpbusd(dst, src0, src1) __builtin_ia32_tdpbusd((dst), (src0), (src1)) + +/// Compute dot-product of bytes in tiles with a source/destination accumulator. +/// Multiply groups of 4 adjacent pairs of unsigned 8-bit integers in src0 with +/// corresponding unsigned 8-bit integers in src1, producing 4 intermediate +/// 32-bit results. Sum these 4 results with the corresponding 32-bit integer in +/// "dst", and store the 32-bit result back to tile "dst". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TDPBUUD </c> instruction. +/// +/// \param dst +/// The destination tile. Max size is 1024 Bytes. +/// \param src0 +/// The 1st source tile. Max size is 1024 Bytes. +/// \param src1 +/// The 2nd source tile. Max size is 1024 Bytes. +#define _tile_dpbuud(dst, src0, src1) __builtin_ia32_tdpbuud((dst), (src0), (src1)) + +/// Compute dot-product of BF16 (16-bit) floating-point pairs in tiles src0 and +/// src1, accumulating the intermediate single-precision (32-bit) floating-point +/// elements with elements in "dst", and store the 32-bit result back to tile +/// "dst". +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> TDPBF16PS </c> instruction. +/// +/// \param dst +/// The destination tile. Max size is 1024 Bytes. +/// \param src0 +/// The 1st source tile. Max size is 1024 Bytes. +/// \param src1 +/// The 2nd source tile. Max size is 1024 Bytes. +#define _tile_dpbf16ps(dst, src0, src1) \ + __builtin_ia32_tdpbf16ps((dst), (src0), (src1)) + +#undef __DEFAULT_FN_ATTRS + +#endif /* __x86_64__ */ +#endif /* __AMXINTRIN_H */ diff --git a/clang/lib/Headers/arm_acle.h b/clang/lib/Headers/arm_acle.h index 596ea03cff2f..de568b4ff9c5 100644 --- a/clang/lib/Headers/arm_acle.h +++ b/clang/lib/Headers/arm_acle.h @@ -22,31 +22,43 @@ extern "C" { /* 8 SYNCHRONIZATION, BARRIER AND HINT INTRINSICS */ /* 8.3 Memory barriers */ -#if !defined(_MSC_VER) +#if !__has_builtin(__dmb) #define __dmb(i) __builtin_arm_dmb(i) +#endif +#if !__has_builtin(__dsb) #define __dsb(i) __builtin_arm_dsb(i) +#endif +#if !__has_builtin(__isb) #define __isb(i) __builtin_arm_isb(i) #endif /* 8.4 Hints */ -#if !defined(_MSC_VER) +#if !__has_builtin(__wfi) static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfi(void) { __builtin_arm_wfi(); } +#endif +#if !__has_builtin(__wfe) static __inline__ void __attribute__((__always_inline__, __nodebug__)) __wfe(void) { __builtin_arm_wfe(); } +#endif +#if !__has_builtin(__sev) static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sev(void) { __builtin_arm_sev(); } +#endif +#if !__has_builtin(__sevl) static __inline__ void __attribute__((__always_inline__, __nodebug__)) __sevl(void) { __builtin_arm_sevl(); } +#endif +#if !__has_builtin(__yield) static __inline__ void __attribute__((__always_inline__, __nodebug__)) __yield(void) { __builtin_arm_yield(); } diff --git a/clang/lib/Headers/avx2intrin.h b/clang/lib/Headers/avx2intrin.h index 162e83ea2fbc..cc16720949ea 100644 --- a/clang/lib/Headers/avx2intrin.h +++ b/clang/lib/Headers/avx2intrin.h @@ -740,6 +740,8 @@ _mm256_broadcastsi128_si256(__m128i __X) return (__m256i)__builtin_shufflevector((__v2di)__X, (__v2di)__X, 0, 1, 0, 1); } +#define _mm_broadcastsi128_si256(X) _mm256_broadcastsi128_si256(X) + #define _mm_blend_epi32(V1, V2, M) \ (__m128i)__builtin_ia32_pblendd128((__v4si)(__m128i)(V1), \ (__v4si)(__m128i)(V2), (int)(M)) diff --git a/clang/lib/Headers/avx512bwintrin.h b/clang/lib/Headers/avx512bwintrin.h index 376558407683..4281a33d375c 100644 --- a/clang/lib/Headers/avx512bwintrin.h +++ b/clang/lib/Headers/avx512bwintrin.h @@ -1504,13 +1504,14 @@ _mm512_maskz_sll_epi16(__mmask32 __U, __m512i __A, __m128i __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_slli_epi16(__m512i __A, int __B) +_mm512_slli_epi16(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psllwi512((__v32hi)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_slli_epi16(__m512i __W, __mmask32 __U, __m512i __A, int __B) +_mm512_mask_slli_epi16(__m512i __W, __mmask32 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectw_512((__mmask32)__U, (__v32hi)_mm512_slli_epi16(__A, __B), @@ -1518,7 +1519,7 @@ _mm512_mask_slli_epi16(__m512i __W, __mmask32 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_slli_epi16(__mmask32 __U, __m512i __A, int __B) +_mm512_maskz_slli_epi16(__mmask32 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectw_512((__mmask32)__U, (__v32hi)_mm512_slli_epi16(__A, __B), @@ -1595,13 +1596,14 @@ _mm512_maskz_sra_epi16(__mmask32 __U, __m512i __A, __m128i __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srai_epi16(__m512i __A, int __B) +_mm512_srai_epi16(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psrawi512((__v32hi)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srai_epi16(__m512i __W, __mmask32 __U, __m512i __A, int __B) +_mm512_mask_srai_epi16(__m512i __W, __mmask32 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectw_512((__mmask32)__U, (__v32hi)_mm512_srai_epi16(__A, __B), @@ -1609,7 +1611,7 @@ _mm512_mask_srai_epi16(__m512i __W, __mmask32 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_srai_epi16(__mmask32 __U, __m512i __A, int __B) +_mm512_maskz_srai_epi16(__mmask32 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectw_512((__mmask32)__U, (__v32hi)_mm512_srai_epi16(__A, __B), @@ -1639,13 +1641,14 @@ _mm512_maskz_srl_epi16(__mmask32 __U, __m512i __A, __m128i __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srli_epi16(__m512i __A, int __B) +_mm512_srli_epi16(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psrlwi512((__v32hi)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srli_epi16(__m512i __W, __mmask32 __U, __m512i __A, int __B) +_mm512_mask_srli_epi16(__m512i __W, __mmask32 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectw_512((__mmask32)__U, (__v32hi)_mm512_srli_epi16(__A, __B), diff --git a/clang/lib/Headers/avx512fintrin.h b/clang/lib/Headers/avx512fintrin.h index 7465da379bdd..fa22ef3fdd18 100644 --- a/clang/lib/Headers/avx512fintrin.h +++ b/clang/lib/Headers/avx512fintrin.h @@ -5111,13 +5111,14 @@ _mm512_maskz_rolv_epi64 (__mmask8 __U, __m512i __A, __m512i __B) (__v8di)_mm512_setzero_si512()) static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_slli_epi32(__m512i __A, int __B) +_mm512_slli_epi32(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_pslldi512((__v16si)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_slli_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) +_mm512_mask_slli_epi32(__m512i __W, __mmask16 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_slli_epi32(__A, __B), @@ -5125,20 +5126,20 @@ _mm512_mask_slli_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_slli_epi32(__mmask16 __U, __m512i __A, int __B) { +_mm512_maskz_slli_epi32(__mmask16 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_slli_epi32(__A, __B), (__v16si)_mm512_setzero_si512()); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_slli_epi64(__m512i __A, int __B) +_mm512_slli_epi64(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psllqi512((__v8di)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_slli_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) +_mm512_mask_slli_epi64(__m512i __W, __mmask8 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_slli_epi64(__A, __B), @@ -5146,7 +5147,7 @@ _mm512_mask_slli_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_slli_epi64(__mmask8 __U, __m512i __A, int __B) +_mm512_maskz_slli_epi64(__mmask8 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_slli_epi64(__A, __B), @@ -5154,13 +5155,14 @@ _mm512_maskz_slli_epi64(__mmask8 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srli_epi32(__m512i __A, int __B) +_mm512_srli_epi32(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psrldi512((__v16si)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srli_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) +_mm512_mask_srli_epi32(__m512i __W, __mmask16 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_srli_epi32(__A, __B), @@ -5168,20 +5170,21 @@ _mm512_mask_srli_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_srli_epi32(__mmask16 __U, __m512i __A, int __B) { +_mm512_maskz_srli_epi32(__mmask16 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_srli_epi32(__A, __B), (__v16si)_mm512_setzero_si512()); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srli_epi64(__m512i __A, int __B) +_mm512_srli_epi64(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psrlqi512((__v8di)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srli_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) +_mm512_mask_srli_epi64(__m512i __W, __mmask8 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_srli_epi64(__A, __B), @@ -5189,7 +5192,8 @@ _mm512_mask_srli_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_srli_epi64(__mmask8 __U, __m512i __A, int __B) +_mm512_maskz_srli_epi64(__mmask8 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_srli_epi64(__A, __B), @@ -6593,13 +6597,14 @@ _mm_maskz_scalef_ss (__mmask8 __U, __m128 __A, __m128 __B) (int)(R)) static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srai_epi32(__m512i __A, int __B) +_mm512_srai_epi32(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psradi512((__v16si)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srai_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) +_mm512_mask_srai_epi32(__m512i __W, __mmask16 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_srai_epi32(__A, __B), @@ -6607,20 +6612,21 @@ _mm512_mask_srai_epi32(__m512i __W, __mmask16 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_srai_epi32(__mmask16 __U, __m512i __A, int __B) { +_mm512_maskz_srai_epi32(__mmask16 __U, __m512i __A, + unsigned int __B) { return (__m512i)__builtin_ia32_selectd_512((__mmask16)__U, (__v16si)_mm512_srai_epi32(__A, __B), (__v16si)_mm512_setzero_si512()); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_srai_epi64(__m512i __A, int __B) +_mm512_srai_epi64(__m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_psraqi512((__v8di)__A, __B); } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_mask_srai_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) +_mm512_mask_srai_epi64(__m512i __W, __mmask8 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_srai_epi64(__A, __B), @@ -6628,7 +6634,7 @@ _mm512_mask_srai_epi64(__m512i __W, __mmask8 __U, __m512i __A, int __B) } static __inline__ __m512i __DEFAULT_FN_ATTRS512 -_mm512_maskz_srai_epi64(__mmask8 __U, __m512i __A, int __B) +_mm512_maskz_srai_epi64(__mmask8 __U, __m512i __A, unsigned int __B) { return (__m512i)__builtin_ia32_selectq_512((__mmask8)__U, (__v8di)_mm512_srai_epi64(__A, __B), diff --git a/clang/lib/Headers/avx512vlbwintrin.h b/clang/lib/Headers/avx512vlbwintrin.h index cd9f2400daa0..6ed10ed9803b 100644 --- a/clang/lib/Headers/avx512vlbwintrin.h +++ b/clang/lib/Headers/avx512vlbwintrin.h @@ -1939,7 +1939,7 @@ _mm256_maskz_sll_epi16(__mmask16 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_slli_epi16(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_slli_epi16(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectw_128((__mmask8)__U, (__v8hi)_mm_slli_epi16(__A, __B), @@ -1947,7 +1947,7 @@ _mm_mask_slli_epi16(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_slli_epi16 (__mmask8 __U, __m128i __A, int __B) +_mm_maskz_slli_epi16 (__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectw_128((__mmask8)__U, (__v8hi)_mm_slli_epi16(__A, __B), @@ -1955,7 +1955,8 @@ _mm_maskz_slli_epi16 (__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_slli_epi16(__m256i __W, __mmask16 __U, __m256i __A, int __B) +_mm256_mask_slli_epi16(__m256i __W, __mmask16 __U, __m256i __A, + unsigned int __B) { return (__m256i)__builtin_ia32_selectw_256((__mmask16)__U, (__v16hi)_mm256_slli_epi16(__A, __B), @@ -1963,7 +1964,7 @@ _mm256_mask_slli_epi16(__m256i __W, __mmask16 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_slli_epi16(__mmask16 __U, __m256i __A, int __B) +_mm256_maskz_slli_epi16(__mmask16 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectw_256((__mmask16)__U, (__v16hi)_mm256_slli_epi16(__A, __B), @@ -2091,7 +2092,7 @@ _mm256_maskz_sra_epi16(__mmask16 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_srai_epi16(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_srai_epi16(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectw_128((__mmask8)__U, (__v8hi)_mm_srai_epi16(__A, __B), @@ -2099,7 +2100,7 @@ _mm_mask_srai_epi16(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_srai_epi16(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_srai_epi16(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectw_128((__mmask8)__U, (__v8hi)_mm_srai_epi16(__A, __B), @@ -2107,7 +2108,8 @@ _mm_maskz_srai_epi16(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_srai_epi16(__m256i __W, __mmask16 __U, __m256i __A, int __B) +_mm256_mask_srai_epi16(__m256i __W, __mmask16 __U, __m256i __A, + unsigned int __B) { return (__m256i)__builtin_ia32_selectw_256((__mmask16)__U, (__v16hi)_mm256_srai_epi16(__A, __B), @@ -2115,7 +2117,7 @@ _mm256_mask_srai_epi16(__m256i __W, __mmask16 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_srai_epi16(__mmask16 __U, __m256i __A, int __B) +_mm256_maskz_srai_epi16(__mmask16 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectw_256((__mmask16)__U, (__v16hi)_mm256_srai_epi16(__A, __B), diff --git a/clang/lib/Headers/avx512vlintrin.h b/clang/lib/Headers/avx512vlintrin.h index 9d1d791bb248..968c10efeac0 100644 --- a/clang/lib/Headers/avx512vlintrin.h +++ b/clang/lib/Headers/avx512vlintrin.h @@ -4522,7 +4522,7 @@ _mm256_maskz_sll_epi32(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_slli_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_slli_epi32(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_slli_epi32(__A, __B), @@ -4530,7 +4530,7 @@ _mm_mask_slli_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_slli_epi32(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_slli_epi32(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_slli_epi32(__A, __B), @@ -4538,7 +4538,7 @@ _mm_maskz_slli_epi32(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_slli_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) +_mm256_mask_slli_epi32(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_slli_epi32(__A, __B), @@ -4546,7 +4546,7 @@ _mm256_mask_slli_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_slli_epi32(__mmask8 __U, __m256i __A, int __B) +_mm256_maskz_slli_epi32(__mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_slli_epi32(__A, __B), @@ -4586,7 +4586,7 @@ _mm256_maskz_sll_epi64(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_slli_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_slli_epi64(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, (__v2di)_mm_slli_epi64(__A, __B), @@ -4594,7 +4594,7 @@ _mm_mask_slli_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_slli_epi64(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_slli_epi64(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, (__v2di)_mm_slli_epi64(__A, __B), @@ -4602,7 +4602,7 @@ _mm_maskz_slli_epi64(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_slli_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __B) +_mm256_mask_slli_epi64(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, (__v4di)_mm256_slli_epi64(__A, __B), @@ -4610,7 +4610,7 @@ _mm256_mask_slli_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_slli_epi64(__mmask8 __U, __m256i __A, int __B) +_mm256_maskz_slli_epi64(__mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, (__v4di)_mm256_slli_epi64(__A, __B), @@ -4866,7 +4866,7 @@ _mm256_maskz_srl_epi32(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_srli_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_srli_epi32(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_srli_epi32(__A, __B), @@ -4874,7 +4874,7 @@ _mm_mask_srli_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_srli_epi32(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_srli_epi32(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_srli_epi32(__A, __B), @@ -4882,7 +4882,7 @@ _mm_maskz_srli_epi32(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_srli_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) +_mm256_mask_srli_epi32(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_srli_epi32(__A, __B), @@ -4890,7 +4890,7 @@ _mm256_mask_srli_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_srli_epi32(__mmask8 __U, __m256i __A, int __B) +_mm256_maskz_srli_epi32(__mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_srli_epi32(__A, __B), @@ -4930,7 +4930,7 @@ _mm256_maskz_srl_epi64(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_srli_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_srli_epi64(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, (__v2di)_mm_srli_epi64(__A, __B), @@ -4938,7 +4938,7 @@ _mm_mask_srli_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_srli_epi64(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_srli_epi64(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, (__v2di)_mm_srli_epi64(__A, __B), @@ -4946,7 +4946,7 @@ _mm_maskz_srli_epi64(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_srli_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __B) +_mm256_mask_srli_epi64(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, (__v4di)_mm256_srli_epi64(__A, __B), @@ -4954,7 +4954,7 @@ _mm256_mask_srli_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_srli_epi64(__mmask8 __U, __m256i __A, int __B) +_mm256_maskz_srli_epi64(__mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, (__v4di)_mm256_srli_epi64(__A, __B), @@ -6405,7 +6405,7 @@ _mm256_maskz_sra_epi32(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_srai_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) +_mm_mask_srai_epi32(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_srai_epi32(__A, __B), @@ -6413,7 +6413,7 @@ _mm_mask_srai_epi32(__m128i __W, __mmask8 __U, __m128i __A, int __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_srai_epi32(__mmask8 __U, __m128i __A, int __B) +_mm_maskz_srai_epi32(__mmask8 __U, __m128i __A, unsigned int __B) { return (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, (__v4si)_mm_srai_epi32(__A, __B), @@ -6421,7 +6421,7 @@ _mm_maskz_srai_epi32(__mmask8 __U, __m128i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_srai_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) +_mm256_mask_srai_epi32(__m256i __W, __mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_srai_epi32(__A, __B), @@ -6429,7 +6429,7 @@ _mm256_mask_srai_epi32(__m256i __W, __mmask8 __U, __m256i __A, int __B) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_srai_epi32(__mmask8 __U, __m256i __A, int __B) +_mm256_maskz_srai_epi32(__mmask8 __U, __m256i __A, unsigned int __B) { return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, (__v8si)_mm256_srai_epi32(__A, __B), @@ -6481,13 +6481,13 @@ _mm256_maskz_sra_epi64(__mmask8 __U, __m256i __A, __m128i __B) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_srai_epi64(__m128i __A, int __imm) +_mm_srai_epi64(__m128i __A, unsigned int __imm) { return (__m128i)__builtin_ia32_psraqi128((__v2di)__A, __imm); } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_mask_srai_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __imm) +_mm_mask_srai_epi64(__m128i __W, __mmask8 __U, __m128i __A, unsigned int __imm) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, \ (__v2di)_mm_srai_epi64(__A, __imm), \ @@ -6495,7 +6495,7 @@ _mm_mask_srai_epi64(__m128i __W, __mmask8 __U, __m128i __A, int __imm) } static __inline__ __m128i __DEFAULT_FN_ATTRS128 -_mm_maskz_srai_epi64(__mmask8 __U, __m128i __A, int __imm) +_mm_maskz_srai_epi64(__mmask8 __U, __m128i __A, unsigned int __imm) { return (__m128i)__builtin_ia32_selectq_128((__mmask8)__U, \ (__v2di)_mm_srai_epi64(__A, __imm), \ @@ -6503,13 +6503,14 @@ _mm_maskz_srai_epi64(__mmask8 __U, __m128i __A, int __imm) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_srai_epi64(__m256i __A, int __imm) +_mm256_srai_epi64(__m256i __A, unsigned int __imm) { return (__m256i)__builtin_ia32_psraqi256((__v4di)__A, __imm); } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_mask_srai_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __imm) +_mm256_mask_srai_epi64(__m256i __W, __mmask8 __U, __m256i __A, + unsigned int __imm) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, \ (__v4di)_mm256_srai_epi64(__A, __imm), \ @@ -6517,7 +6518,7 @@ _mm256_mask_srai_epi64(__m256i __W, __mmask8 __U, __m256i __A, int __imm) } static __inline__ __m256i __DEFAULT_FN_ATTRS256 -_mm256_maskz_srai_epi64(__mmask8 __U, __m256i __A, int __imm) +_mm256_maskz_srai_epi64(__mmask8 __U, __m256i __A, unsigned int __imm) { return (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, \ (__v4di)_mm256_srai_epi64(__A, __imm), \ diff --git a/clang/lib/Headers/bmiintrin.h b/clang/lib/Headers/bmiintrin.h index 841bd84070e8..f583c215f919 100644 --- a/clang/lib/Headers/bmiintrin.h +++ b/clang/lib/Headers/bmiintrin.h @@ -111,7 +111,8 @@ _mm_tzcnt_64(unsigned long long __X) #undef __RELAXED_FN_ATTRS -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__BMI__) /* Define the default attributes for the functions in this file. */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("bmi"))) @@ -192,6 +193,28 @@ _bextr_u32(unsigned int __X, unsigned int __Y, unsigned int __Z) return __builtin_ia32_bextr_u32 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8))); } +/* Intel-specified, single-leading-underscore version of BEXTR2 */ +/// Extracts the specified bits from the first operand and returns them +/// in the least significant bits of the result. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> BEXTR </c> instruction. +/// +/// \param __X +/// An unsigned integer whose bits are to be extracted. +/// \param __Y +/// An unsigned integer used to specify which bits are extracted. Bits [7:0] +/// specify the index of the least significant bit. Bits [15:8] specify the +/// number of bits to be extracted. +/// \returns An unsigned integer whose least significant bits contain the +/// extracted bits. +/// \see __bextr_u32 +static __inline__ unsigned int __DEFAULT_FN_ATTRS +_bextr2_u32(unsigned int __X, unsigned int __Y) { + return __builtin_ia32_bextr_u32(__X, __Y); +} + /// Clears all bits in the source except for the least significant bit /// containing a value of 1 and returns the result. /// @@ -321,6 +344,28 @@ _bextr_u64(unsigned long long __X, unsigned int __Y, unsigned int __Z) return __builtin_ia32_bextr_u64 (__X, ((__Y & 0xff) | ((__Z & 0xff) << 8))); } +/* Intel-specified, single-leading-underscore version of BEXTR2 */ +/// Extracts the specified bits from the first operand and returns them +/// in the least significant bits of the result. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> BEXTR </c> instruction. +/// +/// \param __X +/// An unsigned 64-bit integer whose bits are to be extracted. +/// \param __Y +/// An unsigned 64-bit integer used to specify which bits are extracted. Bits +/// [7:0] specify the index of the least significant bit. Bits [15:8] specify +/// the number of bits to be extracted. +/// \returns An unsigned 64-bit integer whose least significant bits contain the +/// extracted bits. +/// \see __bextr_u64 +static __inline__ unsigned long long __DEFAULT_FN_ATTRS +_bextr2_u64(unsigned long long __X, unsigned long long __Y) { + return __builtin_ia32_bextr_u64(__X, __Y); +} + /// Clears all bits in the source except for the least significant bit /// containing a value of 1 and returns the result. /// @@ -376,6 +421,7 @@ __blsr_u64(unsigned long long __X) #undef __DEFAULT_FN_ATTRS -#endif /* !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__) */ +#endif /* !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) \ + || defined(__BMI__) */ #endif /* __BMIINTRIN_H */ diff --git a/clang/lib/Headers/cet.h b/clang/lib/Headers/cet.h new file mode 100644 index 000000000000..ffb19dec8f2b --- /dev/null +++ b/clang/lib/Headers/cet.h @@ -0,0 +1,66 @@ +/*===------ cet.h -Control-flow Enforcement Technology feature ------------=== + * Add x86 feature with IBT and/or SHSTK bits to ELF program property if they + * are enabled. Otherwise, contents in this header file are unused. This file + * is mainly design for assembly source code which want to enable CET. + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ +#ifndef __CET_H +#define __CET_H + +#ifdef __ASSEMBLER__ + +#ifndef __CET__ +# define _CET_ENDBR +#endif + +#ifdef __CET__ + +# ifdef __LP64__ +# if __CET__ & 0x1 +# define _CET_ENDBR endbr64 +# else +# define _CET_ENDBR +# endif +# else +# if __CET__ & 0x1 +# define _CET_ENDBR endbr32 +# else +# define _CET_ENDBR +# endif +# endif + + +# ifdef __LP64__ +# define __PROPERTY_ALIGN 3 +# else +# define __PROPERTY_ALIGN 2 +# endif + + .pushsection ".note.gnu.property", "a" + .p2align __PROPERTY_ALIGN + .long 1f - 0f /* name length. */ + .long 4f - 1f /* data length. */ + /* NT_GNU_PROPERTY_TYPE_0. */ + .long 5 /* note type. */ +0: + .asciz "GNU" /* vendor name. */ +1: + .p2align __PROPERTY_ALIGN + /* GNU_PROPERTY_X86_FEATURE_1_AND. */ + .long 0xc0000002 /* pr_type. */ + .long 3f - 2f /* pr_datasz. */ +2: + /* GNU_PROPERTY_X86_FEATURE_1_XXX. */ + .long __CET__ +3: + .p2align __PROPERTY_ALIGN +4: + .popsection +#endif +#endif +#endif diff --git a/clang/lib/Headers/cldemoteintrin.h b/clang/lib/Headers/cldemoteintrin.h index 2413e7dea7a1..cfb951c1b4a9 100644 --- a/clang/lib/Headers/cldemoteintrin.h +++ b/clang/lib/Headers/cldemoteintrin.h @@ -18,11 +18,19 @@ #define __DEFAULT_FN_ATTRS \ __attribute__((__always_inline__, __nodebug__, __target__("cldemote"))) +/// Hint to hardware that the cache line that contains \p __P should be demoted +/// from the cache closest to the processor core to a level more distant from +/// the processor core. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> CLDEMOTE </c> instruction. static __inline__ void __DEFAULT_FN_ATTRS _cldemote(const void * __P) { __builtin_ia32_cldemote(__P); } +#define _mm_cldemote(p) _cldemote(p) #undef __DEFAULT_FN_ATTRS #endif diff --git a/clang/lib/Headers/cpuid.h b/clang/lib/Headers/cpuid.h index 4ddd64847c32..2a88c042d046 100644 --- a/clang/lib/Headers/cpuid.h +++ b/clang/lib/Headers/cpuid.h @@ -24,6 +24,10 @@ #define signature_CYRIX_ebx 0x69727943 #define signature_CYRIX_edx 0x736e4978 #define signature_CYRIX_ecx 0x64616574 +/* HYGON: "HygonGenuine" */ +#define signature_HYGON_ebx 0x6f677948 +#define signature_HYGON_edx 0x6e65476e +#define signature_HYGON_ecx 0x656e6975 /* INTEL: "GenuineIntel" */ #define signature_INTEL_ebx 0x756e6547 #define signature_INTEL_edx 0x49656e69 @@ -182,8 +186,13 @@ /* Features in %edx for leaf 7 sub-leaf 0 */ #define bit_AVX5124VNNIW 0x00000004 #define bit_AVX5124FMAPS 0x00000008 +#define bit_SERIALIZE 0x00004000 +#define bit_TSXLDTRK 0x00010000 #define bit_PCONFIG 0x00040000 #define bit_IBT 0x00100000 +#define bit_AMXBF16 0x00400000 +#define bit_AMXTILE 0x01000000 +#define bit_AMXINT8 0x02000000 /* Features in %eax for leaf 7 sub-leaf 1 */ #define bit_AVX512BF16 0x00000020 diff --git a/clang/lib/Headers/emmintrin.h b/clang/lib/Headers/emmintrin.h index 993c688ce818..73a777b107c6 100644 --- a/clang/lib/Headers/emmintrin.h +++ b/clang/lib/Headers/emmintrin.h @@ -4970,10 +4970,10 @@ void _mm_pause(void); #define _MM_SHUFFLE2(x, y) (((x) << 1) | (y)) -#define _MM_DENORMALS_ZERO_ON (0x0040) -#define _MM_DENORMALS_ZERO_OFF (0x0000) +#define _MM_DENORMALS_ZERO_ON (0x0040U) +#define _MM_DENORMALS_ZERO_OFF (0x0000U) -#define _MM_DENORMALS_ZERO_MASK (0x0040) +#define _MM_DENORMALS_ZERO_MASK (0x0040U) #define _MM_GET_DENORMALS_ZERO_MODE() (_mm_getcsr() & _MM_DENORMALS_ZERO_MASK) #define _MM_SET_DENORMALS_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (x))) diff --git a/clang/lib/Headers/immintrin.h b/clang/lib/Headers/immintrin.h index edf8c42ec491..e9dff2310fdf 100644 --- a/clang/lib/Headers/immintrin.h +++ b/clang/lib/Headers/immintrin.h @@ -10,198 +10,231 @@ #ifndef __IMMINTRIN_H #define __IMMINTRIN_H -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__MMX__) #include <mmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SSE__) #include <xmmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE2__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SSE2__) #include <emmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE3__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SSE3__) #include <pmmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSSE3__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SSSE3__) #include <tmmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__SSE4_2__) || defined(__SSE4_1__)) #include <smmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AES__) || defined(__PCLMUL__)) #include <wmmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLFLUSHOPT__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__CLFLUSHOPT__) #include <clflushoptintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLWB__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__CLWB__) #include <clwbintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX__) #include <avxintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX2__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX2__) #include <avx2intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__F16C__) #include <f16cintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VPCLMULQDQ__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__VPCLMULQDQ__) #include <vpclmulqdqintrin.h> #endif /* No feature check desired due to internal checks */ #include <bmiintrin.h> -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__BMI2__) #include <bmi2intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__LZCNT__) #include <lzcntintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__POPCNT__) #include <popcntintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__FMA__) #include <fmaintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512F__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512F__) #include <avx512fintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VL__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VL__) #include <avx512vlintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BW__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512BW__) #include <avx512bwintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BITALG__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512BITALG__) #include <avx512bitalgintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512CD__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512CD__) #include <avx512cdintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VPOPCNTDQ__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VPOPCNTDQ__) #include <avx512vpopcntdqintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512VPOPCNTDQ__)) #include <avx512vpopcntdqvlintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VNNI__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VNNI__) #include <avx512vnniintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512VNNI__)) #include <avx512vlvnniintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512DQ__) #include <avx512dqintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512BITALG__)) #include <avx512vlbitalgintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512BW__)) #include <avx512vlbwintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512CD__)) #include <avx512vlcdintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512DQ__)) #include <avx512vldqintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512ER__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512ER__) #include <avx512erintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512IFMA__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512IFMA__) #include <avx512ifmaintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512IFMA__) && defined(__AVX512VL__)) #include <avx512ifmavlintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VBMI__) #include <avx512vbmiintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VBMI__) && defined(__AVX512VL__)) #include <avx512vbmivlintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI2__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VBMI2__) #include <avx512vbmi2intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VBMI2__) && defined(__AVX512VL__)) #include <avx512vlvbmi2intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512PF__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512PF__) #include <avx512pfintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BF16__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512BF16__) #include <avx512bf16intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ (defined(__AVX512VL__) && defined(__AVX512BF16__)) #include <avx512vlbf16intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PKU__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__PKU__) #include <pkuintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VAES__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__VAES__) #include <vaesintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__GFNI__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__GFNI__) #include <gfniintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDPID__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__RDPID__) /// Returns the value of the IA32_TSC_AUX MSR (0xc0000103). /// /// \headerfile <immintrin.h> @@ -213,7 +246,8 @@ _rdpid_u32(void) { } #endif // __RDPID__ -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDRND__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__RDRND__) static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd"))) _rdrand16_step(unsigned short *__p) { @@ -235,7 +269,8 @@ _rdrand64_step(unsigned long long *__p) #endif #endif /* __RDRND__ */ -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__FSGSBASE__) #ifdef __x86_64__ static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase"))) _readfsbase_u32(void) @@ -288,7 +323,8 @@ _writegsbase_u64(unsigned long long __V) #endif #endif /* __FSGSBASE__ */ -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MOVBE__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__MOVBE__) /* The structs used below are to force the load/store to be unaligned. This * is accomplished with the __packed__ attribute. The __may_alias__ prevents @@ -347,35 +383,42 @@ _storebe_i64(void * __P, long long __D) { #endif #endif /* __MOVBE */ -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RTM__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__RTM__) #include <rtmintrin.h> #include <xtestintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHA__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SHA__) #include <shaintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FXSR__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__FXSR__) #include <fxsrintrin.h> #endif /* No feature check desired due to internal MSC_VER checks */ #include <xsaveintrin.h> -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEOPT__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__XSAVEOPT__) #include <xsaveoptintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEC__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__XSAVEC__) #include <xsavecintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVES__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__XSAVES__) #include <xsavesintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHSTK__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SHSTK__) #include <cetintrin.h> #endif @@ -383,57 +426,81 @@ _storebe_i64(void * __P, long long __D) { * whereas others are also available at all times. */ #include <adxintrin.h> -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__RDSEED__) #include <rdseedintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WBNOINVD__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__WBNOINVD__) #include <wbnoinvdintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLDEMOTE__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__CLDEMOTE__) #include <cldemoteintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WAITPKG__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__WAITPKG__) #include <waitpkgintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ - defined(__MOVDIRI__) || defined(__MOVDIR64B__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__MOVDIRI__) || defined(__MOVDIR64B__) #include <movdirintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PCONFIG__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__PCONFIG__) #include <pconfigintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SGX__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SGX__) #include <sgxintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PTWRITE__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__PTWRITE__) #include <ptwriteintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__INVPCID__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__INVPCID__) #include <invpcidintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ - defined(__AVX512VP2INTERSECT__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AMXTILE__) || defined(__AMXINT8__) || defined(__AMXBF16__) +#include <amxintrin.h> +#endif + +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__AVX512VP2INTERSECT__) #include <avx512vp2intersectintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || \ - (defined(__AVX512VL__) && defined(__AVX512VP2INTERSECT__)) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + (defined(__AVX512VL__) && defined(__AVX512VP2INTERSECT__)) #include <avx512vlvp2intersectintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__ENQCMD__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__ENQCMD__) #include <enqcmdintrin.h> #endif +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SERIALIZE__) +#include <serializeintrin.h> +#endif + +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__TSXLDTRK__) +#include <tsxldtrkintrin.h> +#endif + #if defined(_MSC_VER) && __has_extension(gnu_asm) /* Define the default attributes for these intrinsics */ #define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__)) diff --git a/clang/lib/Headers/intrin.h b/clang/lib/Headers/intrin.h index f85f7a2beb49..871b47ca8267 100644 --- a/clang/lib/Headers/intrin.h +++ b/clang/lib/Headers/intrin.h @@ -289,6 +289,9 @@ unsigned char _BitScanForward64(unsigned long *_Index, unsigned __int64 _Mask); static __inline__ unsigned char _BitScanReverse64(unsigned long *_Index, unsigned __int64 _Mask); +#endif + +#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__aarch64__) static __inline__ __int64 _InterlockedDecrement64(__int64 volatile *_Addend); static __inline__ diff --git a/clang/lib/Headers/module.modulemap b/clang/lib/Headers/module.modulemap index 7954a77a4125..6894672ef052 100644 --- a/clang/lib/Headers/module.modulemap +++ b/clang/lib/Headers/module.modulemap @@ -27,6 +27,12 @@ module _Builtin_intrinsics [system] [extern_c] { header "arm_fp16.h" export * } + + explicit module sve { + requires sve + header "arm_sve.h" + export * + } } explicit module intel { diff --git a/clang/lib/Headers/msa.h b/clang/lib/Headers/msa.h index 19ea6071aa93..0ca4900870f1 100644 --- a/clang/lib/Headers/msa.h +++ b/clang/lib/Headers/msa.h @@ -212,10 +212,14 @@ typedef double v2f64_d __attribute__ ((vector_size(16), aligned(8))); #define __msa_ld_h __builtin_msa_ld_h #define __msa_ld_w __builtin_msa_ld_w #define __msa_ld_d __builtin_msa_ld_d +#define __msa_ldr_d __builtin_msa_ldr_d +#define __msa_ldr_w __builtin_msa_ldrq_w #define __msa_st_b __builtin_msa_st_b #define __msa_st_h __builtin_msa_st_h #define __msa_st_w __builtin_msa_st_w #define __msa_st_d __builtin_msa_st_d +#define __msa_str_d __builtin_msa_str_d +#define __msa_str_w __builtin_msa_strq_w #define __msa_sat_s_b __builtin_msa_sat_s_b #define __msa_sat_s_h __builtin_msa_sat_s_h #define __msa_sat_s_w __builtin_msa_sat_s_w diff --git a/clang/lib/Headers/opencl-c.h b/clang/lib/Headers/opencl-c.h index 06c5ab6a72f0..66e18bdd47bb 100644 --- a/clang/lib/Headers/opencl-c.h +++ b/clang/lib/Headers/opencl-c.h @@ -13432,18 +13432,12 @@ int __ovld atomic_fetch_min_explicit(volatile atomic_int *object, int operand, m uint __ovld atomic_fetch_min(volatile atomic_uint *object, uint operand); uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order); uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); -uint __ovld atomic_fetch_min(volatile atomic_uint *object, int operand); -uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, int operand, memory_order order); -uint __ovld atomic_fetch_min_explicit(volatile atomic_uint *object, int operand, memory_order order, memory_scope scope); int __ovld atomic_fetch_max(volatile atomic_int *object, int operand); int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order); int __ovld atomic_fetch_max_explicit(volatile atomic_int *object, int operand, memory_order order, memory_scope scope); uint __ovld atomic_fetch_max(volatile atomic_uint *object, uint operand); uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order); uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, uint operand, memory_order order, memory_scope scope); -uint __ovld atomic_fetch_max(volatile atomic_uint *object, int operand); -uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, int operand, memory_order order); -uint __ovld atomic_fetch_max_explicit(volatile atomic_uint *object, int operand, memory_order order, memory_scope scope); #if defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) long __ovld atomic_fetch_add(volatile atomic_long *object, long operand); @@ -13482,18 +13476,12 @@ long __ovld atomic_fetch_min_explicit(volatile atomic_long *object, long operand ulong __ovld atomic_fetch_min(volatile atomic_ulong *object, ulong operand); ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); -ulong __ovld atomic_fetch_min(volatile atomic_ulong *object, long operand); -ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, long operand, memory_order order); -ulong __ovld atomic_fetch_min_explicit(volatile atomic_ulong *object, long operand, memory_order order, memory_scope scope); long __ovld atomic_fetch_max(volatile atomic_long *object, long operand); long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order); long __ovld atomic_fetch_max_explicit(volatile atomic_long *object, long operand, memory_order order, memory_scope scope); ulong __ovld atomic_fetch_max(volatile atomic_ulong *object, ulong operand); ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order); ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, ulong operand, memory_order order, memory_scope scope); -ulong __ovld atomic_fetch_max(volatile atomic_ulong *object, long operand); -ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, long operand, memory_order order); -ulong __ovld atomic_fetch_max_explicit(volatile atomic_ulong *object, long operand, memory_order order, memory_scope scope); #endif //defined(cl_khr_int64_base_atomics) && defined(cl_khr_int64_extended_atomics) // OpenCL v2.0 s6.13.11.7.5: @@ -14682,7 +14670,7 @@ void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, flo // OpenCL Extension v2.0 s9.18 - Mipmaps #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) -#ifdef cl_khr_mipmap_image +#if defined(cl_khr_mipmap_image_writes) void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color); void __ovld write_imagei(write_only image1d_t image, int coord, int lod, int4 color); void __ovld write_imageui(write_only image1d_t image, int coord, int lod, uint4 color); @@ -14699,15 +14687,16 @@ void __ovld write_imagef(write_only image2d_array_t image_array, int4 coord, int void __ovld write_imagei(write_only image2d_array_t image_array, int4 coord, int lod, int4 color); void __ovld write_imageui(write_only image2d_array_t image_array, int4 coord, int lod, uint4 color); -void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float color); -void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float color); +void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float depth); +void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float depth); #ifdef cl_khr_3d_image_writes void __ovld write_imagef(write_only image3d_t image, int4 coord, int lod, float4 color); void __ovld write_imagei(write_only image3d_t image, int4 coord, int lod, int4 color); void __ovld write_imageui(write_only image3d_t image, int4 coord, int lod, uint4 color); -#endif -#endif //cl_khr_mipmap_image +#endif //cl_khr_3d_image_writes + +#endif //defined(cl_khr_mipmap_image_writes) #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) // Image write functions for half4 type @@ -14756,7 +14745,7 @@ void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, flo #endif //cl_khr_depth_images #if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) -#ifdef cl_khr_mipmap_image +#if defined(cl_khr_mipmap_image_writes) void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color); void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color); void __ovld write_imageui(read_write image1d_t image, int coord, int lod, uint4 color); @@ -14780,8 +14769,9 @@ void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, int void __ovld write_imagef(read_write image3d_t image, int4 coord, int lod, float4 color); void __ovld write_imagei(read_write image3d_t image, int4 coord, int lod, int4 color); void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 color); -#endif -#endif //cl_khr_mipmap_image +#endif //cl_khr_3d_image_writes + +#endif //cl_khr_mipmap_image_writes #endif //defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0) // Image write functions for half4 type @@ -15470,6 +15460,674 @@ double __ovld __conv sub_group_scan_inclusive_max(double x); #endif //cl_khr_subgroups cl_intel_subgroups +#if defined(cl_khr_subgroup_extended_types) +char __ovld __conv sub_group_broadcast( char value, uint index ); +char2 __ovld __conv sub_group_broadcast( char2 value, uint index ); +char3 __ovld __conv sub_group_broadcast( char3 value, uint index ); +char4 __ovld __conv sub_group_broadcast( char4 value, uint index ); +char8 __ovld __conv sub_group_broadcast( char8 value, uint index ); +char16 __ovld __conv sub_group_broadcast( char16 value, uint index ); + +uchar __ovld __conv sub_group_broadcast( uchar value, uint index ); +uchar2 __ovld __conv sub_group_broadcast( uchar2 value, uint index ); +uchar3 __ovld __conv sub_group_broadcast( uchar3 value, uint index ); +uchar4 __ovld __conv sub_group_broadcast( uchar4 value, uint index ); +uchar8 __ovld __conv sub_group_broadcast( uchar8 value, uint index ); +uchar16 __ovld __conv sub_group_broadcast( uchar16 value, uint index ); + +short __ovld __conv sub_group_broadcast( short value, uint index ); +short2 __ovld __conv sub_group_broadcast( short2 value, uint index ); +short3 __ovld __conv sub_group_broadcast( short3 value, uint index ); +short4 __ovld __conv sub_group_broadcast( short4 value, uint index ); +short8 __ovld __conv sub_group_broadcast( short8 value, uint index ); +short16 __ovld __conv sub_group_broadcast( short16 value, uint index ); + +ushort __ovld __conv sub_group_broadcast( ushort value, uint index ); +ushort2 __ovld __conv sub_group_broadcast( ushort2 value, uint index ); +ushort3 __ovld __conv sub_group_broadcast( ushort3 value, uint index ); +ushort4 __ovld __conv sub_group_broadcast( ushort4 value, uint index ); +ushort8 __ovld __conv sub_group_broadcast( ushort8 value, uint index ); +ushort16 __ovld __conv sub_group_broadcast( ushort16 value, uint index ); + +// scalar int broadcast is part of cl_khr_subgroups +int2 __ovld __conv sub_group_broadcast( int2 value, uint index ); +int3 __ovld __conv sub_group_broadcast( int3 value, uint index ); +int4 __ovld __conv sub_group_broadcast( int4 value, uint index ); +int8 __ovld __conv sub_group_broadcast( int8 value, uint index ); +int16 __ovld __conv sub_group_broadcast( int16 value, uint index ); + +// scalar uint broadcast is part of cl_khr_subgroups +uint2 __ovld __conv sub_group_broadcast( uint2 value, uint index ); +uint3 __ovld __conv sub_group_broadcast( uint3 value, uint index ); +uint4 __ovld __conv sub_group_broadcast( uint4 value, uint index ); +uint8 __ovld __conv sub_group_broadcast( uint8 value, uint index ); +uint16 __ovld __conv sub_group_broadcast( uint16 value, uint index ); + +// scalar long broadcast is part of cl_khr_subgroups +long2 __ovld __conv sub_group_broadcast( long2 value, uint index ); +long3 __ovld __conv sub_group_broadcast( long3 value, uint index ); +long4 __ovld __conv sub_group_broadcast( long4 value, uint index ); +long8 __ovld __conv sub_group_broadcast( long8 value, uint index ); +long16 __ovld __conv sub_group_broadcast( long16 value, uint index ); + +// scalar ulong broadcast is part of cl_khr_subgroups +ulong2 __ovld __conv sub_group_broadcast( ulong2 value, uint index ); +ulong3 __ovld __conv sub_group_broadcast( ulong3 value, uint index ); +ulong4 __ovld __conv sub_group_broadcast( ulong4 value, uint index ); +ulong8 __ovld __conv sub_group_broadcast( ulong8 value, uint index ); +ulong16 __ovld __conv sub_group_broadcast( ulong16 value, uint index ); + +// scalar float broadcast is part of cl_khr_subgroups +float2 __ovld __conv sub_group_broadcast( float2 value, uint index ); +float3 __ovld __conv sub_group_broadcast( float3 value, uint index ); +float4 __ovld __conv sub_group_broadcast( float4 value, uint index ); +float8 __ovld __conv sub_group_broadcast( float8 value, uint index ); +float16 __ovld __conv sub_group_broadcast( float16 value, uint index ); + +char __ovld __conv sub_group_reduce_add( char value ); +uchar __ovld __conv sub_group_reduce_add( uchar value ); +short __ovld __conv sub_group_reduce_add( short value ); +ushort __ovld __conv sub_group_reduce_add( ushort value ); + +char __ovld __conv sub_group_reduce_min( char value ); +uchar __ovld __conv sub_group_reduce_min( uchar value ); +short __ovld __conv sub_group_reduce_min( short value ); +ushort __ovld __conv sub_group_reduce_min( ushort value ); + +char __ovld __conv sub_group_reduce_max( char value ); +uchar __ovld __conv sub_group_reduce_max( uchar value ); +short __ovld __conv sub_group_reduce_max( short value ); +ushort __ovld __conv sub_group_reduce_max( ushort value ); + +char __ovld __conv sub_group_scan_inclusive_add( char value ); +uchar __ovld __conv sub_group_scan_inclusive_add( uchar value ); +short __ovld __conv sub_group_scan_inclusive_add( short value ); +ushort __ovld __conv sub_group_scan_inclusive_add( ushort value ); + +char __ovld __conv sub_group_scan_inclusive_min( char value ); +uchar __ovld __conv sub_group_scan_inclusive_min( uchar value ); +short __ovld __conv sub_group_scan_inclusive_min( short value ); +ushort __ovld __conv sub_group_scan_inclusive_min( ushort value ); + +char __ovld __conv sub_group_scan_inclusive_max( char value ); +uchar __ovld __conv sub_group_scan_inclusive_max( uchar value ); +short __ovld __conv sub_group_scan_inclusive_max( short value ); +ushort __ovld __conv sub_group_scan_inclusive_max( ushort value ); + +char __ovld __conv sub_group_scan_exclusive_add( char value ); +uchar __ovld __conv sub_group_scan_exclusive_add( uchar value ); +short __ovld __conv sub_group_scan_exclusive_add( short value ); +ushort __ovld __conv sub_group_scan_exclusive_add( ushort value ); + +char __ovld __conv sub_group_scan_exclusive_min( char value ); +uchar __ovld __conv sub_group_scan_exclusive_min( uchar value ); +short __ovld __conv sub_group_scan_exclusive_min( short value ); +ushort __ovld __conv sub_group_scan_exclusive_min( ushort value ); + +char __ovld __conv sub_group_scan_exclusive_max( char value ); +uchar __ovld __conv sub_group_scan_exclusive_max( uchar value ); +short __ovld __conv sub_group_scan_exclusive_max( short value ); +ushort __ovld __conv sub_group_scan_exclusive_max( ushort value ); + +#if defined(cl_khr_fp16) +// scalar half broadcast is part of cl_khr_subgroups +half2 __ovld __conv sub_group_broadcast( half2 value, uint index ); +half3 __ovld __conv sub_group_broadcast( half3 value, uint index ); +half4 __ovld __conv sub_group_broadcast( half4 value, uint index ); +half8 __ovld __conv sub_group_broadcast( half8 value, uint index ); +half16 __ovld __conv sub_group_broadcast( half16 value, uint index ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +// scalar double broadcast is part of cl_khr_subgroups +double2 __ovld __conv sub_group_broadcast( double2 value, uint index ); +double3 __ovld __conv sub_group_broadcast( double3 value, uint index ); +double4 __ovld __conv sub_group_broadcast( double4 value, uint index ); +double8 __ovld __conv sub_group_broadcast( double8 value, uint index ); +double16 __ovld __conv sub_group_broadcast( double16 value, uint index ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_extended_types + +#if defined(cl_khr_subgroup_non_uniform_vote) +int __ovld sub_group_elect(void); +int __ovld sub_group_non_uniform_all( int predicate ); +int __ovld sub_group_non_uniform_any( int predicate ); + +int __ovld sub_group_non_uniform_all_equal( char value ); +int __ovld sub_group_non_uniform_all_equal( uchar value ); +int __ovld sub_group_non_uniform_all_equal( short value ); +int __ovld sub_group_non_uniform_all_equal( ushort value ); +int __ovld sub_group_non_uniform_all_equal( int value ); +int __ovld sub_group_non_uniform_all_equal( uint value ); +int __ovld sub_group_non_uniform_all_equal( long value ); +int __ovld sub_group_non_uniform_all_equal( ulong value ); +int __ovld sub_group_non_uniform_all_equal( float value ); + +#if defined(cl_khr_fp16) +int __ovld sub_group_non_uniform_all_equal( half value ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +int __ovld sub_group_non_uniform_all_equal( double value ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_non_uniform_vote + +#if defined(cl_khr_subgroup_ballot) +char __ovld sub_group_non_uniform_broadcast( char value, uint index ); +char2 __ovld sub_group_non_uniform_broadcast( char2 value, uint index ); +char3 __ovld sub_group_non_uniform_broadcast( char3 value, uint index ); +char4 __ovld sub_group_non_uniform_broadcast( char4 value, uint index ); +char8 __ovld sub_group_non_uniform_broadcast( char8 value, uint index ); +char16 __ovld sub_group_non_uniform_broadcast( char16 value, uint index ); + +uchar __ovld sub_group_non_uniform_broadcast( uchar value, uint index ); +uchar2 __ovld sub_group_non_uniform_broadcast( uchar2 value, uint index ); +uchar3 __ovld sub_group_non_uniform_broadcast( uchar3 value, uint index ); +uchar4 __ovld sub_group_non_uniform_broadcast( uchar4 value, uint index ); +uchar8 __ovld sub_group_non_uniform_broadcast( uchar8 value, uint index ); +uchar16 __ovld sub_group_non_uniform_broadcast( uchar16 value, uint index ); + +short __ovld sub_group_non_uniform_broadcast( short value, uint index ); +short2 __ovld sub_group_non_uniform_broadcast( short2 value, uint index ); +short3 __ovld sub_group_non_uniform_broadcast( short3 value, uint index ); +short4 __ovld sub_group_non_uniform_broadcast( short4 value, uint index ); +short8 __ovld sub_group_non_uniform_broadcast( short8 value, uint index ); +short16 __ovld sub_group_non_uniform_broadcast( short16 value, uint index ); + +ushort __ovld sub_group_non_uniform_broadcast( ushort value, uint index ); +ushort2 __ovld sub_group_non_uniform_broadcast( ushort2 value, uint index ); +ushort3 __ovld sub_group_non_uniform_broadcast( ushort3 value, uint index ); +ushort4 __ovld sub_group_non_uniform_broadcast( ushort4 value, uint index ); +ushort8 __ovld sub_group_non_uniform_broadcast( ushort8 value, uint index ); +ushort16 __ovld sub_group_non_uniform_broadcast( ushort16 value, uint index ); + +int __ovld sub_group_non_uniform_broadcast( int value, uint index ); +int2 __ovld sub_group_non_uniform_broadcast( int2 value, uint index ); +int3 __ovld sub_group_non_uniform_broadcast( int3 value, uint index ); +int4 __ovld sub_group_non_uniform_broadcast( int4 value, uint index ); +int8 __ovld sub_group_non_uniform_broadcast( int8 value, uint index ); +int16 __ovld sub_group_non_uniform_broadcast( int16 value, uint index ); + +uint __ovld sub_group_non_uniform_broadcast( uint value, uint index ); +uint2 __ovld sub_group_non_uniform_broadcast( uint2 value, uint index ); +uint3 __ovld sub_group_non_uniform_broadcast( uint3 value, uint index ); +uint4 __ovld sub_group_non_uniform_broadcast( uint4 value, uint index ); +uint8 __ovld sub_group_non_uniform_broadcast( uint8 value, uint index ); +uint16 __ovld sub_group_non_uniform_broadcast( uint16 value, uint index ); + +long __ovld sub_group_non_uniform_broadcast( long value, uint index ); +long2 __ovld sub_group_non_uniform_broadcast( long2 value, uint index ); +long3 __ovld sub_group_non_uniform_broadcast( long3 value, uint index ); +long4 __ovld sub_group_non_uniform_broadcast( long4 value, uint index ); +long8 __ovld sub_group_non_uniform_broadcast( long8 value, uint index ); +long16 __ovld sub_group_non_uniform_broadcast( long16 value, uint index ); + +ulong __ovld sub_group_non_uniform_broadcast( ulong value, uint index ); +ulong2 __ovld sub_group_non_uniform_broadcast( ulong2 value, uint index ); +ulong3 __ovld sub_group_non_uniform_broadcast( ulong3 value, uint index ); +ulong4 __ovld sub_group_non_uniform_broadcast( ulong4 value, uint index ); +ulong8 __ovld sub_group_non_uniform_broadcast( ulong8 value, uint index ); +ulong16 __ovld sub_group_non_uniform_broadcast( ulong16 value, uint index ); + +float __ovld sub_group_non_uniform_broadcast( float value, uint index ); +float2 __ovld sub_group_non_uniform_broadcast( float2 value, uint index ); +float3 __ovld sub_group_non_uniform_broadcast( float3 value, uint index ); +float4 __ovld sub_group_non_uniform_broadcast( float4 value, uint index ); +float8 __ovld sub_group_non_uniform_broadcast( float8 value, uint index ); +float16 __ovld sub_group_non_uniform_broadcast( float16 value, uint index ); + +char __ovld sub_group_broadcast_first( char value ); +uchar __ovld sub_group_broadcast_first( uchar value ); +short __ovld sub_group_broadcast_first( short value ); +ushort __ovld sub_group_broadcast_first( ushort value ); +int __ovld sub_group_broadcast_first( int value ); +uint __ovld sub_group_broadcast_first( uint value ); +long __ovld sub_group_broadcast_first( long value ); +ulong __ovld sub_group_broadcast_first( ulong value ); +float __ovld sub_group_broadcast_first( float value ); + +uint4 __ovld sub_group_ballot( int predicate ); +int __ovld __cnfn sub_group_inverse_ballot( uint4 value ); +int __ovld __cnfn sub_group_ballot_bit_extract( uint4 value, uint index ); +uint __ovld __cnfn sub_group_ballot_bit_count( uint4 value ); + +uint __ovld sub_group_ballot_inclusive_scan( uint4 value ); +uint __ovld sub_group_ballot_exclusive_scan( uint4 value ); +uint __ovld sub_group_ballot_find_lsb( uint4 value ); +uint __ovld sub_group_ballot_find_msb( uint4 value ); + +uint4 __ovld __cnfn get_sub_group_eq_mask(void); +uint4 __ovld __cnfn get_sub_group_ge_mask(void); +uint4 __ovld __cnfn get_sub_group_gt_mask(void); +uint4 __ovld __cnfn get_sub_group_le_mask(void); +uint4 __ovld __cnfn get_sub_group_lt_mask(void); + +#if defined(cl_khr_fp16) +half __ovld sub_group_non_uniform_broadcast( half value, uint index ); +half2 __ovld sub_group_non_uniform_broadcast( half2 value, uint index ); +half3 __ovld sub_group_non_uniform_broadcast( half3 value, uint index ); +half4 __ovld sub_group_non_uniform_broadcast( half4 value, uint index ); +half8 __ovld sub_group_non_uniform_broadcast( half8 value, uint index ); +half16 __ovld sub_group_non_uniform_broadcast( half16 value, uint index ); + +half __ovld sub_group_broadcast_first( half value ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +double __ovld sub_group_non_uniform_broadcast( double value, uint index ); +double2 __ovld sub_group_non_uniform_broadcast( double2 value, uint index ); +double3 __ovld sub_group_non_uniform_broadcast( double3 value, uint index ); +double4 __ovld sub_group_non_uniform_broadcast( double4 value, uint index ); +double8 __ovld sub_group_non_uniform_broadcast( double8 value, uint index ); +double16 __ovld sub_group_non_uniform_broadcast( double16 value, uint index ); + +double __ovld sub_group_broadcast_first( double value ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_ballot + +#if defined(cl_khr_subgroup_non_uniform_arithmetic) +char __ovld sub_group_non_uniform_reduce_add( char value ); +uchar __ovld sub_group_non_uniform_reduce_add( uchar value ); +short __ovld sub_group_non_uniform_reduce_add( short value ); +ushort __ovld sub_group_non_uniform_reduce_add( ushort value ); +int __ovld sub_group_non_uniform_reduce_add( int value ); +uint __ovld sub_group_non_uniform_reduce_add( uint value ); +long __ovld sub_group_non_uniform_reduce_add( long value ); +ulong __ovld sub_group_non_uniform_reduce_add( ulong value ); +float __ovld sub_group_non_uniform_reduce_add( float value ); + +char __ovld sub_group_non_uniform_reduce_mul( char value ); +uchar __ovld sub_group_non_uniform_reduce_mul( uchar value ); +short __ovld sub_group_non_uniform_reduce_mul( short value ); +ushort __ovld sub_group_non_uniform_reduce_mul( ushort value ); +int __ovld sub_group_non_uniform_reduce_mul( int value ); +uint __ovld sub_group_non_uniform_reduce_mul( uint value ); +long __ovld sub_group_non_uniform_reduce_mul( long value ); +ulong __ovld sub_group_non_uniform_reduce_mul( ulong value ); +float __ovld sub_group_non_uniform_reduce_mul( float value ); + +char __ovld sub_group_non_uniform_reduce_min( char value ); +uchar __ovld sub_group_non_uniform_reduce_min( uchar value ); +short __ovld sub_group_non_uniform_reduce_min( short value ); +ushort __ovld sub_group_non_uniform_reduce_min( ushort value ); +int __ovld sub_group_non_uniform_reduce_min( int value ); +uint __ovld sub_group_non_uniform_reduce_min( uint value ); +long __ovld sub_group_non_uniform_reduce_min( long value ); +ulong __ovld sub_group_non_uniform_reduce_min( ulong value ); +float __ovld sub_group_non_uniform_reduce_min( float value ); + +char __ovld sub_group_non_uniform_reduce_max( char value ); +uchar __ovld sub_group_non_uniform_reduce_max( uchar value ); +short __ovld sub_group_non_uniform_reduce_max( short value ); +ushort __ovld sub_group_non_uniform_reduce_max( ushort value ); +int __ovld sub_group_non_uniform_reduce_max( int value ); +uint __ovld sub_group_non_uniform_reduce_max( uint value ); +long __ovld sub_group_non_uniform_reduce_max( long value ); +ulong __ovld sub_group_non_uniform_reduce_max( ulong value ); +float __ovld sub_group_non_uniform_reduce_max( float value ); + +char __ovld sub_group_non_uniform_scan_inclusive_add( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_add( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_add( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_add( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_add( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_add( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_add( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_add( ulong value ); +float __ovld sub_group_non_uniform_scan_inclusive_add( float value ); + +char __ovld sub_group_non_uniform_scan_inclusive_mul( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_mul( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_mul( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_mul( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_mul( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_mul( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_mul( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_mul( ulong value ); +float __ovld sub_group_non_uniform_scan_inclusive_mul( float value ); + +char __ovld sub_group_non_uniform_scan_inclusive_min( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_min( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_min( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_min( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_min( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_min( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_min( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_min( ulong value ); +float __ovld sub_group_non_uniform_scan_inclusive_min( float value ); + +char __ovld sub_group_non_uniform_scan_inclusive_max( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_max( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_max( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_max( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_max( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_max( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_max( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_max( ulong value ); +float __ovld sub_group_non_uniform_scan_inclusive_max( float value ); + +char __ovld sub_group_non_uniform_scan_exclusive_add( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_add( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_add( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_add( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_add( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_add( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_add( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_add( ulong value ); +float __ovld sub_group_non_uniform_scan_exclusive_add( float value ); + +char __ovld sub_group_non_uniform_scan_exclusive_mul( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_mul( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_mul( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_mul( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_mul( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_mul( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_mul( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_mul( ulong value ); +float __ovld sub_group_non_uniform_scan_exclusive_mul( float value ); + +char __ovld sub_group_non_uniform_scan_exclusive_min( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_min( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_min( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_min( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_min( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_min( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_min( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_min( ulong value ); +float __ovld sub_group_non_uniform_scan_exclusive_min( float value ); + +char __ovld sub_group_non_uniform_scan_exclusive_max( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_max( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_max( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_max( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_max( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_max( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_max( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_max( ulong value ); +float __ovld sub_group_non_uniform_scan_exclusive_max( float value ); + +char __ovld sub_group_non_uniform_reduce_and( char value ); +uchar __ovld sub_group_non_uniform_reduce_and( uchar value ); +short __ovld sub_group_non_uniform_reduce_and( short value ); +ushort __ovld sub_group_non_uniform_reduce_and( ushort value ); +int __ovld sub_group_non_uniform_reduce_and( int value ); +uint __ovld sub_group_non_uniform_reduce_and( uint value ); +long __ovld sub_group_non_uniform_reduce_and( long value ); +ulong __ovld sub_group_non_uniform_reduce_and( ulong value ); + +char __ovld sub_group_non_uniform_reduce_or( char value ); +uchar __ovld sub_group_non_uniform_reduce_or( uchar value ); +short __ovld sub_group_non_uniform_reduce_or( short value ); +ushort __ovld sub_group_non_uniform_reduce_or( ushort value ); +int __ovld sub_group_non_uniform_reduce_or( int value ); +uint __ovld sub_group_non_uniform_reduce_or( uint value ); +long __ovld sub_group_non_uniform_reduce_or( long value ); +ulong __ovld sub_group_non_uniform_reduce_or( ulong value ); + +char __ovld sub_group_non_uniform_reduce_xor( char value ); +uchar __ovld sub_group_non_uniform_reduce_xor( uchar value ); +short __ovld sub_group_non_uniform_reduce_xor( short value ); +ushort __ovld sub_group_non_uniform_reduce_xor( ushort value ); +int __ovld sub_group_non_uniform_reduce_xor( int value ); +uint __ovld sub_group_non_uniform_reduce_xor( uint value ); +long __ovld sub_group_non_uniform_reduce_xor( long value ); +ulong __ovld sub_group_non_uniform_reduce_xor( ulong value ); + +char __ovld sub_group_non_uniform_scan_inclusive_and( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_and( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_and( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_and( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_and( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_and( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_and( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_and( ulong value ); + +char __ovld sub_group_non_uniform_scan_inclusive_or( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_or( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_or( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_or( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_or( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_or( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_or( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_or( ulong value ); + +char __ovld sub_group_non_uniform_scan_inclusive_xor( char value ); +uchar __ovld sub_group_non_uniform_scan_inclusive_xor( uchar value ); +short __ovld sub_group_non_uniform_scan_inclusive_xor( short value ); +ushort __ovld sub_group_non_uniform_scan_inclusive_xor( ushort value ); +int __ovld sub_group_non_uniform_scan_inclusive_xor( int value ); +uint __ovld sub_group_non_uniform_scan_inclusive_xor( uint value ); +long __ovld sub_group_non_uniform_scan_inclusive_xor( long value ); +ulong __ovld sub_group_non_uniform_scan_inclusive_xor( ulong value ); + +char __ovld sub_group_non_uniform_scan_exclusive_and( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_and( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_and( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_and( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_and( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_and( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_and( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_and( ulong value ); + +char __ovld sub_group_non_uniform_scan_exclusive_or( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_or( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_or( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_or( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_or( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_or( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_or( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_or( ulong value ); + +char __ovld sub_group_non_uniform_scan_exclusive_xor( char value ); +uchar __ovld sub_group_non_uniform_scan_exclusive_xor( uchar value ); +short __ovld sub_group_non_uniform_scan_exclusive_xor( short value ); +ushort __ovld sub_group_non_uniform_scan_exclusive_xor( ushort value ); +int __ovld sub_group_non_uniform_scan_exclusive_xor( int value ); +uint __ovld sub_group_non_uniform_scan_exclusive_xor( uint value ); +long __ovld sub_group_non_uniform_scan_exclusive_xor( long value ); +ulong __ovld sub_group_non_uniform_scan_exclusive_xor( ulong value ); + +int __ovld sub_group_non_uniform_reduce_logical_and( int predicate ); +int __ovld sub_group_non_uniform_reduce_logical_or( int predicate ); +int __ovld sub_group_non_uniform_reduce_logical_xor( int predicate ); + +int __ovld sub_group_non_uniform_scan_inclusive_logical_and( int predicate ); +int __ovld sub_group_non_uniform_scan_inclusive_logical_or( int predicate ); +int __ovld sub_group_non_uniform_scan_inclusive_logical_xor( int predicate ); + +int __ovld sub_group_non_uniform_scan_exclusive_logical_and( int predicate ); +int __ovld sub_group_non_uniform_scan_exclusive_logical_or( int predicate ); +int __ovld sub_group_non_uniform_scan_exclusive_logical_xor( int predicate ); + +#if defined(cl_khr_fp16) +half __ovld sub_group_non_uniform_reduce_add( half value ); +half __ovld sub_group_non_uniform_reduce_mul( half value ); +half __ovld sub_group_non_uniform_reduce_min( half value ); +half __ovld sub_group_non_uniform_reduce_max( half value ); +half __ovld sub_group_non_uniform_scan_inclusive_add( half value ); +half __ovld sub_group_non_uniform_scan_inclusive_mul( half value ); +half __ovld sub_group_non_uniform_scan_inclusive_min( half value ); +half __ovld sub_group_non_uniform_scan_inclusive_max( half value ); +half __ovld sub_group_non_uniform_scan_exclusive_add( half value ); +half __ovld sub_group_non_uniform_scan_exclusive_mul( half value ); +half __ovld sub_group_non_uniform_scan_exclusive_min( half value ); +half __ovld sub_group_non_uniform_scan_exclusive_max( half value ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +double __ovld sub_group_non_uniform_reduce_add( double value ); +double __ovld sub_group_non_uniform_reduce_mul( double value ); +double __ovld sub_group_non_uniform_reduce_min( double value ); +double __ovld sub_group_non_uniform_reduce_max( double value ); +double __ovld sub_group_non_uniform_scan_inclusive_add( double value ); +double __ovld sub_group_non_uniform_scan_inclusive_mul( double value ); +double __ovld sub_group_non_uniform_scan_inclusive_min( double value ); +double __ovld sub_group_non_uniform_scan_inclusive_max( double value ); +double __ovld sub_group_non_uniform_scan_exclusive_add( double value ); +double __ovld sub_group_non_uniform_scan_exclusive_mul( double value ); +double __ovld sub_group_non_uniform_scan_exclusive_min( double value ); +double __ovld sub_group_non_uniform_scan_exclusive_max( double value ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_non_uniform_arithmetic + +#if defined(cl_khr_subgroup_shuffle) +char __ovld sub_group_shuffle( char value, uint index ); +uchar __ovld sub_group_shuffle( uchar value, uint index ); +short __ovld sub_group_shuffle( short value, uint index ); +ushort __ovld sub_group_shuffle( ushort value, uint index ); +int __ovld sub_group_shuffle( int value, uint index ); +uint __ovld sub_group_shuffle( uint value, uint index ); +long __ovld sub_group_shuffle( long value, uint index ); +ulong __ovld sub_group_shuffle( ulong value, uint index ); +float __ovld sub_group_shuffle( float value, uint index ); + +char __ovld sub_group_shuffle_xor( char value, uint mask ); +uchar __ovld sub_group_shuffle_xor( uchar value, uint mask ); +short __ovld sub_group_shuffle_xor( short value, uint mask ); +ushort __ovld sub_group_shuffle_xor( ushort value, uint mask ); +int __ovld sub_group_shuffle_xor( int value, uint mask ); +uint __ovld sub_group_shuffle_xor( uint value, uint mask ); +long __ovld sub_group_shuffle_xor( long value, uint mask ); +ulong __ovld sub_group_shuffle_xor( ulong value, uint mask ); +float __ovld sub_group_shuffle_xor( float value, uint mask ); + +#if defined(cl_khr_fp16) +half __ovld sub_group_shuffle( half value, uint index ); +half __ovld sub_group_shuffle_xor( half value, uint mask ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +double __ovld sub_group_shuffle( double value, uint index ); +double __ovld sub_group_shuffle_xor( double value, uint mask ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_shuffle + +#if defined(cl_khr_subgroup_shuffle_relative) +char __ovld sub_group_shuffle_up( char value, uint delta ); +uchar __ovld sub_group_shuffle_up( uchar value, uint delta ); +short __ovld sub_group_shuffle_up( short value, uint delta ); +ushort __ovld sub_group_shuffle_up( ushort value, uint delta ); +int __ovld sub_group_shuffle_up( int value, uint delta ); +uint __ovld sub_group_shuffle_up( uint value, uint delta ); +long __ovld sub_group_shuffle_up( long value, uint delta ); +ulong __ovld sub_group_shuffle_up( ulong value, uint delta ); +float __ovld sub_group_shuffle_up( float value, uint delta ); + +char __ovld sub_group_shuffle_down( char value, uint delta ); +uchar __ovld sub_group_shuffle_down( uchar value, uint delta ); +short __ovld sub_group_shuffle_down( short value, uint delta ); +ushort __ovld sub_group_shuffle_down( ushort value, uint delta ); +int __ovld sub_group_shuffle_down( int value, uint delta ); +uint __ovld sub_group_shuffle_down( uint value, uint delta ); +long __ovld sub_group_shuffle_down( long value, uint delta ); +ulong __ovld sub_group_shuffle_down( ulong value, uint delta ); +float __ovld sub_group_shuffle_down( float value, uint delta ); + +#if defined(cl_khr_fp16) +half __ovld sub_group_shuffle_up( half value, uint delta ); +half __ovld sub_group_shuffle_down( half value, uint delta ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +double __ovld sub_group_shuffle_up( double value, uint delta ); +double __ovld sub_group_shuffle_down( double value, uint delta ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_shuffle_relative + +#if defined(cl_khr_subgroup_clustered_reduce) +char __ovld sub_group_clustered_reduce_add( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_add( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_add( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_add( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_add( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_add( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_add( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_add( ulong value, uint clustersize ); +float __ovld sub_group_clustered_reduce_add( float value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_mul( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_mul( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_mul( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_mul( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_mul( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_mul( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_mul( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_mul( ulong value, uint clustersize ); +float __ovld sub_group_clustered_reduce_mul( float value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_min( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_min( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_min( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_min( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_min( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_min( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_min( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_min( ulong value, uint clustersize ); +float __ovld sub_group_clustered_reduce_min( float value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_max( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_max( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_max( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_max( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_max( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_max( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_max( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_max( ulong value, uint clustersize ); +float __ovld sub_group_clustered_reduce_max( float value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_and( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_and( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_and( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_and( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_and( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_and( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_and( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_and( ulong value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_or( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_or( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_or( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_or( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_or( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_or( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_or( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_or( ulong value, uint clustersize ); + +char __ovld sub_group_clustered_reduce_xor( char value, uint clustersize ); +uchar __ovld sub_group_clustered_reduce_xor( uchar value, uint clustersize ); +short __ovld sub_group_clustered_reduce_xor( short value, uint clustersize ); +ushort __ovld sub_group_clustered_reduce_xor( ushort value, uint clustersize ); +int __ovld sub_group_clustered_reduce_xor( int value, uint clustersize ); +uint __ovld sub_group_clustered_reduce_xor( uint value, uint clustersize ); +long __ovld sub_group_clustered_reduce_xor( long value, uint clustersize ); +ulong __ovld sub_group_clustered_reduce_xor( ulong value, uint clustersize ); + +int __ovld sub_group_clustered_reduce_logical_and( int predicate, uint clustersize ); +int __ovld sub_group_clustered_reduce_logical_or( int predicate, uint clustersize ); +int __ovld sub_group_clustered_reduce_logical_xor( int predicate, uint clustersize ); + +#if defined(cl_khr_fp16) +half __ovld sub_group_clustered_reduce_add( half value, uint clustersize ); +half __ovld sub_group_clustered_reduce_mul( half value, uint clustersize ); +half __ovld sub_group_clustered_reduce_min( half value, uint clustersize ); +half __ovld sub_group_clustered_reduce_max( half value, uint clustersize ); +#endif // cl_khr_fp16 + +#if defined(cl_khr_fp64) +double __ovld sub_group_clustered_reduce_add( double value, uint clustersize ); +double __ovld sub_group_clustered_reduce_mul( double value, uint clustersize ); +double __ovld sub_group_clustered_reduce_min( double value, uint clustersize ); +double __ovld sub_group_clustered_reduce_max( double value, uint clustersize ); +#endif // cl_khr_fp64 + +#endif // cl_khr_subgroup_clustered_reduce + #if defined(cl_intel_subgroups) // Intel-Specific Sub Group Functions float __ovld __conv intel_sub_group_shuffle( float x, uint c ); diff --git a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h b/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h index a422c98bf97d..406c9748e286 100644 --- a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math_declares.h +++ b/clang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h @@ -1,4 +1,4 @@ -/*===---- __clang_openmp_math_declares.h - OpenMP math declares ------------=== +/*===- __clang_openmp_device_functions.h - OpenMP device function declares -=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. @@ -7,27 +7,36 @@ *===-----------------------------------------------------------------------=== */ -#ifndef __CLANG_OPENMP_MATH_DECLARES_H__ -#define __CLANG_OPENMP_MATH_DECLARES_H__ +#ifndef __CLANG_OPENMP_DEVICE_FUNCTIONS_H__ +#define __CLANG_OPENMP_DEVICE_FUNCTIONS_H__ #ifndef _OPENMP #error "This file is for OpenMP compilation only." #endif -#if defined(__NVPTX__) && defined(_OPENMP) +#pragma omp begin declare variant match( \ + device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) -#define __CUDA__ - -#if defined(__cplusplus) - #include <__clang_cuda_math_forward_declares.h> +#ifdef __cplusplus +extern "C" { #endif +#define __CUDA__ +#define __OPENMP_NVPTX__ + /// Include declarations for libdevice functions. #include <__clang_cuda_libdevice_declares.h> + /// Provide definitions for these functions. #include <__clang_cuda_device_functions.h> +#undef __OPENMP_NVPTX__ #undef __CUDA__ +#ifdef __cplusplus +} // extern "C" #endif + +#pragma omp end declare variant + #endif diff --git a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h b/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h deleted file mode 100644 index 5d7ce9a965d3..000000000000 --- a/clang/lib/Headers/openmp_wrappers/__clang_openmp_math.h +++ /dev/null @@ -1,35 +0,0 @@ -/*===---- __clang_openmp_math.h - OpenMP target math support ---------------=== - * - * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. - * See https://llvm.org/LICENSE.txt for license information. - * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception - * - *===-----------------------------------------------------------------------=== - */ - -#if defined(__NVPTX__) && defined(_OPENMP) -/// TODO: -/// We are currently reusing the functionality of the Clang-CUDA code path -/// as an alternative to the host declarations provided by math.h and cmath. -/// This is suboptimal. -/// -/// We should instead declare the device functions in a similar way, e.g., -/// through OpenMP 5.0 variants, and afterwards populate the module with the -/// host declarations by unconditionally including the host math.h or cmath, -/// respectively. This is actually what the Clang-CUDA code path does, using -/// __device__ instead of variants to avoid redeclarations and get the desired -/// overload resolution. - -#define __CUDA__ - -#if defined(__cplusplus) - #include <__clang_cuda_cmath.h> -#endif - -#undef __CUDA__ - -/// Magic macro for stopping the math.h/cmath host header from being included. -#define __CLANG_NO_HOST_MATH__ - -#endif - diff --git a/clang/lib/Headers/openmp_wrappers/cmath b/clang/lib/Headers/openmp_wrappers/cmath index a5183a1d8d1b..bd6011eb6f6d 100644 --- a/clang/lib/Headers/openmp_wrappers/cmath +++ b/clang/lib/Headers/openmp_wrappers/cmath @@ -1,4 +1,4 @@ -/*===-------------- cmath - Alternative cmath header -----------------------=== +/*===-- __clang_openmp_device_functions.h - OpenMP math declares ------ c++ -=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. @@ -7,10 +7,69 @@ *===-----------------------------------------------------------------------=== */ -#include <__clang_openmp_math.h> +#ifndef __CLANG_OPENMP_CMATH_H__ +#define __CLANG_OPENMP_CMATH_H__ + +#ifndef _OPENMP +#error "This file is for OpenMP compilation only." +#endif -#ifndef __CLANG_NO_HOST_MATH__ #include_next <cmath> -#else -#undef __CLANG_NO_HOST_MATH__ + +// Make sure we include our math.h overlay, it probably happend already but we +// need to be sure. +#include <math.h> + +// We (might) need cstdlib because __clang_cuda_cmath.h below declares `abs` +// which might live in cstdlib. +#include <cstdlib> + +#pragma omp begin declare variant match( \ + device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) + +#define __CUDA__ +#define __OPENMP_NVPTX__ +#include <__clang_cuda_cmath.h> +#undef __OPENMP_NVPTX__ +#undef __CUDA__ + +// Overloads not provided by the CUDA wrappers but by the CUDA system headers. +// Since we do not include the latter we define them ourselves. +#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow)) + +__DEVICE__ float acosh(float __x) { return ::acoshf(__x); } +__DEVICE__ float asinh(float __x) { return ::asinhf(__x); } +__DEVICE__ float atanh(float __x) { return ::atanhf(__x); } +__DEVICE__ float cbrt(float __x) { return ::cbrtf(__x); } +__DEVICE__ float erf(float __x) { return ::erff(__x); } +__DEVICE__ float erfc(float __x) { return ::erfcf(__x); } +__DEVICE__ float exp2(float __x) { return ::exp2f(__x); } +__DEVICE__ float expm1(float __x) { return ::expm1f(__x); } +__DEVICE__ float fdim(float __x, float __y) { return ::fdimf(__x, __y); } +__DEVICE__ float hypot(float __x, float __y) { return ::hypotf(__x, __y); } +__DEVICE__ int ilogb(float __x) { return ::ilogbf(__x); } +__DEVICE__ float lgamma(float __x) { return ::lgammaf(__x); } +__DEVICE__ long long int llrint(float __x) { return ::llrintf(__x); } +__DEVICE__ long long int llround(float __x) { return ::llroundf(__x); } +__DEVICE__ float log1p(float __x) { return ::log1pf(__x); } +__DEVICE__ float log2(float __x) { return ::log2f(__x); } +__DEVICE__ float logb(float __x) { return ::logbf(__x); } +__DEVICE__ long int lrint(float __x) { return ::lrintf(__x); } +__DEVICE__ long int lround(float __x) { return ::lroundf(__x); } +__DEVICE__ float nextafter(float __x, float __y) { + return ::nextafterf(__x, __y); +} +__DEVICE__ float remainder(float __x, float __y) { + return ::remainderf(__x, __y); +} +__DEVICE__ float scalbln(float __x, long int __y) { + return ::scalblnf(__x, __y); +} +__DEVICE__ float scalbn(float __x, int __y) { return ::scalbnf(__x, __y); } +__DEVICE__ float tgamma(float __x) { return ::tgammaf(__x); } + +#undef __DEVICE__ + +#pragma omp end declare variant + #endif diff --git a/clang/lib/Headers/openmp_wrappers/complex b/clang/lib/Headers/openmp_wrappers/complex new file mode 100644 index 000000000000..1ed0b14879ef --- /dev/null +++ b/clang/lib/Headers/openmp_wrappers/complex @@ -0,0 +1,25 @@ +/*===-- complex --- OpenMP complex wrapper for target regions --------- c++ -=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_OPENMP_COMPLEX__ +#define __CLANG_OPENMP_COMPLEX__ + +#ifndef _OPENMP +#error "This file is for OpenMP compilation only." +#endif + +// We require std::math functions in the complex builtins below. +#include <cmath> + +#define __CUDA__ +#include <__clang_cuda_complex_builtins.h> +#endif + +// Grab the host header too. +#include_next <complex> diff --git a/clang/lib/Headers/openmp_wrappers/complex.h b/clang/lib/Headers/openmp_wrappers/complex.h new file mode 100644 index 000000000000..829c7a785725 --- /dev/null +++ b/clang/lib/Headers/openmp_wrappers/complex.h @@ -0,0 +1,25 @@ +/*===-- complex --- OpenMP complex wrapper for target regions --------- c++ -=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_OPENMP_COMPLEX_H__ +#define __CLANG_OPENMP_COMPLEX_H__ + +#ifndef _OPENMP +#error "This file is for OpenMP compilation only." +#endif + +// We require math functions in the complex builtins below. +#include <math.h> + +#define __CUDA__ +#include <__clang_cuda_complex_builtins.h> +#endif + +// Grab the host header too. +#include_next <complex.h> diff --git a/clang/lib/Headers/openmp_wrappers/math.h b/clang/lib/Headers/openmp_wrappers/math.h index d2786ecb2424..c64af8b13ece 100644 --- a/clang/lib/Headers/openmp_wrappers/math.h +++ b/clang/lib/Headers/openmp_wrappers/math.h @@ -1,4 +1,4 @@ -/*===------------- math.h - Alternative math.h header ----------------------=== +/*===---- openmp_wrapper/math.h -------- OpenMP math.h intercept ------ c++ -=== * * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. * See https://llvm.org/LICENSE.txt for license information. @@ -7,11 +7,45 @@ *===-----------------------------------------------------------------------=== */ -#include <__clang_openmp_math.h> +// If we are in C++ mode and include <math.h> (not <cmath>) first, we still need +// to make sure <cmath> is read first. The problem otherwise is that we haven't +// seen the declarations of the math.h functions when the system math.h includes +// our cmath overlay. However, our cmath overlay, or better the underlying +// overlay, e.g. CUDA, uses the math.h functions. Since we haven't declared them +// yet we get errors. CUDA avoids this by eagerly declaring all math functions +// (in the __device__ space) but we cannot do this. Instead we break the +// dependence by forcing cmath to go first. While our cmath will in turn include +// this file, the cmath guards will prevent recursion. +#ifdef __cplusplus +#include <cmath> +#endif -#ifndef __CLANG_NO_HOST_MATH__ -#include_next <math.h> -#else -#undef __CLANG_NO_HOST_MATH__ +#ifndef __CLANG_OPENMP_MATH_H__ +#define __CLANG_OPENMP_MATH_H__ + +#ifndef _OPENMP +#error "This file is for OpenMP compilation only." #endif +#include_next <math.h> + +// We need limits.h for __clang_cuda_math.h below and because it should not hurt +// we include it eagerly here. +#include <limits.h> + +// We need stdlib.h because (for now) __clang_cuda_math.h below declares `abs` +// which should live in stdlib.h. +#include <stdlib.h> + +#pragma omp begin declare variant match( \ + device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) + +#define __CUDA__ +#define __OPENMP_NVPTX__ +#include <__clang_cuda_math.h> +#undef __OPENMP_NVPTX__ +#undef __CUDA__ + +#pragma omp end declare variant + +#endif diff --git a/clang/lib/Headers/openmp_wrappers/new b/clang/lib/Headers/openmp_wrappers/new new file mode 100644 index 000000000000..1387d925b126 --- /dev/null +++ b/clang/lib/Headers/openmp_wrappers/new @@ -0,0 +1,70 @@ +//===--------- new - OPENMP wrapper for <new> ------------------------------=== +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===-----------------------------------------------------------------------=== + +#ifndef __CLANG_OPENMP_WRAPPERS_NEW +#define __CLANG_OPENMP_WRAPPERS_NEW + +#include_next <new> + +#if defined(__NVPTX__) && defined(_OPENMP) + +#include <cstdlib> + +#pragma push_macro("OPENMP_NOEXCEPT") +#if __cplusplus >= 201103L +#define OPENMP_NOEXCEPT noexcept +#else +#define OPENMP_NOEXCEPT +#endif + +// Device overrides for non-placement new and delete. +inline void *operator new(__SIZE_TYPE__ size) { + if (size == 0) + size = 1; + return ::malloc(size); +} +inline void *operator new(__SIZE_TYPE__ size, + const std::nothrow_t &) OPENMP_NOEXCEPT { + return ::operator new(size); +} + +inline void *operator new[](__SIZE_TYPE__ size) { return ::operator new(size); } +inline void *operator new[](__SIZE_TYPE__ size, const std::nothrow_t &) { + return ::operator new(size); +} + +inline void operator delete(void *ptr)OPENMP_NOEXCEPT { + if (ptr) + ::free(ptr); +} +inline void operator delete(void *ptr, const std::nothrow_t &)OPENMP_NOEXCEPT { + ::operator delete(ptr); +} + +inline void operator delete[](void *ptr) OPENMP_NOEXCEPT { + ::operator delete(ptr); +} +inline void operator delete[](void *ptr, + const std::nothrow_t &) OPENMP_NOEXCEPT { + ::operator delete(ptr); +} + +// Sized delete, C++14 only. +#if __cplusplus >= 201402L +inline void operator delete(void *ptr, __SIZE_TYPE__ size)OPENMP_NOEXCEPT { + ::operator delete(ptr); +} +inline void operator delete[](void *ptr, __SIZE_TYPE__ size) OPENMP_NOEXCEPT { + ::operator delete(ptr); +} +#endif + +#pragma pop_macro("OPENMP_NOEXCEPT") +#endif + +#endif // include guard diff --git a/clang/lib/Headers/openmp_wrappers/time.h b/clang/lib/Headers/openmp_wrappers/time.h new file mode 100644 index 000000000000..c760dd1ed963 --- /dev/null +++ b/clang/lib/Headers/openmp_wrappers/time.h @@ -0,0 +1,32 @@ +/*===---- time.h - OpenMP time header wrapper ------------------------ c ---=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __CLANG_OPENMP_TIME_H__ +#define __CLANG_OPENMP_TIME_H__ + +#ifndef _OPENMP +#error "This file is for OpenMP compilation only." +#endif + +#if defined(__cplusplus) +#define __DEVICE__ static constexpr __attribute__((always_inline, nothrow)) +#else +#define __DEVICE__ static __attribute__((always_inline, nothrow)) +#endif + +#include_next <time.h> + +#pragma omp begin declare variant match( \ + device = {arch(nvptx, nvptx64)}, implementation = {extension(match_any)}) + +__DEVICE__ clock_t clock() { return __nvvm_read_ptx_sreg_clock(); } + +#pragma omp end declare variant + +#endif diff --git a/clang/lib/Headers/ppc_wrappers/emmintrin.h b/clang/lib/Headers/ppc_wrappers/emmintrin.h index 293276cc9be0..4dcb8485e2e9 100644 --- a/clang/lib/Headers/ppc_wrappers/emmintrin.h +++ b/clang/lib/Headers/ppc_wrappers/emmintrin.h @@ -1749,7 +1749,7 @@ _mm_sll_epi64 (__m128i __A, __m128i __B) lshift = vec_splat ((__v2du) __B, 0); shmask = vec_cmplt (lshift, shmax); result = vec_sl ((__v2du) __A, lshift); - result = vec_sel ((__v2du) shmask, result, shmask); + result = (__v2du)vec_sel ((__v2df) shmask, (__v2df)result, shmask); return (__m128i) result; } @@ -1843,7 +1843,7 @@ _mm_srl_epi64 (__m128i __A, __m128i __B) rshift = vec_splat ((__v2du) __B, 0); shmask = vec_cmplt (rshift, shmax); result = vec_sr ((__v2du) __A, rshift); - result = vec_sel ((__v2du) shmask, result, shmask); + result = (__v2du)vec_sel ((__v2df) shmask, (__v2df)result, shmask); return (__m128i) result; } diff --git a/clang/lib/Headers/serializeintrin.h b/clang/lib/Headers/serializeintrin.h new file mode 100644 index 000000000000..b774e5a24a0b --- /dev/null +++ b/clang/lib/Headers/serializeintrin.h @@ -0,0 +1,30 @@ +/*===--------------- serializeintrin.h - serialize intrinsics --------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __IMMINTRIN_H +#error "Never use <serializeintrin.h> directly; include <immintrin.h> instead." +#endif + +#ifndef __SERIALIZEINTRIN_H +#define __SERIALIZEINTRIN_H + +/// Serialize instruction fetch and execution. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the <c> SERIALIZE </c> instruction. +/// +static __inline__ void +__attribute__((__always_inline__, __nodebug__, __target__("serialize"))) +_serialize (void) +{ + __builtin_ia32_serialize (); +} + +#endif /* __SERIALIZEINTRIN_H */ diff --git a/clang/lib/Headers/tsxldtrkintrin.h b/clang/lib/Headers/tsxldtrkintrin.h new file mode 100644 index 000000000000..491823e93fc0 --- /dev/null +++ b/clang/lib/Headers/tsxldtrkintrin.h @@ -0,0 +1,56 @@ +/*===------------- tsxldtrkintrin.h - tsxldtrk intrinsics ------------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __IMMINTRIN_H +#error "Never use <tsxldtrkintrin.h> directly; include <immintrin.h> instead." +#endif + +#ifndef __TSXLDTRKINTRIN_H +#define __TSXLDTRKINTRIN_H + +/* Define the default attributes for the functions in this file */ +#define _DEFAULT_FN_ATTRS \ + __attribute__((__always_inline__, __nodebug__, __target__("tsxldtrk"))) + +/// Marks the start of an TSX (RTM) suspend load address tracking region. If +/// this intrinsic is used inside a transactional region, subsequent loads +/// are not added to the read set of the transaction. If it's used inside a +/// suspend load address tracking region it will cause transaction abort. +/// If it's used outside of a transactional region it behaves like a NOP. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the \c XSUSLDTRK instruction. +/// +static __inline__ void _DEFAULT_FN_ATTRS +_xsusldtrk (void) +{ + __builtin_ia32_xsusldtrk(); +} + +/// Marks the end of an TSX (RTM) suspend load address tracking region. If this +/// intrinsic is used inside a suspend load address tracking region it will +/// end the suspend region and all following load addresses will be added to +/// the transaction read set. If it's used inside an active transaction but +/// not in a suspend region it will cause transaction abort. If it's used +/// outside of a transactional region it behaves like a NOP. +/// +/// \headerfile <x86intrin.h> +/// +/// This intrinsic corresponds to the \c XRESLDTRK instruction. +/// +static __inline__ void _DEFAULT_FN_ATTRS +_xresldtrk (void) +{ + __builtin_ia32_xresldtrk(); +} + +#undef _DEFAULT_FN_ATTRS + +#endif /* __TSXLDTRKINTRIN_H */ diff --git a/clang/lib/Headers/vecintrin.h b/clang/lib/Headers/vecintrin.h index c71b76a3ee39..e58c9769e8cb 100644 --- a/clang/lib/Headers/vecintrin.h +++ b/clang/lib/Headers/vecintrin.h @@ -43,1281 +43,1341 @@ __lcbb(const void *__ptr, unsigned short __len) /*-- vec_extract ------------------------------------------------------------*/ static inline __ATTRS_o_ai signed char -vec_extract(vector signed char __vec, int __index) { +vec_extract(__vector signed char __vec, int __index) { return __vec[__index & 15]; } static inline __ATTRS_o_ai unsigned char -vec_extract(vector bool char __vec, int __index) { +vec_extract(__vector __bool char __vec, int __index) { return __vec[__index & 15]; } static inline __ATTRS_o_ai unsigned char -vec_extract(vector unsigned char __vec, int __index) { +vec_extract(__vector unsigned char __vec, int __index) { return __vec[__index & 15]; } static inline __ATTRS_o_ai signed short -vec_extract(vector signed short __vec, int __index) { +vec_extract(__vector signed short __vec, int __index) { return __vec[__index & 7]; } static inline __ATTRS_o_ai unsigned short -vec_extract(vector bool short __vec, int __index) { +vec_extract(__vector __bool short __vec, int __index) { return __vec[__index & 7]; } static inline __ATTRS_o_ai unsigned short -vec_extract(vector unsigned short __vec, int __index) { +vec_extract(__vector unsigned short __vec, int __index) { return __vec[__index & 7]; } static inline __ATTRS_o_ai signed int -vec_extract(vector signed int __vec, int __index) { +vec_extract(__vector signed int __vec, int __index) { return __vec[__index & 3]; } static inline __ATTRS_o_ai unsigned int -vec_extract(vector bool int __vec, int __index) { +vec_extract(__vector __bool int __vec, int __index) { return __vec[__index & 3]; } static inline __ATTRS_o_ai unsigned int -vec_extract(vector unsigned int __vec, int __index) { +vec_extract(__vector unsigned int __vec, int __index) { return __vec[__index & 3]; } static inline __ATTRS_o_ai signed long long -vec_extract(vector signed long long __vec, int __index) { +vec_extract(__vector signed long long __vec, int __index) { return __vec[__index & 1]; } static inline __ATTRS_o_ai unsigned long long -vec_extract(vector bool long long __vec, int __index) { +vec_extract(__vector __bool long long __vec, int __index) { return __vec[__index & 1]; } static inline __ATTRS_o_ai unsigned long long -vec_extract(vector unsigned long long __vec, int __index) { +vec_extract(__vector unsigned long long __vec, int __index) { return __vec[__index & 1]; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai float -vec_extract(vector float __vec, int __index) { +vec_extract(__vector float __vec, int __index) { return __vec[__index & 3]; } #endif static inline __ATTRS_o_ai double -vec_extract(vector double __vec, int __index) { +vec_extract(__vector double __vec, int __index) { return __vec[__index & 1]; } /*-- vec_insert -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_insert(signed char __scalar, vector signed char __vec, int __index) { +static inline __ATTRS_o_ai __vector signed char +vec_insert(signed char __scalar, __vector signed char __vec, int __index) { __vec[__index & 15] = __scalar; return __vec; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_insert(unsigned char __scalar, vector bool char __vec, int __index) { - vector unsigned char __newvec = (vector unsigned char)__vec; +static inline __ATTRS_o_ai __vector unsigned char +vec_insert(unsigned char __scalar, __vector __bool char __vec, int __index) { + __vector unsigned char __newvec = (__vector unsigned char)__vec; __newvec[__index & 15] = (unsigned char)__scalar; return __newvec; } -static inline __ATTRS_o_ai vector unsigned char -vec_insert(unsigned char __scalar, vector unsigned char __vec, int __index) { +static inline __ATTRS_o_ai __vector unsigned char +vec_insert(unsigned char __scalar, __vector unsigned char __vec, int __index) { __vec[__index & 15] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed short -vec_insert(signed short __scalar, vector signed short __vec, int __index) { +static inline __ATTRS_o_ai __vector signed short +vec_insert(signed short __scalar, __vector signed short __vec, int __index) { __vec[__index & 7] = __scalar; return __vec; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_insert(unsigned short __scalar, vector bool short __vec, int __index) { - vector unsigned short __newvec = (vector unsigned short)__vec; +static inline __ATTRS_o_ai __vector unsigned short +vec_insert(unsigned short __scalar, __vector __bool short __vec, + int __index) { + __vector unsigned short __newvec = (__vector unsigned short)__vec; __newvec[__index & 7] = (unsigned short)__scalar; return __newvec; } -static inline __ATTRS_o_ai vector unsigned short -vec_insert(unsigned short __scalar, vector unsigned short __vec, int __index) { +static inline __ATTRS_o_ai __vector unsigned short +vec_insert(unsigned short __scalar, __vector unsigned short __vec, + int __index) { __vec[__index & 7] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed int -vec_insert(signed int __scalar, vector signed int __vec, int __index) { +static inline __ATTRS_o_ai __vector signed int +vec_insert(signed int __scalar, __vector signed int __vec, int __index) { __vec[__index & 3] = __scalar; return __vec; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_insert(unsigned int __scalar, vector bool int __vec, int __index) { - vector unsigned int __newvec = (vector unsigned int)__vec; +static inline __ATTRS_o_ai __vector unsigned int +vec_insert(unsigned int __scalar, __vector __bool int __vec, int __index) { + __vector unsigned int __newvec = (__vector unsigned int)__vec; __newvec[__index & 3] = __scalar; return __newvec; } -static inline __ATTRS_o_ai vector unsigned int -vec_insert(unsigned int __scalar, vector unsigned int __vec, int __index) { +static inline __ATTRS_o_ai __vector unsigned int +vec_insert(unsigned int __scalar, __vector unsigned int __vec, int __index) { __vec[__index & 3] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed long long -vec_insert(signed long long __scalar, vector signed long long __vec, +static inline __ATTRS_o_ai __vector signed long long +vec_insert(signed long long __scalar, __vector signed long long __vec, int __index) { __vec[__index & 1] = __scalar; return __vec; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_insert(unsigned long long __scalar, vector bool long long __vec, +static inline __ATTRS_o_ai __vector unsigned long long +vec_insert(unsigned long long __scalar, __vector __bool long long __vec, int __index) { - vector unsigned long long __newvec = (vector unsigned long long)__vec; + __vector unsigned long long __newvec = (__vector unsigned long long)__vec; __newvec[__index & 1] = __scalar; return __newvec; } -static inline __ATTRS_o_ai vector unsigned long long -vec_insert(unsigned long long __scalar, vector unsigned long long __vec, +static inline __ATTRS_o_ai __vector unsigned long long +vec_insert(unsigned long long __scalar, __vector unsigned long long __vec, int __index) { __vec[__index & 1] = __scalar; return __vec; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_insert(float __scalar, vector float __vec, int __index) { +static inline __ATTRS_o_ai __vector float +vec_insert(float __scalar, __vector float __vec, int __index) { __vec[__index & 1] = __scalar; return __vec; } #endif -static inline __ATTRS_o_ai vector double -vec_insert(double __scalar, vector double __vec, int __index) { +static inline __ATTRS_o_ai __vector double +vec_insert(double __scalar, __vector double __vec, int __index) { __vec[__index & 1] = __scalar; return __vec; } /*-- vec_promote ------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_promote(signed char __scalar, int __index) { - const vector signed char __zero = (vector signed char)0; - vector signed char __vec = __builtin_shufflevector(__zero, __zero, + const __vector signed char __zero = (__vector signed char)0; + __vector signed char __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); __vec[__index & 15] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_promote(unsigned char __scalar, int __index) { - const vector unsigned char __zero = (vector unsigned char)0; - vector unsigned char __vec = __builtin_shufflevector(__zero, __zero, + const __vector unsigned char __zero = (__vector unsigned char)0; + __vector unsigned char __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1); __vec[__index & 15] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_promote(signed short __scalar, int __index) { - const vector signed short __zero = (vector signed short)0; - vector signed short __vec = __builtin_shufflevector(__zero, __zero, + const __vector signed short __zero = (__vector signed short)0; + __vector signed short __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1); __vec[__index & 7] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_promote(unsigned short __scalar, int __index) { - const vector unsigned short __zero = (vector unsigned short)0; - vector unsigned short __vec = __builtin_shufflevector(__zero, __zero, + const __vector unsigned short __zero = (__vector unsigned short)0; + __vector unsigned short __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1, -1, -1, -1, -1); __vec[__index & 7] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_promote(signed int __scalar, int __index) { - const vector signed int __zero = (vector signed int)0; - vector signed int __vec = __builtin_shufflevector(__zero, __zero, - -1, -1, -1, -1); + const __vector signed int __zero = (__vector signed int)0; + __vector signed int __vec = __builtin_shufflevector(__zero, __zero, + -1, -1, -1, -1); __vec[__index & 3] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_promote(unsigned int __scalar, int __index) { - const vector unsigned int __zero = (vector unsigned int)0; - vector unsigned int __vec = __builtin_shufflevector(__zero, __zero, - -1, -1, -1, -1); + const __vector unsigned int __zero = (__vector unsigned int)0; + __vector unsigned int __vec = __builtin_shufflevector(__zero, __zero, + -1, -1, -1, -1); __vec[__index & 3] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_promote(signed long long __scalar, int __index) { - const vector signed long long __zero = (vector signed long long)0; - vector signed long long __vec = __builtin_shufflevector(__zero, __zero, - -1, -1); + const __vector signed long long __zero = (__vector signed long long)0; + __vector signed long long __vec = __builtin_shufflevector(__zero, __zero, + -1, -1); __vec[__index & 1] = __scalar; return __vec; } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_promote(unsigned long long __scalar, int __index) { - const vector unsigned long long __zero = (vector unsigned long long)0; - vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero, - -1, -1); + const __vector unsigned long long __zero = (__vector unsigned long long)0; + __vector unsigned long long __vec = __builtin_shufflevector(__zero, __zero, + -1, -1); __vec[__index & 1] = __scalar; return __vec; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float +static inline __ATTRS_o_ai __vector float vec_promote(float __scalar, int __index) { - const vector float __zero = (vector float)0; - vector float __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1); + const __vector float __zero = (__vector float)0.0f; + __vector float __vec = __builtin_shufflevector(__zero, __zero, + -1, -1, -1, -1); __vec[__index & 3] = __scalar; return __vec; } #endif -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_promote(double __scalar, int __index) { - const vector double __zero = (vector double)0; - vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1); + const __vector double __zero = (__vector double)0.0; + __vector double __vec = __builtin_shufflevector(__zero, __zero, -1, -1); __vec[__index & 1] = __scalar; return __vec; } /*-- vec_insert_and_zero ----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_insert_and_zero(const signed char *__ptr) { - vector signed char __vec = (vector signed char)0; + __vector signed char __vec = (__vector signed char)0; __vec[7] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_insert_and_zero(const unsigned char *__ptr) { - vector unsigned char __vec = (vector unsigned char)0; + __vector unsigned char __vec = (__vector unsigned char)0; __vec[7] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_insert_and_zero(const signed short *__ptr) { - vector signed short __vec = (vector signed short)0; + __vector signed short __vec = (__vector signed short)0; __vec[3] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_insert_and_zero(const unsigned short *__ptr) { - vector unsigned short __vec = (vector unsigned short)0; + __vector unsigned short __vec = (__vector unsigned short)0; __vec[3] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_insert_and_zero(const signed int *__ptr) { - vector signed int __vec = (vector signed int)0; + __vector signed int __vec = (__vector signed int)0; __vec[1] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_insert_and_zero(const unsigned int *__ptr) { - vector unsigned int __vec = (vector unsigned int)0; + __vector unsigned int __vec = (__vector unsigned int)0; __vec[1] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_insert_and_zero(const signed long long *__ptr) { - vector signed long long __vec = (vector signed long long)0; + __vector signed long long __vec = (__vector signed long long)0; __vec[0] = *__ptr; return __vec; } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_insert_and_zero(const unsigned long long *__ptr) { - vector unsigned long long __vec = (vector unsigned long long)0; + __vector unsigned long long __vec = (__vector unsigned long long)0; __vec[0] = *__ptr; return __vec; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float +static inline __ATTRS_o_ai __vector float vec_insert_and_zero(const float *__ptr) { - vector float __vec = (vector float)0; + __vector float __vec = (__vector float)0.0f; __vec[1] = *__ptr; return __vec; } #endif -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_insert_and_zero(const double *__ptr) { - vector double __vec = (vector double)0; + __vector double __vec = (__vector double)0.0; __vec[0] = *__ptr; return __vec; } /*-- vec_perm ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_perm(vector signed char __a, vector signed char __b, - vector unsigned char __c) { - return (vector signed char)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector signed char +vec_perm(__vector signed char __a, __vector signed char __b, + __vector unsigned char __c) { + return (__vector signed char)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector unsigned char -vec_perm(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { - return (vector unsigned char)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector unsigned char +vec_perm(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { + return (__vector unsigned char)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector bool char -vec_perm(vector bool char __a, vector bool char __b, - vector unsigned char __c) { - return (vector bool char)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector __bool char +vec_perm(__vector __bool char __a, __vector __bool char __b, + __vector unsigned char __c) { + return (__vector __bool char)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector signed short -vec_perm(vector signed short __a, vector signed short __b, - vector unsigned char __c) { - return (vector signed short)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector signed short +vec_perm(__vector signed short __a, __vector signed short __b, + __vector unsigned char __c) { + return (__vector signed short)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector unsigned short -vec_perm(vector unsigned short __a, vector unsigned short __b, - vector unsigned char __c) { - return (vector unsigned short)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector unsigned short +vec_perm(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned char __c) { + return (__vector unsigned short)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector bool short -vec_perm(vector bool short __a, vector bool short __b, - vector unsigned char __c) { - return (vector bool short)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector __bool short +vec_perm(__vector __bool short __a, __vector __bool short __b, + __vector unsigned char __c) { + return (__vector __bool short)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector signed int -vec_perm(vector signed int __a, vector signed int __b, - vector unsigned char __c) { - return (vector signed int)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector signed int +vec_perm(__vector signed int __a, __vector signed int __b, + __vector unsigned char __c) { + return (__vector signed int)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector unsigned int -vec_perm(vector unsigned int __a, vector unsigned int __b, - vector unsigned char __c) { - return (vector unsigned int)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector unsigned int +vec_perm(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned char __c) { + return (__vector unsigned int)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector bool int -vec_perm(vector bool int __a, vector bool int __b, - vector unsigned char __c) { - return (vector bool int)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector __bool int +vec_perm(__vector __bool int __a, __vector __bool int __b, + __vector unsigned char __c) { + return (__vector __bool int)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector signed long long -vec_perm(vector signed long long __a, vector signed long long __b, - vector unsigned char __c) { - return (vector signed long long)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector signed long long +vec_perm(__vector signed long long __a, __vector signed long long __b, + __vector unsigned char __c) { + return (__vector signed long long)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector unsigned long long -vec_perm(vector unsigned long long __a, vector unsigned long long __b, - vector unsigned char __c) { - return (vector unsigned long long)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector unsigned long long +vec_perm(__vector unsigned long long __a, __vector unsigned long long __b, + __vector unsigned char __c) { + return (__vector unsigned long long)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } -static inline __ATTRS_o_ai vector bool long long -vec_perm(vector bool long long __a, vector bool long long __b, - vector unsigned char __c) { - return (vector bool long long)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector __bool long long +vec_perm(__vector __bool long long __a, __vector __bool long long __b, + __vector unsigned char __c) { + return (__vector __bool long long)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_perm(vector float __a, vector float __b, - vector unsigned char __c) { - return (vector float)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector float +vec_perm(__vector float __a, __vector float __b, + __vector unsigned char __c) { + return (__vector float)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } #endif -static inline __ATTRS_o_ai vector double -vec_perm(vector double __a, vector double __b, - vector unsigned char __c) { - return (vector double)__builtin_s390_vperm( - (vector unsigned char)__a, (vector unsigned char)__b, __c); +static inline __ATTRS_o_ai __vector double +vec_perm(__vector double __a, __vector double __b, + __vector unsigned char __c) { + return (__vector double)__builtin_s390_vperm( + (__vector unsigned char)__a, (__vector unsigned char)__b, __c); } /*-- vec_permi --------------------------------------------------------------*/ // This prototype is deprecated. -extern __ATTRS_o vector signed long long -vec_permi(vector signed long long __a, vector signed long long __b, int __c) +extern __ATTRS_o __vector signed long long +vec_permi(__vector signed long long __a, __vector signed long long __b, + int __c) __constant_range(__c, 0, 3); // This prototype is deprecated. -extern __ATTRS_o vector unsigned long long -vec_permi(vector unsigned long long __a, vector unsigned long long __b, int __c) +extern __ATTRS_o __vector unsigned long long +vec_permi(__vector unsigned long long __a, __vector unsigned long long __b, + int __c) __constant_range(__c, 0, 3); // This prototype is deprecated. -extern __ATTRS_o vector bool long long -vec_permi(vector bool long long __a, vector bool long long __b, int __c) +extern __ATTRS_o __vector __bool long long +vec_permi(__vector __bool long long __a, __vector __bool long long __b, + int __c) __constant_range(__c, 0, 3); // This prototype is deprecated. -extern __ATTRS_o vector double -vec_permi(vector double __a, vector double __b, int __c) +extern __ATTRS_o __vector double +vec_permi(__vector double __a, __vector double __b, int __c) __constant_range(__c, 0, 3); #define vec_permi(X, Y, Z) ((__typeof__((vec_permi)((X), (Y), (Z)))) \ - __builtin_s390_vpdi((vector unsigned long long)(X), \ - (vector unsigned long long)(Y), \ + __builtin_s390_vpdi((__vector unsigned long long)(X), \ + (__vector unsigned long long)(Y), \ (((Z) & 2) << 1) | ((Z) & 1))) /*-- vec_bperm_u128 ---------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_ai vector unsigned long long -vec_bperm_u128(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_ai __vector unsigned long long +vec_bperm_u128(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vbperm(__a, __b); } #endif /*-- vec_revb ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_revb(vector signed short __vec) { - return (vector signed short) - __builtin_s390_vlbrh((vector unsigned short)__vec); +static inline __ATTRS_o_ai __vector signed short +vec_revb(__vector signed short __vec) { + return (__vector signed short) + __builtin_s390_vlbrh((__vector unsigned short)__vec); } -static inline __ATTRS_o_ai vector unsigned short -vec_revb(vector unsigned short __vec) { +static inline __ATTRS_o_ai __vector unsigned short +vec_revb(__vector unsigned short __vec) { return __builtin_s390_vlbrh(__vec); } -static inline __ATTRS_o_ai vector signed int -vec_revb(vector signed int __vec) { - return (vector signed int) - __builtin_s390_vlbrf((vector unsigned int)__vec); +static inline __ATTRS_o_ai __vector signed int +vec_revb(__vector signed int __vec) { + return (__vector signed int) + __builtin_s390_vlbrf((__vector unsigned int)__vec); } -static inline __ATTRS_o_ai vector unsigned int -vec_revb(vector unsigned int __vec) { +static inline __ATTRS_o_ai __vector unsigned int +vec_revb(__vector unsigned int __vec) { return __builtin_s390_vlbrf(__vec); } -static inline __ATTRS_o_ai vector signed long long -vec_revb(vector signed long long __vec) { - return (vector signed long long) - __builtin_s390_vlbrg((vector unsigned long long)__vec); +static inline __ATTRS_o_ai __vector signed long long +vec_revb(__vector signed long long __vec) { + return (__vector signed long long) + __builtin_s390_vlbrg((__vector unsigned long long)__vec); } -static inline __ATTRS_o_ai vector unsigned long long -vec_revb(vector unsigned long long __vec) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_revb(__vector unsigned long long __vec) { return __builtin_s390_vlbrg(__vec); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_revb(vector float __vec) { - return (vector float) - __builtin_s390_vlbrf((vector unsigned int)__vec); +static inline __ATTRS_o_ai __vector float +vec_revb(__vector float __vec) { + return (__vector float) + __builtin_s390_vlbrf((__vector unsigned int)__vec); } #endif -static inline __ATTRS_o_ai vector double -vec_revb(vector double __vec) { - return (vector double) - __builtin_s390_vlbrg((vector unsigned long long)__vec); +static inline __ATTRS_o_ai __vector double +vec_revb(__vector double __vec) { + return (__vector double) + __builtin_s390_vlbrg((__vector unsigned long long)__vec); } /*-- vec_reve ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_reve(vector signed char __vec) { - return (vector signed char) { __vec[15], __vec[14], __vec[13], __vec[12], - __vec[11], __vec[10], __vec[9], __vec[8], - __vec[7], __vec[6], __vec[5], __vec[4], - __vec[3], __vec[2], __vec[1], __vec[0] }; -} - -static inline __ATTRS_o_ai vector unsigned char -vec_reve(vector unsigned char __vec) { - return (vector unsigned char) { __vec[15], __vec[14], __vec[13], __vec[12], +static inline __ATTRS_o_ai __vector signed char +vec_reve(__vector signed char __vec) { + return (__vector signed char) { __vec[15], __vec[14], __vec[13], __vec[12], __vec[11], __vec[10], __vec[9], __vec[8], __vec[7], __vec[6], __vec[5], __vec[4], __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector bool char -vec_reve(vector bool char __vec) { - return (vector bool char) { __vec[15], __vec[14], __vec[13], __vec[12], - __vec[11], __vec[10], __vec[9], __vec[8], - __vec[7], __vec[6], __vec[5], __vec[4], - __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector unsigned char +vec_reve(__vector unsigned char __vec) { + return (__vector unsigned char) { __vec[15], __vec[14], __vec[13], __vec[12], + __vec[11], __vec[10], __vec[9], __vec[8], + __vec[7], __vec[6], __vec[5], __vec[4], + __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector signed short -vec_reve(vector signed short __vec) { - return (vector signed short) { __vec[7], __vec[6], __vec[5], __vec[4], - __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector __bool char +vec_reve(__vector __bool char __vec) { + return (__vector __bool char) { __vec[15], __vec[14], __vec[13], __vec[12], + __vec[11], __vec[10], __vec[9], __vec[8], + __vec[7], __vec[6], __vec[5], __vec[4], + __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector unsigned short -vec_reve(vector unsigned short __vec) { - return (vector unsigned short) { __vec[7], __vec[6], __vec[5], __vec[4], +static inline __ATTRS_o_ai __vector signed short +vec_reve(__vector signed short __vec) { + return (__vector signed short) { __vec[7], __vec[6], __vec[5], __vec[4], __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector bool short -vec_reve(vector bool short __vec) { - return (vector bool short) { __vec[7], __vec[6], __vec[5], __vec[4], - __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector unsigned short +vec_reve(__vector unsigned short __vec) { + return (__vector unsigned short) { __vec[7], __vec[6], __vec[5], __vec[4], + __vec[3], __vec[2], __vec[1], __vec[0] }; +} + +static inline __ATTRS_o_ai __vector __bool short +vec_reve(__vector __bool short __vec) { + return (__vector __bool short) { __vec[7], __vec[6], __vec[5], __vec[4], + __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector signed int -vec_reve(vector signed int __vec) { - return (vector signed int) { __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector signed int +vec_reve(__vector signed int __vec) { + return (__vector signed int) { __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector unsigned int -vec_reve(vector unsigned int __vec) { - return (vector unsigned int) { __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector unsigned int +vec_reve(__vector unsigned int __vec) { + return (__vector unsigned int) { __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector bool int -vec_reve(vector bool int __vec) { - return (vector bool int) { __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector __bool int +vec_reve(__vector __bool int __vec) { + return (__vector __bool int) { __vec[3], __vec[2], __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector signed long long -vec_reve(vector signed long long __vec) { - return (vector signed long long) { __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector signed long long +vec_reve(__vector signed long long __vec) { + return (__vector signed long long) { __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector unsigned long long -vec_reve(vector unsigned long long __vec) { - return (vector unsigned long long) { __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector unsigned long long +vec_reve(__vector unsigned long long __vec) { + return (__vector unsigned long long) { __vec[1], __vec[0] }; } -static inline __ATTRS_o_ai vector bool long long -vec_reve(vector bool long long __vec) { - return (vector bool long long) { __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector __bool long long +vec_reve(__vector __bool long long __vec) { + return (__vector __bool long long) { __vec[1], __vec[0] }; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_reve(vector float __vec) { - return (vector float) { __vec[3], __vec[2], __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector float +vec_reve(__vector float __vec) { + return (__vector float) { __vec[3], __vec[2], __vec[1], __vec[0] }; } #endif -static inline __ATTRS_o_ai vector double -vec_reve(vector double __vec) { - return (vector double) { __vec[1], __vec[0] }; +static inline __ATTRS_o_ai __vector double +vec_reve(__vector double __vec) { + return (__vector double) { __vec[1], __vec[0] }; } /*-- vec_sel ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_sel(vector signed char __a, vector signed char __b, - vector unsigned char __c) { - return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a); +static inline __ATTRS_o_ai __vector signed char +vec_sel(__vector signed char __a, __vector signed char __b, + __vector unsigned char __c) { + return (((__vector signed char)__c & __b) | + (~(__vector signed char)__c & __a)); } -static inline __ATTRS_o_ai vector signed char -vec_sel(vector signed char __a, vector signed char __b, vector bool char __c) { - return ((vector signed char)__c & __b) | (~(vector signed char)__c & __a); +static inline __ATTRS_o_ai __vector signed char +vec_sel(__vector signed char __a, __vector signed char __b, + __vector __bool char __c) { + return (((__vector signed char)__c & __b) | + (~(__vector signed char)__c & __a)); } -static inline __ATTRS_o_ai vector bool char -vec_sel(vector bool char __a, vector bool char __b, vector unsigned char __c) { - return ((vector bool char)__c & __b) | (~(vector bool char)__c & __a); +static inline __ATTRS_o_ai __vector __bool char +vec_sel(__vector __bool char __a, __vector __bool char __b, + __vector unsigned char __c) { + return (((__vector __bool char)__c & __b) | + (~(__vector __bool char)__c & __a)); } -static inline __ATTRS_o_ai vector bool char -vec_sel(vector bool char __a, vector bool char __b, vector bool char __c) { +static inline __ATTRS_o_ai __vector __bool char +vec_sel(__vector __bool char __a, __vector __bool char __b, + __vector __bool char __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned char -vec_sel(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_sel(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned char -vec_sel(vector unsigned char __a, vector unsigned char __b, - vector bool char __c) { - return ((vector unsigned char)__c & __b) | (~(vector unsigned char)__c & __a); +static inline __ATTRS_o_ai __vector unsigned char +vec_sel(__vector unsigned char __a, __vector unsigned char __b, + __vector __bool char __c) { + return (((__vector unsigned char)__c & __b) | + (~(__vector unsigned char)__c & __a)); } -static inline __ATTRS_o_ai vector signed short -vec_sel(vector signed short __a, vector signed short __b, - vector unsigned short __c) { - return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a); +static inline __ATTRS_o_ai __vector signed short +vec_sel(__vector signed short __a, __vector signed short __b, + __vector unsigned short __c) { + return (((__vector signed short)__c & __b) | + (~(__vector signed short)__c & __a)); } -static inline __ATTRS_o_ai vector signed short -vec_sel(vector signed short __a, vector signed short __b, - vector bool short __c) { - return ((vector signed short)__c & __b) | (~(vector signed short)__c & __a); +static inline __ATTRS_o_ai __vector signed short +vec_sel(__vector signed short __a, __vector signed short __b, + __vector __bool short __c) { + return (((__vector signed short)__c & __b) | + (~(__vector signed short)__c & __a)); } -static inline __ATTRS_o_ai vector bool short -vec_sel(vector bool short __a, vector bool short __b, - vector unsigned short __c) { - return ((vector bool short)__c & __b) | (~(vector bool short)__c & __a); +static inline __ATTRS_o_ai __vector __bool short +vec_sel(__vector __bool short __a, __vector __bool short __b, + __vector unsigned short __c) { + return (((__vector __bool short)__c & __b) | + (~(__vector __bool short)__c & __a)); } -static inline __ATTRS_o_ai vector bool short -vec_sel(vector bool short __a, vector bool short __b, vector bool short __c) { +static inline __ATTRS_o_ai __vector __bool short +vec_sel(__vector __bool short __a, __vector __bool short __b, + __vector __bool short __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned short -vec_sel(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_sel(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned short -vec_sel(vector unsigned short __a, vector unsigned short __b, - vector bool short __c) { - return (((vector unsigned short)__c & __b) | - (~(vector unsigned short)__c & __a)); +static inline __ATTRS_o_ai __vector unsigned short +vec_sel(__vector unsigned short __a, __vector unsigned short __b, + __vector __bool short __c) { + return (((__vector unsigned short)__c & __b) | + (~(__vector unsigned short)__c & __a)); } -static inline __ATTRS_o_ai vector signed int -vec_sel(vector signed int __a, vector signed int __b, - vector unsigned int __c) { - return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a); +static inline __ATTRS_o_ai __vector signed int +vec_sel(__vector signed int __a, __vector signed int __b, + __vector unsigned int __c) { + return (((__vector signed int)__c & __b) | + (~(__vector signed int)__c & __a)); } -static inline __ATTRS_o_ai vector signed int -vec_sel(vector signed int __a, vector signed int __b, vector bool int __c) { - return ((vector signed int)__c & __b) | (~(vector signed int)__c & __a); +static inline __ATTRS_o_ai __vector signed int +vec_sel(__vector signed int __a, __vector signed int __b, + __vector __bool int __c) { + return (((__vector signed int)__c & __b) | + (~(__vector signed int)__c & __a)); } -static inline __ATTRS_o_ai vector bool int -vec_sel(vector bool int __a, vector bool int __b, vector unsigned int __c) { - return ((vector bool int)__c & __b) | (~(vector bool int)__c & __a); +static inline __ATTRS_o_ai __vector __bool int +vec_sel(__vector __bool int __a, __vector __bool int __b, + __vector unsigned int __c) { + return (((__vector __bool int)__c & __b) | + (~(__vector __bool int)__c & __a)); } -static inline __ATTRS_o_ai vector bool int -vec_sel(vector bool int __a, vector bool int __b, vector bool int __c) { +static inline __ATTRS_o_ai __vector __bool int +vec_sel(__vector __bool int __a, __vector __bool int __b, + __vector __bool int __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned int -vec_sel(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_sel(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned int -vec_sel(vector unsigned int __a, vector unsigned int __b, vector bool int __c) { - return ((vector unsigned int)__c & __b) | (~(vector unsigned int)__c & __a); +static inline __ATTRS_o_ai __vector unsigned int +vec_sel(__vector unsigned int __a, __vector unsigned int __b, + __vector __bool int __c) { + return (((__vector unsigned int)__c & __b) | + (~(__vector unsigned int)__c & __a)); } -static inline __ATTRS_o_ai vector signed long long -vec_sel(vector signed long long __a, vector signed long long __b, - vector unsigned long long __c) { - return (((vector signed long long)__c & __b) | - (~(vector signed long long)__c & __a)); +static inline __ATTRS_o_ai __vector signed long long +vec_sel(__vector signed long long __a, __vector signed long long __b, + __vector unsigned long long __c) { + return (((__vector signed long long)__c & __b) | + (~(__vector signed long long)__c & __a)); } -static inline __ATTRS_o_ai vector signed long long -vec_sel(vector signed long long __a, vector signed long long __b, - vector bool long long __c) { - return (((vector signed long long)__c & __b) | - (~(vector signed long long)__c & __a)); +static inline __ATTRS_o_ai __vector signed long long +vec_sel(__vector signed long long __a, __vector signed long long __b, + __vector __bool long long __c) { + return (((__vector signed long long)__c & __b) | + (~(__vector signed long long)__c & __a)); } -static inline __ATTRS_o_ai vector bool long long -vec_sel(vector bool long long __a, vector bool long long __b, - vector unsigned long long __c) { - return (((vector bool long long)__c & __b) | - (~(vector bool long long)__c & __a)); +static inline __ATTRS_o_ai __vector __bool long long +vec_sel(__vector __bool long long __a, __vector __bool long long __b, + __vector unsigned long long __c) { + return (((__vector __bool long long)__c & __b) | + (~(__vector __bool long long)__c & __a)); } -static inline __ATTRS_o_ai vector bool long long -vec_sel(vector bool long long __a, vector bool long long __b, - vector bool long long __c) { +static inline __ATTRS_o_ai __vector __bool long long +vec_sel(__vector __bool long long __a, __vector __bool long long __b, + __vector __bool long long __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_sel(vector unsigned long long __a, vector unsigned long long __b, - vector unsigned long long __c) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_sel(__vector unsigned long long __a, __vector unsigned long long __b, + __vector unsigned long long __c) { return (__c & __b) | (~__c & __a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_sel(vector unsigned long long __a, vector unsigned long long __b, - vector bool long long __c) { - return (((vector unsigned long long)__c & __b) | - (~(vector unsigned long long)__c & __a)); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sel(__vector unsigned long long __a, __vector unsigned long long __b, + __vector __bool long long __c) { + return (((__vector unsigned long long)__c & __b) | + (~(__vector unsigned long long)__c & __a)); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_sel(vector float __a, vector float __b, vector unsigned int __c) { - return (vector float)((__c & (vector unsigned int)__b) | - (~__c & (vector unsigned int)__a)); +static inline __ATTRS_o_ai __vector float +vec_sel(__vector float __a, __vector float __b, __vector unsigned int __c) { + return (__vector float)((__c & (__vector unsigned int)__b) | + (~__c & (__vector unsigned int)__a)); } -static inline __ATTRS_o_ai vector float -vec_sel(vector float __a, vector float __b, vector bool int __c) { - vector unsigned int __ac = (vector unsigned int)__a; - vector unsigned int __bc = (vector unsigned int)__b; - vector unsigned int __cc = (vector unsigned int)__c; - return (vector float)((__cc & __bc) | (~__cc & __ac)); +static inline __ATTRS_o_ai __vector float +vec_sel(__vector float __a, __vector float __b, __vector __bool int __c) { + __vector unsigned int __ac = (__vector unsigned int)__a; + __vector unsigned int __bc = (__vector unsigned int)__b; + __vector unsigned int __cc = (__vector unsigned int)__c; + return (__vector float)((__cc & __bc) | (~__cc & __ac)); } #endif -static inline __ATTRS_o_ai vector double -vec_sel(vector double __a, vector double __b, vector unsigned long long __c) { - return (vector double)((__c & (vector unsigned long long)__b) | - (~__c & (vector unsigned long long)__a)); +static inline __ATTRS_o_ai __vector double +vec_sel(__vector double __a, __vector double __b, + __vector unsigned long long __c) { + return (__vector double)((__c & (__vector unsigned long long)__b) | + (~__c & (__vector unsigned long long)__a)); } -static inline __ATTRS_o_ai vector double -vec_sel(vector double __a, vector double __b, vector bool long long __c) { - vector unsigned long long __ac = (vector unsigned long long)__a; - vector unsigned long long __bc = (vector unsigned long long)__b; - vector unsigned long long __cc = (vector unsigned long long)__c; - return (vector double)((__cc & __bc) | (~__cc & __ac)); +static inline __ATTRS_o_ai __vector double +vec_sel(__vector double __a, __vector double __b, + __vector __bool long long __c) { + __vector unsigned long long __ac = (__vector unsigned long long)__a; + __vector unsigned long long __bc = (__vector unsigned long long)__b; + __vector unsigned long long __cc = (__vector unsigned long long)__c; + return (__vector double)((__cc & __bc) | (~__cc & __ac)); } /*-- vec_gather_element -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed int -vec_gather_element(vector signed int __vec, vector unsigned int __offset, +static inline __ATTRS_o_ai __vector signed int +vec_gather_element(__vector signed int __vec, + __vector unsigned int __offset, const signed int *__ptr, int __index) __constant_range(__index, 0, 3) { __vec[__index] = *(const signed int *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } -static inline __ATTRS_o_ai vector bool int -vec_gather_element(vector bool int __vec, vector unsigned int __offset, +static inline __ATTRS_o_ai __vector __bool int +vec_gather_element(__vector __bool int __vec, + __vector unsigned int __offset, const unsigned int *__ptr, int __index) __constant_range(__index, 0, 3) { __vec[__index] = *(const unsigned int *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } -static inline __ATTRS_o_ai vector unsigned int -vec_gather_element(vector unsigned int __vec, vector unsigned int __offset, +static inline __ATTRS_o_ai __vector unsigned int +vec_gather_element(__vector unsigned int __vec, + __vector unsigned int __offset, const unsigned int *__ptr, int __index) __constant_range(__index, 0, 3) { __vec[__index] = *(const unsigned int *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } -static inline __ATTRS_o_ai vector signed long long -vec_gather_element(vector signed long long __vec, - vector unsigned long long __offset, +static inline __ATTRS_o_ai __vector signed long long +vec_gather_element(__vector signed long long __vec, + __vector unsigned long long __offset, const signed long long *__ptr, int __index) __constant_range(__index, 0, 1) { __vec[__index] = *(const signed long long *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } -static inline __ATTRS_o_ai vector bool long long -vec_gather_element(vector bool long long __vec, - vector unsigned long long __offset, +static inline __ATTRS_o_ai __vector __bool long long +vec_gather_element(__vector __bool long long __vec, + __vector unsigned long long __offset, const unsigned long long *__ptr, int __index) __constant_range(__index, 0, 1) { __vec[__index] = *(const unsigned long long *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } -static inline __ATTRS_o_ai vector unsigned long long -vec_gather_element(vector unsigned long long __vec, - vector unsigned long long __offset, +static inline __ATTRS_o_ai __vector unsigned long long +vec_gather_element(__vector unsigned long long __vec, + __vector unsigned long long __offset, const unsigned long long *__ptr, int __index) __constant_range(__index, 0, 1) { __vec[__index] = *(const unsigned long long *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_gather_element(vector float __vec, vector unsigned int __offset, +static inline __ATTRS_o_ai __vector float +vec_gather_element(__vector float __vec, + __vector unsigned int __offset, const float *__ptr, int __index) __constant_range(__index, 0, 3) { __vec[__index] = *(const float *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } #endif -static inline __ATTRS_o_ai vector double -vec_gather_element(vector double __vec, vector unsigned long long __offset, +static inline __ATTRS_o_ai __vector double +vec_gather_element(__vector double __vec, + __vector unsigned long long __offset, const double *__ptr, int __index) __constant_range(__index, 0, 1) { __vec[__index] = *(const double *)( - (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]); + (const char *)__ptr + __offset[__index]); return __vec; } /*-- vec_scatter_element ----------------------------------------------------*/ static inline __ATTRS_o_ai void -vec_scatter_element(vector signed int __vec, vector unsigned int __offset, +vec_scatter_element(__vector signed int __vec, + __vector unsigned int __offset, signed int *__ptr, int __index) __constant_range(__index, 0, 3) { - *(signed int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(signed int *)((char *)__ptr + __offset[__index]) = __vec[__index]; } static inline __ATTRS_o_ai void -vec_scatter_element(vector bool int __vec, vector unsigned int __offset, +vec_scatter_element(__vector __bool int __vec, + __vector unsigned int __offset, unsigned int *__ptr, int __index) __constant_range(__index, 0, 3) { - *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(unsigned int *)((char *)__ptr + __offset[__index]) = __vec[__index]; } static inline __ATTRS_o_ai void -vec_scatter_element(vector unsigned int __vec, vector unsigned int __offset, +vec_scatter_element(__vector unsigned int __vec, + __vector unsigned int __offset, unsigned int *__ptr, int __index) __constant_range(__index, 0, 3) { - *(unsigned int *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(unsigned int *)((char *)__ptr + __offset[__index]) = __vec[__index]; } static inline __ATTRS_o_ai void -vec_scatter_element(vector signed long long __vec, - vector unsigned long long __offset, +vec_scatter_element(__vector signed long long __vec, + __vector unsigned long long __offset, signed long long *__ptr, int __index) __constant_range(__index, 0, 1) { - *(signed long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(signed long long *)((char *)__ptr + __offset[__index]) = __vec[__index]; } static inline __ATTRS_o_ai void -vec_scatter_element(vector bool long long __vec, - vector unsigned long long __offset, +vec_scatter_element(__vector __bool long long __vec, + __vector unsigned long long __offset, unsigned long long *__ptr, int __index) __constant_range(__index, 0, 1) { - *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(unsigned long long *)((char *)__ptr + __offset[__index]) = __vec[__index]; } static inline __ATTRS_o_ai void -vec_scatter_element(vector unsigned long long __vec, - vector unsigned long long __offset, +vec_scatter_element(__vector unsigned long long __vec, + __vector unsigned long long __offset, unsigned long long *__ptr, int __index) __constant_range(__index, 0, 1) { - *(unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(unsigned long long *)((char *)__ptr + __offset[__index]) = __vec[__index]; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai void -vec_scatter_element(vector float __vec, vector unsigned int __offset, +vec_scatter_element(__vector float __vec, + __vector unsigned int __offset, float *__ptr, int __index) __constant_range(__index, 0, 3) { - *(float *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(float *)((char *)__ptr + __offset[__index]) = __vec[__index]; } #endif static inline __ATTRS_o_ai void -vec_scatter_element(vector double __vec, vector unsigned long long __offset, +vec_scatter_element(__vector double __vec, + __vector unsigned long long __offset, double *__ptr, int __index) __constant_range(__index, 0, 1) { - *(double *)((__INTPTR_TYPE__)__ptr + __offset[__index]) = + *(double *)((char *)__ptr + __offset[__index]) = __vec[__index]; } /*-- vec_xl -----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_xl(long __offset, const signed char *__ptr) { - return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed char *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_xl(long __offset, const unsigned char *__ptr) { - return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned char *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_xl(long __offset, const signed short *__ptr) { - return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed short *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_xl(long __offset, const unsigned short *__ptr) { - return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned short *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_xl(long __offset, const signed int *__ptr) { - return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed int *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_xl(long __offset, const unsigned int *__ptr) { - return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned int *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_xl(long __offset, const signed long long *__ptr) { - return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed long long *) + ((const char *)__ptr + __offset); } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_xl(long __offset, const unsigned long long *__ptr) { - return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned long long *) + ((const char *)__ptr + __offset); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float +static inline __ATTRS_o_ai __vector float vec_xl(long __offset, const float *__ptr) { - return *(const vector float *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector float *) + ((const char *)__ptr + __offset); } #endif -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_xl(long __offset, const double *__ptr) { - return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector double *) + ((const char *)__ptr + __offset); } /*-- vec_xld2 ---------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_xld2(long __offset, const signed char *__ptr) { - return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed char *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_xld2(long __offset, const unsigned char *__ptr) { - return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned char *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_xld2(long __offset, const signed short *__ptr) { - return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed short *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_xld2(long __offset, const unsigned short *__ptr) { - return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned short *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_xld2(long __offset, const signed int *__ptr) { - return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed int *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_xld2(long __offset, const unsigned int *__ptr) { - return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned int *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_xld2(long __offset, const signed long long *__ptr) { - return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed long long *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_xld2(long __offset, const unsigned long long *__ptr) { - return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned long long *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_xld2(long __offset, const double *__ptr) { - return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector double *) + ((const char *)__ptr + __offset); } /*-- vec_xlw4 ---------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_xlw4(long __offset, const signed char *__ptr) { - return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed char *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_xlw4(long __offset, const unsigned char *__ptr) { - return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned char *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_xlw4(long __offset, const signed short *__ptr) { - return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed short *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_xlw4(long __offset, const unsigned short *__ptr) { - return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned short *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_xlw4(long __offset, const signed int *__ptr) { - return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector signed int *) + ((const char *)__ptr + __offset); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_xlw4(long __offset, const unsigned int *__ptr) { - return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset); + return *(const __vector unsigned int *) + ((const char *)__ptr + __offset); } /*-- vec_xst ----------------------------------------------------------------*/ static inline __ATTRS_o_ai void -vec_xst(vector signed char __vec, long __offset, signed char *__ptr) { - *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector signed char __vec, long __offset, signed char *__ptr) { + *(__vector signed char *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector unsigned char __vec, long __offset, unsigned char *__ptr) { - *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector unsigned char __vec, long __offset, unsigned char *__ptr) { + *(__vector unsigned char *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector signed short __vec, long __offset, signed short *__ptr) { - *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector signed short __vec, long __offset, signed short *__ptr) { + *(__vector signed short *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector unsigned short __vec, long __offset, unsigned short *__ptr) { - *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector unsigned short __vec, long __offset, unsigned short *__ptr) { + *(__vector unsigned short *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector signed int __vec, long __offset, signed int *__ptr) { - *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector signed int __vec, long __offset, signed int *__ptr) { + *(__vector signed int *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector unsigned int __vec, long __offset, unsigned int *__ptr) { - *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector unsigned int __vec, long __offset, unsigned int *__ptr) { + *(__vector unsigned int *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector signed long long __vec, long __offset, +vec_xst(__vector signed long long __vec, long __offset, signed long long *__ptr) { - *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; + *(__vector signed long long *)((char *)__ptr + __offset) = __vec; } static inline __ATTRS_o_ai void -vec_xst(vector unsigned long long __vec, long __offset, +vec_xst(__vector unsigned long long __vec, long __offset, unsigned long long *__ptr) { - *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) = - __vec; + *(__vector unsigned long long *)((char *)__ptr + __offset) = __vec; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai void -vec_xst(vector float __vec, long __offset, float *__ptr) { - *(vector float *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector float __vec, long __offset, float *__ptr) { + *(__vector float *)((char *)__ptr + __offset) = __vec; } #endif static inline __ATTRS_o_ai void -vec_xst(vector double __vec, long __offset, double *__ptr) { - *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xst(__vector double __vec, long __offset, double *__ptr) { + *(__vector double *)((char *)__ptr + __offset) = __vec; } /*-- vec_xstd2 --------------------------------------------------------------*/ // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector signed char __vec, long __offset, signed char *__ptr) { - *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector signed char __vec, long __offset, signed char *__ptr) { + *(__vector signed char *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector unsigned char __vec, long __offset, unsigned char *__ptr) { - *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector unsigned char __vec, long __offset, unsigned char *__ptr) { + *(__vector unsigned char *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector signed short __vec, long __offset, signed short *__ptr) { - *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector signed short __vec, long __offset, signed short *__ptr) { + *(__vector signed short *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector unsigned short __vec, long __offset, unsigned short *__ptr) { - *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector unsigned short __vec, long __offset, unsigned short *__ptr) { + *(__vector unsigned short *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector signed int __vec, long __offset, signed int *__ptr) { - *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector signed int __vec, long __offset, signed int *__ptr) { + *(__vector signed int *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector unsigned int __vec, long __offset, unsigned int *__ptr) { - *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector unsigned int __vec, long __offset, unsigned int *__ptr) { + *(__vector unsigned int *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector signed long long __vec, long __offset, +vec_xstd2(__vector signed long long __vec, long __offset, signed long long *__ptr) { - *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; + *(__vector signed long long *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector unsigned long long __vec, long __offset, +vec_xstd2(__vector unsigned long long __vec, long __offset, unsigned long long *__ptr) { - *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) = - __vec; + *(__vector unsigned long long *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstd2(vector double __vec, long __offset, double *__ptr) { - *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstd2(__vector double __vec, long __offset, double *__ptr) { + *(__vector double *)((char *)__ptr + __offset) = __vec; } /*-- vec_xstw4 --------------------------------------------------------------*/ // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector signed char __vec, long __offset, signed char *__ptr) { - *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector signed char __vec, long __offset, signed char *__ptr) { + *(__vector signed char *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector unsigned char __vec, long __offset, unsigned char *__ptr) { - *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector unsigned char __vec, long __offset, unsigned char *__ptr) { + *(__vector unsigned char *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector signed short __vec, long __offset, signed short *__ptr) { - *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector signed short __vec, long __offset, signed short *__ptr) { + *(__vector signed short *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector unsigned short __vec, long __offset, unsigned short *__ptr) { - *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector unsigned short __vec, long __offset, unsigned short *__ptr) { + *(__vector unsigned short *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector signed int __vec, long __offset, signed int *__ptr) { - *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector signed int __vec, long __offset, signed int *__ptr) { + *(__vector signed int *)((char *)__ptr + __offset) = __vec; } // This prototype is deprecated. static inline __ATTRS_o_ai void -vec_xstw4(vector unsigned int __vec, long __offset, unsigned int *__ptr) { - *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec; +vec_xstw4(__vector unsigned int __vec, long __offset, unsigned int *__ptr) { + *(__vector unsigned int *)((char *)__ptr + __offset) = __vec; } /*-- vec_load_bndry ---------------------------------------------------------*/ -extern __ATTRS_o vector signed char +extern __ATTRS_o __vector signed char vec_load_bndry(const signed char *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector unsigned char +extern __ATTRS_o __vector unsigned char vec_load_bndry(const unsigned char *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector signed short +extern __ATTRS_o __vector signed short vec_load_bndry(const signed short *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector unsigned short +extern __ATTRS_o __vector unsigned short vec_load_bndry(const unsigned short *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector signed int +extern __ATTRS_o __vector signed int vec_load_bndry(const signed int *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector unsigned int +extern __ATTRS_o __vector unsigned int vec_load_bndry(const unsigned int *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector signed long long +extern __ATTRS_o __vector signed long long vec_load_bndry(const signed long long *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); -extern __ATTRS_o vector unsigned long long +extern __ATTRS_o __vector unsigned long long vec_load_bndry(const unsigned long long *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); #if __ARCH__ >= 12 -extern __ATTRS_o vector float +extern __ATTRS_o __vector float vec_load_bndry(const float *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); #endif -extern __ATTRS_o vector double +extern __ATTRS_o __vector double vec_load_bndry(const double *__ptr, unsigned short __len) __constant_pow2_range(__len, 64, 4096); @@ -1332,159 +1392,159 @@ vec_load_bndry(const double *__ptr, unsigned short __len) /*-- vec_load_len -----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_load_len(const signed char *__ptr, unsigned int __len) { - return (vector signed char)__builtin_s390_vll(__len, __ptr); + return (__vector signed char)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_load_len(const unsigned char *__ptr, unsigned int __len) { - return (vector unsigned char)__builtin_s390_vll(__len, __ptr); + return (__vector unsigned char)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_load_len(const signed short *__ptr, unsigned int __len) { - return (vector signed short)__builtin_s390_vll(__len, __ptr); + return (__vector signed short)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_load_len(const unsigned short *__ptr, unsigned int __len) { - return (vector unsigned short)__builtin_s390_vll(__len, __ptr); + return (__vector unsigned short)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_load_len(const signed int *__ptr, unsigned int __len) { - return (vector signed int)__builtin_s390_vll(__len, __ptr); + return (__vector signed int)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_load_len(const unsigned int *__ptr, unsigned int __len) { - return (vector unsigned int)__builtin_s390_vll(__len, __ptr); + return (__vector unsigned int)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_load_len(const signed long long *__ptr, unsigned int __len) { - return (vector signed long long)__builtin_s390_vll(__len, __ptr); + return (__vector signed long long)__builtin_s390_vll(__len, __ptr); } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_load_len(const unsigned long long *__ptr, unsigned int __len) { - return (vector unsigned long long)__builtin_s390_vll(__len, __ptr); + return (__vector unsigned long long)__builtin_s390_vll(__len, __ptr); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float +static inline __ATTRS_o_ai __vector float vec_load_len(const float *__ptr, unsigned int __len) { - return (vector float)__builtin_s390_vll(__len, __ptr); + return (__vector float)__builtin_s390_vll(__len, __ptr); } #endif -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_load_len(const double *__ptr, unsigned int __len) { - return (vector double)__builtin_s390_vll(__len, __ptr); + return (__vector double)__builtin_s390_vll(__len, __ptr); } /*-- vec_load_len_r ---------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_ai vector unsigned char +static inline __ATTRS_ai __vector unsigned char vec_load_len_r(const unsigned char *__ptr, unsigned int __len) { - return (vector unsigned char)__builtin_s390_vlrl(__len, __ptr); + return (__vector unsigned char)__builtin_s390_vlrl(__len, __ptr); } #endif /*-- vec_store_len ----------------------------------------------------------*/ static inline __ATTRS_o_ai void -vec_store_len(vector signed char __vec, signed char *__ptr, +vec_store_len(__vector signed char __vec, signed char *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector unsigned char __vec, unsigned char *__ptr, +vec_store_len(__vector unsigned char __vec, unsigned char *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector signed short __vec, signed short *__ptr, +vec_store_len(__vector signed short __vec, signed short *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector unsigned short __vec, unsigned short *__ptr, +vec_store_len(__vector unsigned short __vec, unsigned short *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector signed int __vec, signed int *__ptr, +vec_store_len(__vector signed int __vec, signed int *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector unsigned int __vec, unsigned int *__ptr, +vec_store_len(__vector unsigned int __vec, unsigned int *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector signed long long __vec, signed long long *__ptr, +vec_store_len(__vector signed long long __vec, signed long long *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } static inline __ATTRS_o_ai void -vec_store_len(vector unsigned long long __vec, unsigned long long *__ptr, +vec_store_len(__vector unsigned long long __vec, unsigned long long *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } #if __ARCH__ >= 12 static inline __ATTRS_o_ai void -vec_store_len(vector float __vec, float *__ptr, +vec_store_len(__vector float __vec, float *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } #endif static inline __ATTRS_o_ai void -vec_store_len(vector double __vec, double *__ptr, +vec_store_len(__vector double __vec, double *__ptr, unsigned int __len) { - __builtin_s390_vstl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstl((__vector signed char)__vec, __len, __ptr); } /*-- vec_store_len_r --------------------------------------------------------*/ #if __ARCH__ >= 12 static inline __ATTRS_ai void -vec_store_len_r(vector unsigned char __vec, unsigned char *__ptr, +vec_store_len_r(__vector unsigned char __vec, unsigned char *__ptr, unsigned int __len) { - __builtin_s390_vstrl((vector signed char)__vec, __len, __ptr); + __builtin_s390_vstrl((__vector signed char)__vec, __len, __ptr); } #endif /*-- vec_load_pair ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_load_pair(signed long long __a, signed long long __b) { - return (vector signed long long)(__a, __b); + return (__vector signed long long)(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_load_pair(unsigned long long __a, unsigned long long __b) { - return (vector unsigned long long)(__a, __b); + return (__vector unsigned long long)(__a, __b); } /*-- vec_genmask ------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_genmask(unsigned short __mask) __constant(__mask) { - return (vector unsigned char)( + return (__vector unsigned char)( __mask & 0x8000 ? 0xff : 0, __mask & 0x4000 ? 0xff : 0, __mask & 0x2000 ? 0xff : 0, @@ -1505,7 +1565,7 @@ vec_genmask(unsigned short __mask) /*-- vec_genmasks_* ---------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_genmasks_8(unsigned char __first, unsigned char __last) __constant(__first) __constant(__last) { unsigned char __bit1 = __first & 7; @@ -1515,10 +1575,10 @@ vec_genmasks_8(unsigned char __first, unsigned char __last) unsigned char __value = (__bit1 <= __bit2 ? __mask1 & ~__mask2 : __mask1 | ~__mask2); - return (vector unsigned char)__value; + return (__vector unsigned char)__value; } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_genmasks_16(unsigned char __first, unsigned char __last) __constant(__first) __constant(__last) { unsigned char __bit1 = __first & 15; @@ -1528,10 +1588,10 @@ vec_genmasks_16(unsigned char __first, unsigned char __last) unsigned short __value = (__bit1 <= __bit2 ? __mask1 & ~__mask2 : __mask1 | ~__mask2); - return (vector unsigned short)__value; + return (__vector unsigned short)__value; } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_genmasks_32(unsigned char __first, unsigned char __last) __constant(__first) __constant(__last) { unsigned char __bit1 = __first & 31; @@ -1541,10 +1601,10 @@ vec_genmasks_32(unsigned char __first, unsigned char __last) unsigned int __value = (__bit1 <= __bit2 ? __mask1 & ~__mask2 : __mask1 | ~__mask2); - return (vector unsigned int)__value; + return (__vector unsigned int)__value; } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_genmasks_64(unsigned char __first, unsigned char __last) __constant(__first) __constant(__last) { unsigned char __bit1 = __first & 63; @@ -1554,978 +1614,986 @@ vec_genmasks_64(unsigned char __first, unsigned char __last) unsigned long long __value = (__bit1 <= __bit2 ? __mask1 & ~__mask2 : __mask1 | ~__mask2); - return (vector unsigned long long)__value; + return (__vector unsigned long long)__value; } /*-- vec_splat --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_splat(vector signed char __vec, int __index) +static inline __ATTRS_o_ai __vector signed char +vec_splat(__vector signed char __vec, int __index) __constant_range(__index, 0, 15) { - return (vector signed char)__vec[__index]; + return (__vector signed char)__vec[__index]; } -static inline __ATTRS_o_ai vector bool char -vec_splat(vector bool char __vec, int __index) +static inline __ATTRS_o_ai __vector __bool char +vec_splat(__vector __bool char __vec, int __index) __constant_range(__index, 0, 15) { - return (vector bool char)(vector unsigned char)__vec[__index]; + return (__vector __bool char)(__vector unsigned char)__vec[__index]; } -static inline __ATTRS_o_ai vector unsigned char -vec_splat(vector unsigned char __vec, int __index) +static inline __ATTRS_o_ai __vector unsigned char +vec_splat(__vector unsigned char __vec, int __index) __constant_range(__index, 0, 15) { - return (vector unsigned char)__vec[__index]; + return (__vector unsigned char)__vec[__index]; } -static inline __ATTRS_o_ai vector signed short -vec_splat(vector signed short __vec, int __index) +static inline __ATTRS_o_ai __vector signed short +vec_splat(__vector signed short __vec, int __index) __constant_range(__index, 0, 7) { - return (vector signed short)__vec[__index]; + return (__vector signed short)__vec[__index]; } -static inline __ATTRS_o_ai vector bool short -vec_splat(vector bool short __vec, int __index) +static inline __ATTRS_o_ai __vector __bool short +vec_splat(__vector __bool short __vec, int __index) __constant_range(__index, 0, 7) { - return (vector bool short)(vector unsigned short)__vec[__index]; + return (__vector __bool short)(__vector unsigned short)__vec[__index]; } -static inline __ATTRS_o_ai vector unsigned short -vec_splat(vector unsigned short __vec, int __index) +static inline __ATTRS_o_ai __vector unsigned short +vec_splat(__vector unsigned short __vec, int __index) __constant_range(__index, 0, 7) { - return (vector unsigned short)__vec[__index]; + return (__vector unsigned short)__vec[__index]; } -static inline __ATTRS_o_ai vector signed int -vec_splat(vector signed int __vec, int __index) +static inline __ATTRS_o_ai __vector signed int +vec_splat(__vector signed int __vec, int __index) __constant_range(__index, 0, 3) { - return (vector signed int)__vec[__index]; + return (__vector signed int)__vec[__index]; } -static inline __ATTRS_o_ai vector bool int -vec_splat(vector bool int __vec, int __index) +static inline __ATTRS_o_ai __vector __bool int +vec_splat(__vector __bool int __vec, int __index) __constant_range(__index, 0, 3) { - return (vector bool int)(vector unsigned int)__vec[__index]; + return (__vector __bool int)(__vector unsigned int)__vec[__index]; } -static inline __ATTRS_o_ai vector unsigned int -vec_splat(vector unsigned int __vec, int __index) +static inline __ATTRS_o_ai __vector unsigned int +vec_splat(__vector unsigned int __vec, int __index) __constant_range(__index, 0, 3) { - return (vector unsigned int)__vec[__index]; + return (__vector unsigned int)__vec[__index]; } -static inline __ATTRS_o_ai vector signed long long -vec_splat(vector signed long long __vec, int __index) +static inline __ATTRS_o_ai __vector signed long long +vec_splat(__vector signed long long __vec, int __index) __constant_range(__index, 0, 1) { - return (vector signed long long)__vec[__index]; + return (__vector signed long long)__vec[__index]; } -static inline __ATTRS_o_ai vector bool long long -vec_splat(vector bool long long __vec, int __index) +static inline __ATTRS_o_ai __vector __bool long long +vec_splat(__vector __bool long long __vec, int __index) __constant_range(__index, 0, 1) { - return (vector bool long long)(vector unsigned long long)__vec[__index]; + return ((__vector __bool long long) + (__vector unsigned long long)__vec[__index]); } -static inline __ATTRS_o_ai vector unsigned long long -vec_splat(vector unsigned long long __vec, int __index) +static inline __ATTRS_o_ai __vector unsigned long long +vec_splat(__vector unsigned long long __vec, int __index) __constant_range(__index, 0, 1) { - return (vector unsigned long long)__vec[__index]; + return (__vector unsigned long long)__vec[__index]; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_splat(vector float __vec, int __index) +static inline __ATTRS_o_ai __vector float +vec_splat(__vector float __vec, int __index) __constant_range(__index, 0, 3) { - return (vector float)__vec[__index]; + return (__vector float)__vec[__index]; } #endif -static inline __ATTRS_o_ai vector double -vec_splat(vector double __vec, int __index) +static inline __ATTRS_o_ai __vector double +vec_splat(__vector double __vec, int __index) __constant_range(__index, 0, 1) { - return (vector double)__vec[__index]; + return (__vector double)__vec[__index]; } /*-- vec_splat_s* -----------------------------------------------------------*/ -static inline __ATTRS_ai vector signed char +static inline __ATTRS_ai __vector signed char vec_splat_s8(signed char __scalar) __constant(__scalar) { - return (vector signed char)__scalar; + return (__vector signed char)__scalar; } -static inline __ATTRS_ai vector signed short +static inline __ATTRS_ai __vector signed short vec_splat_s16(signed short __scalar) __constant(__scalar) { - return (vector signed short)__scalar; + return (__vector signed short)__scalar; } -static inline __ATTRS_ai vector signed int +static inline __ATTRS_ai __vector signed int vec_splat_s32(signed short __scalar) __constant(__scalar) { - return (vector signed int)(signed int)__scalar; + return (__vector signed int)(signed int)__scalar; } -static inline __ATTRS_ai vector signed long long +static inline __ATTRS_ai __vector signed long long vec_splat_s64(signed short __scalar) __constant(__scalar) { - return (vector signed long long)(signed long)__scalar; + return (__vector signed long long)(signed long)__scalar; } /*-- vec_splat_u* -----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char +static inline __ATTRS_ai __vector unsigned char vec_splat_u8(unsigned char __scalar) __constant(__scalar) { - return (vector unsigned char)__scalar; + return (__vector unsigned char)__scalar; } -static inline __ATTRS_ai vector unsigned short +static inline __ATTRS_ai __vector unsigned short vec_splat_u16(unsigned short __scalar) __constant(__scalar) { - return (vector unsigned short)__scalar; + return (__vector unsigned short)__scalar; } -static inline __ATTRS_ai vector unsigned int +static inline __ATTRS_ai __vector unsigned int vec_splat_u32(signed short __scalar) __constant(__scalar) { - return (vector unsigned int)(signed int)__scalar; + return (__vector unsigned int)(signed int)__scalar; } -static inline __ATTRS_ai vector unsigned long long +static inline __ATTRS_ai __vector unsigned long long vec_splat_u64(signed short __scalar) __constant(__scalar) { - return (vector unsigned long long)(signed long long)__scalar; + return (__vector unsigned long long)(signed long long)__scalar; } /*-- vec_splats -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char +static inline __ATTRS_o_ai __vector signed char vec_splats(signed char __scalar) { - return (vector signed char)__scalar; + return (__vector signed char)__scalar; } -static inline __ATTRS_o_ai vector unsigned char +static inline __ATTRS_o_ai __vector unsigned char vec_splats(unsigned char __scalar) { - return (vector unsigned char)__scalar; + return (__vector unsigned char)__scalar; } -static inline __ATTRS_o_ai vector signed short +static inline __ATTRS_o_ai __vector signed short vec_splats(signed short __scalar) { - return (vector signed short)__scalar; + return (__vector signed short)__scalar; } -static inline __ATTRS_o_ai vector unsigned short +static inline __ATTRS_o_ai __vector unsigned short vec_splats(unsigned short __scalar) { - return (vector unsigned short)__scalar; + return (__vector unsigned short)__scalar; } -static inline __ATTRS_o_ai vector signed int +static inline __ATTRS_o_ai __vector signed int vec_splats(signed int __scalar) { - return (vector signed int)__scalar; + return (__vector signed int)__scalar; } -static inline __ATTRS_o_ai vector unsigned int +static inline __ATTRS_o_ai __vector unsigned int vec_splats(unsigned int __scalar) { - return (vector unsigned int)__scalar; + return (__vector unsigned int)__scalar; } -static inline __ATTRS_o_ai vector signed long long +static inline __ATTRS_o_ai __vector signed long long vec_splats(signed long long __scalar) { - return (vector signed long long)__scalar; + return (__vector signed long long)__scalar; } -static inline __ATTRS_o_ai vector unsigned long long +static inline __ATTRS_o_ai __vector unsigned long long vec_splats(unsigned long long __scalar) { - return (vector unsigned long long)__scalar; + return (__vector unsigned long long)__scalar; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float +static inline __ATTRS_o_ai __vector float vec_splats(float __scalar) { - return (vector float)__scalar; + return (__vector float)__scalar; } #endif -static inline __ATTRS_o_ai vector double +static inline __ATTRS_o_ai __vector double vec_splats(double __scalar) { - return (vector double)__scalar; + return (__vector double)__scalar; } /*-- vec_extend_s64 ---------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed long long -vec_extend_s64(vector signed char __a) { - return (vector signed long long)(__a[7], __a[15]); +static inline __ATTRS_o_ai __vector signed long long +vec_extend_s64(__vector signed char __a) { + return (__vector signed long long)(__a[7], __a[15]); } -static inline __ATTRS_o_ai vector signed long long -vec_extend_s64(vector signed short __a) { - return (vector signed long long)(__a[3], __a[7]); +static inline __ATTRS_o_ai __vector signed long long +vec_extend_s64(__vector signed short __a) { + return (__vector signed long long)(__a[3], __a[7]); } -static inline __ATTRS_o_ai vector signed long long -vec_extend_s64(vector signed int __a) { - return (vector signed long long)(__a[1], __a[3]); +static inline __ATTRS_o_ai __vector signed long long +vec_extend_s64(__vector signed int __a) { + return (__vector signed long long)(__a[1], __a[3]); } /*-- vec_mergeh -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_mergeh(vector signed char __a, vector signed char __b) { - return (vector signed char)( +static inline __ATTRS_o_ai __vector signed char +vec_mergeh(__vector signed char __a, __vector signed char __b) { + return (__vector signed char)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3], __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector bool char -vec_mergeh(vector bool char __a, vector bool char __b) { - return (vector bool char)( +static inline __ATTRS_o_ai __vector __bool char +vec_mergeh(__vector __bool char __a, __vector __bool char __b) { + return (__vector __bool char)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3], __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector unsigned char -vec_mergeh(vector unsigned char __a, vector unsigned char __b) { - return (vector unsigned char)( +static inline __ATTRS_o_ai __vector unsigned char +vec_mergeh(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector unsigned char)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3], __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector signed short -vec_mergeh(vector signed short __a, vector signed short __b) { - return (vector signed short)( +static inline __ATTRS_o_ai __vector signed short +vec_mergeh(__vector signed short __a, __vector signed short __b) { + return (__vector signed short)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector bool short -vec_mergeh(vector bool short __a, vector bool short __b) { - return (vector bool short)( +static inline __ATTRS_o_ai __vector __bool short +vec_mergeh(__vector __bool short __a, __vector __bool short __b) { + return (__vector __bool short)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector unsigned short -vec_mergeh(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)( +static inline __ATTRS_o_ai __vector unsigned short +vec_mergeh(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)( __a[0], __b[0], __a[1], __b[1], __a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector signed int -vec_mergeh(vector signed int __a, vector signed int __b) { - return (vector signed int)(__a[0], __b[0], __a[1], __b[1]); +static inline __ATTRS_o_ai __vector signed int +vec_mergeh(__vector signed int __a, __vector signed int __b) { + return (__vector signed int)(__a[0], __b[0], __a[1], __b[1]); } -static inline __ATTRS_o_ai vector bool int -vec_mergeh(vector bool int __a, vector bool int __b) { - return (vector bool int)(__a[0], __b[0], __a[1], __b[1]); +static inline __ATTRS_o_ai __vector __bool int +vec_mergeh(__vector __bool int __a, __vector __bool int __b) { + return (__vector __bool int)(__a[0], __b[0], __a[1], __b[1]); } -static inline __ATTRS_o_ai vector unsigned int -vec_mergeh(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)(__a[0], __b[0], __a[1], __b[1]); +static inline __ATTRS_o_ai __vector unsigned int +vec_mergeh(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)(__a[0], __b[0], __a[1], __b[1]); } -static inline __ATTRS_o_ai vector signed long long -vec_mergeh(vector signed long long __a, vector signed long long __b) { - return (vector signed long long)(__a[0], __b[0]); +static inline __ATTRS_o_ai __vector signed long long +vec_mergeh(__vector signed long long __a, __vector signed long long __b) { + return (__vector signed long long)(__a[0], __b[0]); } -static inline __ATTRS_o_ai vector bool long long -vec_mergeh(vector bool long long __a, vector bool long long __b) { - return (vector bool long long)(__a[0], __b[0]); +static inline __ATTRS_o_ai __vector __bool long long +vec_mergeh(__vector __bool long long __a, __vector __bool long long __b) { + return (__vector __bool long long)(__a[0], __b[0]); } -static inline __ATTRS_o_ai vector unsigned long long -vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) { - return (vector unsigned long long)(__a[0], __b[0]); +static inline __ATTRS_o_ai __vector unsigned long long +vec_mergeh(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector unsigned long long)(__a[0], __b[0]); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_mergeh(vector float __a, vector float __b) { - return (vector float)(__a[0], __b[0], __a[1], __b[1]); +static inline __ATTRS_o_ai __vector float +vec_mergeh(__vector float __a, __vector float __b) { + return (__vector float)(__a[0], __b[0], __a[1], __b[1]); } #endif -static inline __ATTRS_o_ai vector double -vec_mergeh(vector double __a, vector double __b) { - return (vector double)(__a[0], __b[0]); +static inline __ATTRS_o_ai __vector double +vec_mergeh(__vector double __a, __vector double __b) { + return (__vector double)(__a[0], __b[0]); } /*-- vec_mergel -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_mergel(vector signed char __a, vector signed char __b) { - return (vector signed char)( +static inline __ATTRS_o_ai __vector signed char +vec_mergel(__vector signed char __a, __vector signed char __b) { + return (__vector signed char)( __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11], __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]); } -static inline __ATTRS_o_ai vector bool char -vec_mergel(vector bool char __a, vector bool char __b) { - return (vector bool char)( +static inline __ATTRS_o_ai __vector __bool char +vec_mergel(__vector __bool char __a, __vector __bool char __b) { + return (__vector __bool char)( __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11], __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]); } -static inline __ATTRS_o_ai vector unsigned char -vec_mergel(vector unsigned char __a, vector unsigned char __b) { - return (vector unsigned char)( +static inline __ATTRS_o_ai __vector unsigned char +vec_mergel(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector unsigned char)( __a[8], __b[8], __a[9], __b[9], __a[10], __b[10], __a[11], __b[11], __a[12], __b[12], __a[13], __b[13], __a[14], __b[14], __a[15], __b[15]); } -static inline __ATTRS_o_ai vector signed short -vec_mergel(vector signed short __a, vector signed short __b) { - return (vector signed short)( +static inline __ATTRS_o_ai __vector signed short +vec_mergel(__vector signed short __a, __vector signed short __b) { + return (__vector signed short)( __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector bool short -vec_mergel(vector bool short __a, vector bool short __b) { - return (vector bool short)( +static inline __ATTRS_o_ai __vector __bool short +vec_mergel(__vector __bool short __a, __vector __bool short __b) { + return (__vector __bool short)( __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector unsigned short -vec_mergel(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)( +static inline __ATTRS_o_ai __vector unsigned short +vec_mergel(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)( __a[4], __b[4], __a[5], __b[5], __a[6], __b[6], __a[7], __b[7]); } -static inline __ATTRS_o_ai vector signed int -vec_mergel(vector signed int __a, vector signed int __b) { - return (vector signed int)(__a[2], __b[2], __a[3], __b[3]); +static inline __ATTRS_o_ai __vector signed int +vec_mergel(__vector signed int __a, __vector signed int __b) { + return (__vector signed int)(__a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector bool int -vec_mergel(vector bool int __a, vector bool int __b) { - return (vector bool int)(__a[2], __b[2], __a[3], __b[3]); +static inline __ATTRS_o_ai __vector __bool int +vec_mergel(__vector __bool int __a, __vector __bool int __b) { + return (__vector __bool int)(__a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector unsigned int -vec_mergel(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)(__a[2], __b[2], __a[3], __b[3]); +static inline __ATTRS_o_ai __vector unsigned int +vec_mergel(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)(__a[2], __b[2], __a[3], __b[3]); } -static inline __ATTRS_o_ai vector signed long long -vec_mergel(vector signed long long __a, vector signed long long __b) { - return (vector signed long long)(__a[1], __b[1]); +static inline __ATTRS_o_ai __vector signed long long +vec_mergel(__vector signed long long __a, __vector signed long long __b) { + return (__vector signed long long)(__a[1], __b[1]); } -static inline __ATTRS_o_ai vector bool long long -vec_mergel(vector bool long long __a, vector bool long long __b) { - return (vector bool long long)(__a[1], __b[1]); +static inline __ATTRS_o_ai __vector __bool long long +vec_mergel(__vector __bool long long __a, __vector __bool long long __b) { + return (__vector __bool long long)(__a[1], __b[1]); } -static inline __ATTRS_o_ai vector unsigned long long -vec_mergel(vector unsigned long long __a, vector unsigned long long __b) { - return (vector unsigned long long)(__a[1], __b[1]); +static inline __ATTRS_o_ai __vector unsigned long long +vec_mergel(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector unsigned long long)(__a[1], __b[1]); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_mergel(vector float __a, vector float __b) { - return (vector float)(__a[2], __b[2], __a[3], __b[3]); +static inline __ATTRS_o_ai __vector float +vec_mergel(__vector float __a, __vector float __b) { + return (__vector float)(__a[2], __b[2], __a[3], __b[3]); } #endif -static inline __ATTRS_o_ai vector double -vec_mergel(vector double __a, vector double __b) { - return (vector double)(__a[1], __b[1]); +static inline __ATTRS_o_ai __vector double +vec_mergel(__vector double __a, __vector double __b) { + return (__vector double)(__a[1], __b[1]); } /*-- vec_pack ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_pack(vector signed short __a, vector signed short __b) { - vector signed char __ac = (vector signed char)__a; - vector signed char __bc = (vector signed char)__b; - return (vector signed char)( +static inline __ATTRS_o_ai __vector signed char +vec_pack(__vector signed short __a, __vector signed short __b) { + __vector signed char __ac = (__vector signed char)__a; + __vector signed char __bc = (__vector signed char)__b; + return (__vector signed char)( __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15], __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]); } -static inline __ATTRS_o_ai vector bool char -vec_pack(vector bool short __a, vector bool short __b) { - vector bool char __ac = (vector bool char)__a; - vector bool char __bc = (vector bool char)__b; - return (vector bool char)( +static inline __ATTRS_o_ai __vector __bool char +vec_pack(__vector __bool short __a, __vector __bool short __b) { + __vector __bool char __ac = (__vector __bool char)__a; + __vector __bool char __bc = (__vector __bool char)__b; + return (__vector __bool char)( __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15], __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]); } -static inline __ATTRS_o_ai vector unsigned char -vec_pack(vector unsigned short __a, vector unsigned short __b) { - vector unsigned char __ac = (vector unsigned char)__a; - vector unsigned char __bc = (vector unsigned char)__b; - return (vector unsigned char)( +static inline __ATTRS_o_ai __vector unsigned char +vec_pack(__vector unsigned short __a, __vector unsigned short __b) { + __vector unsigned char __ac = (__vector unsigned char)__a; + __vector unsigned char __bc = (__vector unsigned char)__b; + return (__vector unsigned char)( __ac[1], __ac[3], __ac[5], __ac[7], __ac[9], __ac[11], __ac[13], __ac[15], __bc[1], __bc[3], __bc[5], __bc[7], __bc[9], __bc[11], __bc[13], __bc[15]); } -static inline __ATTRS_o_ai vector signed short -vec_pack(vector signed int __a, vector signed int __b) { - vector signed short __ac = (vector signed short)__a; - vector signed short __bc = (vector signed short)__b; - return (vector signed short)( +static inline __ATTRS_o_ai __vector signed short +vec_pack(__vector signed int __a, __vector signed int __b) { + __vector signed short __ac = (__vector signed short)__a; + __vector signed short __bc = (__vector signed short)__b; + return (__vector signed short)( __ac[1], __ac[3], __ac[5], __ac[7], __bc[1], __bc[3], __bc[5], __bc[7]); } -static inline __ATTRS_o_ai vector bool short -vec_pack(vector bool int __a, vector bool int __b) { - vector bool short __ac = (vector bool short)__a; - vector bool short __bc = (vector bool short)__b; - return (vector bool short)( +static inline __ATTRS_o_ai __vector __bool short +vec_pack(__vector __bool int __a, __vector __bool int __b) { + __vector __bool short __ac = (__vector __bool short)__a; + __vector __bool short __bc = (__vector __bool short)__b; + return (__vector __bool short)( __ac[1], __ac[3], __ac[5], __ac[7], __bc[1], __bc[3], __bc[5], __bc[7]); } -static inline __ATTRS_o_ai vector unsigned short -vec_pack(vector unsigned int __a, vector unsigned int __b) { - vector unsigned short __ac = (vector unsigned short)__a; - vector unsigned short __bc = (vector unsigned short)__b; - return (vector unsigned short)( +static inline __ATTRS_o_ai __vector unsigned short +vec_pack(__vector unsigned int __a, __vector unsigned int __b) { + __vector unsigned short __ac = (__vector unsigned short)__a; + __vector unsigned short __bc = (__vector unsigned short)__b; + return (__vector unsigned short)( __ac[1], __ac[3], __ac[5], __ac[7], __bc[1], __bc[3], __bc[5], __bc[7]); } -static inline __ATTRS_o_ai vector signed int -vec_pack(vector signed long long __a, vector signed long long __b) { - vector signed int __ac = (vector signed int)__a; - vector signed int __bc = (vector signed int)__b; - return (vector signed int)(__ac[1], __ac[3], __bc[1], __bc[3]); +static inline __ATTRS_o_ai __vector signed int +vec_pack(__vector signed long long __a, __vector signed long long __b) { + __vector signed int __ac = (__vector signed int)__a; + __vector signed int __bc = (__vector signed int)__b; + return (__vector signed int)(__ac[1], __ac[3], __bc[1], __bc[3]); } -static inline __ATTRS_o_ai vector bool int -vec_pack(vector bool long long __a, vector bool long long __b) { - vector bool int __ac = (vector bool int)__a; - vector bool int __bc = (vector bool int)__b; - return (vector bool int)(__ac[1], __ac[3], __bc[1], __bc[3]); +static inline __ATTRS_o_ai __vector __bool int +vec_pack(__vector __bool long long __a, __vector __bool long long __b) { + __vector __bool int __ac = (__vector __bool int)__a; + __vector __bool int __bc = (__vector __bool int)__b; + return (__vector __bool int)(__ac[1], __ac[3], __bc[1], __bc[3]); } -static inline __ATTRS_o_ai vector unsigned int -vec_pack(vector unsigned long long __a, vector unsigned long long __b) { - vector unsigned int __ac = (vector unsigned int)__a; - vector unsigned int __bc = (vector unsigned int)__b; - return (vector unsigned int)(__ac[1], __ac[3], __bc[1], __bc[3]); +static inline __ATTRS_o_ai __vector unsigned int +vec_pack(__vector unsigned long long __a, __vector unsigned long long __b) { + __vector unsigned int __ac = (__vector unsigned int)__a; + __vector unsigned int __bc = (__vector unsigned int)__b; + return (__vector unsigned int)(__ac[1], __ac[3], __bc[1], __bc[3]); } /*-- vec_packs --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_packs(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed char +vec_packs(__vector signed short __a, __vector signed short __b) { return __builtin_s390_vpksh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_packs(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_packs(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vpklsh(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_packs(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed short +vec_packs(__vector signed int __a, __vector signed int __b) { return __builtin_s390_vpksf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_packs(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_packs(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vpklsf(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_packs(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed int +vec_packs(__vector signed long long __a, __vector signed long long __b) { return __builtin_s390_vpksg(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_packs(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_packs(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vpklsg(__a, __b); } /*-- vec_packs_cc -----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_packs_cc(vector signed short __a, vector signed short __b, int *__cc) { +static inline __ATTRS_o_ai __vector signed char +vec_packs_cc(__vector signed short __a, __vector signed short __b, int *__cc) { return __builtin_s390_vpkshs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_packs_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_packs_cc(__vector unsigned short __a, __vector unsigned short __b, + int *__cc) { return __builtin_s390_vpklshs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_packs_cc(vector signed int __a, vector signed int __b, int *__cc) { +static inline __ATTRS_o_ai __vector signed short +vec_packs_cc(__vector signed int __a, __vector signed int __b, int *__cc) { return __builtin_s390_vpksfs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_packs_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_packs_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { return __builtin_s390_vpklsfs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_packs_cc(vector signed long long __a, vector signed long long __b, +static inline __ATTRS_o_ai __vector signed int +vec_packs_cc(__vector signed long long __a, __vector signed long long __b, int *__cc) { return __builtin_s390_vpksgs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_packs_cc(vector unsigned long long __a, vector unsigned long long __b, +static inline __ATTRS_o_ai __vector unsigned int +vec_packs_cc(__vector unsigned long long __a, __vector unsigned long long __b, int *__cc) { return __builtin_s390_vpklsgs(__a, __b, __cc); } /*-- vec_packsu -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_packsu(vector signed short __a, vector signed short __b) { - const vector signed short __zero = (vector signed short)0; +static inline __ATTRS_o_ai __vector unsigned char +vec_packsu(__vector signed short __a, __vector signed short __b) { + const __vector signed short __zero = (__vector signed short)0; return __builtin_s390_vpklsh( - (vector unsigned short)(__a >= __zero) & (vector unsigned short)__a, - (vector unsigned short)(__b >= __zero) & (vector unsigned short)__b); + (__vector unsigned short)(__a >= __zero) & (__vector unsigned short)__a, + (__vector unsigned short)(__b >= __zero) & (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_packsu(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_packsu(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vpklsh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_packsu(vector signed int __a, vector signed int __b) { - const vector signed int __zero = (vector signed int)0; +static inline __ATTRS_o_ai __vector unsigned short +vec_packsu(__vector signed int __a, __vector signed int __b) { + const __vector signed int __zero = (__vector signed int)0; return __builtin_s390_vpklsf( - (vector unsigned int)(__a >= __zero) & (vector unsigned int)__a, - (vector unsigned int)(__b >= __zero) & (vector unsigned int)__b); + (__vector unsigned int)(__a >= __zero) & (__vector unsigned int)__a, + (__vector unsigned int)(__b >= __zero) & (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_packsu(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_packsu(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vpklsf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_packsu(vector signed long long __a, vector signed long long __b) { - const vector signed long long __zero = (vector signed long long)0; +static inline __ATTRS_o_ai __vector unsigned int +vec_packsu(__vector signed long long __a, __vector signed long long __b) { + const __vector signed long long __zero = (__vector signed long long)0; return __builtin_s390_vpklsg( - (vector unsigned long long)(__a >= __zero) & - (vector unsigned long long)__a, - (vector unsigned long long)(__b >= __zero) & - (vector unsigned long long)__b); + (__vector unsigned long long)(__a >= __zero) & + (__vector unsigned long long)__a, + (__vector unsigned long long)(__b >= __zero) & + (__vector unsigned long long)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_packsu(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_packsu(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vpklsg(__a, __b); } /*-- vec_packsu_cc ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_packsu_cc(vector unsigned short __a, vector unsigned short __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_packsu_cc(__vector unsigned short __a, __vector unsigned short __b, + int *__cc) { return __builtin_s390_vpklshs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_packsu_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_packsu_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { return __builtin_s390_vpklsfs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_packsu_cc(vector unsigned long long __a, vector unsigned long long __b, +static inline __ATTRS_o_ai __vector unsigned int +vec_packsu_cc(__vector unsigned long long __a, __vector unsigned long long __b, int *__cc) { return __builtin_s390_vpklsgs(__a, __b, __cc); } /*-- vec_unpackh ------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_unpackh(vector signed char __a) { +static inline __ATTRS_o_ai __vector signed short +vec_unpackh(__vector signed char __a) { return __builtin_s390_vuphb(__a); } -static inline __ATTRS_o_ai vector bool short -vec_unpackh(vector bool char __a) { - return (vector bool short)__builtin_s390_vuphb((vector signed char)__a); +static inline __ATTRS_o_ai __vector __bool short +vec_unpackh(__vector __bool char __a) { + return ((__vector __bool short) + __builtin_s390_vuphb((__vector signed char)__a)); } -static inline __ATTRS_o_ai vector unsigned short -vec_unpackh(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_unpackh(__vector unsigned char __a) { return __builtin_s390_vuplhb(__a); } -static inline __ATTRS_o_ai vector signed int -vec_unpackh(vector signed short __a) { +static inline __ATTRS_o_ai __vector signed int +vec_unpackh(__vector signed short __a) { return __builtin_s390_vuphh(__a); } -static inline __ATTRS_o_ai vector bool int -vec_unpackh(vector bool short __a) { - return (vector bool int)__builtin_s390_vuphh((vector signed short)__a); +static inline __ATTRS_o_ai __vector __bool int +vec_unpackh(__vector __bool short __a) { + return (__vector __bool int)__builtin_s390_vuphh((__vector signed short)__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_unpackh(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_unpackh(__vector unsigned short __a) { return __builtin_s390_vuplhh(__a); } -static inline __ATTRS_o_ai vector signed long long -vec_unpackh(vector signed int __a) { +static inline __ATTRS_o_ai __vector signed long long +vec_unpackh(__vector signed int __a) { return __builtin_s390_vuphf(__a); } -static inline __ATTRS_o_ai vector bool long long -vec_unpackh(vector bool int __a) { - return (vector bool long long)__builtin_s390_vuphf((vector signed int)__a); +static inline __ATTRS_o_ai __vector __bool long long +vec_unpackh(__vector __bool int __a) { + return ((__vector __bool long long) + __builtin_s390_vuphf((__vector signed int)__a)); } -static inline __ATTRS_o_ai vector unsigned long long -vec_unpackh(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_unpackh(__vector unsigned int __a) { return __builtin_s390_vuplhf(__a); } /*-- vec_unpackl ------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_unpackl(vector signed char __a) { +static inline __ATTRS_o_ai __vector signed short +vec_unpackl(__vector signed char __a) { return __builtin_s390_vuplb(__a); } -static inline __ATTRS_o_ai vector bool short -vec_unpackl(vector bool char __a) { - return (vector bool short)__builtin_s390_vuplb((vector signed char)__a); +static inline __ATTRS_o_ai __vector __bool short +vec_unpackl(__vector __bool char __a) { + return ((__vector __bool short) + __builtin_s390_vuplb((__vector signed char)__a)); } -static inline __ATTRS_o_ai vector unsigned short -vec_unpackl(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_unpackl(__vector unsigned char __a) { return __builtin_s390_vupllb(__a); } -static inline __ATTRS_o_ai vector signed int -vec_unpackl(vector signed short __a) { +static inline __ATTRS_o_ai __vector signed int +vec_unpackl(__vector signed short __a) { return __builtin_s390_vuplhw(__a); } -static inline __ATTRS_o_ai vector bool int -vec_unpackl(vector bool short __a) { - return (vector bool int)__builtin_s390_vuplhw((vector signed short)__a); +static inline __ATTRS_o_ai __vector __bool int +vec_unpackl(__vector __bool short __a) { + return ((__vector __bool int) + __builtin_s390_vuplhw((__vector signed short)__a)); } -static inline __ATTRS_o_ai vector unsigned int -vec_unpackl(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_unpackl(__vector unsigned short __a) { return __builtin_s390_vupllh(__a); } -static inline __ATTRS_o_ai vector signed long long -vec_unpackl(vector signed int __a) { +static inline __ATTRS_o_ai __vector signed long long +vec_unpackl(__vector signed int __a) { return __builtin_s390_vuplf(__a); } -static inline __ATTRS_o_ai vector bool long long -vec_unpackl(vector bool int __a) { - return (vector bool long long)__builtin_s390_vuplf((vector signed int)__a); +static inline __ATTRS_o_ai __vector __bool long long +vec_unpackl(__vector __bool int __a) { + return ((__vector __bool long long) + __builtin_s390_vuplf((__vector signed int)__a)); } -static inline __ATTRS_o_ai vector unsigned long long -vec_unpackl(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_unpackl(__vector unsigned int __a) { return __builtin_s390_vupllf(__a); } /*-- vec_cmpeq --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmpeq(vector bool char __a, vector bool char __b) { - return (vector bool char)(__a == __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpeq(__vector __bool char __a, __vector __bool char __b) { + return (__vector __bool char)(__a == __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmpeq(vector signed char __a, vector signed char __b) { - return (vector bool char)(__a == __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpeq(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char)(__a == __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmpeq(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)(__a == __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpeq(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)(__a == __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpeq(vector bool short __a, vector bool short __b) { - return (vector bool short)(__a == __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpeq(__vector __bool short __a, __vector __bool short __b) { + return (__vector __bool short)(__a == __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpeq(vector signed short __a, vector signed short __b) { - return (vector bool short)(__a == __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpeq(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short)(__a == __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpeq(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)(__a == __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpeq(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)(__a == __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpeq(vector bool int __a, vector bool int __b) { - return (vector bool int)(__a == __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpeq(__vector __bool int __a, __vector __bool int __b) { + return (__vector __bool int)(__a == __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpeq(vector signed int __a, vector signed int __b) { - return (vector bool int)(__a == __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpeq(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int)(__a == __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpeq(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)(__a == __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpeq(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)(__a == __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpeq(vector bool long long __a, vector bool long long __b) { - return (vector bool long long)(__a == __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpeq(__vector __bool long long __a, __vector __bool long long __b) { + return (__vector __bool long long)(__a == __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpeq(vector signed long long __a, vector signed long long __b) { - return (vector bool long long)(__a == __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpeq(__vector signed long long __a, __vector signed long long __b) { + return (__vector __bool long long)(__a == __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) { - return (vector bool long long)(__a == __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpeq(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector __bool long long)(__a == __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool int -vec_cmpeq(vector float __a, vector float __b) { - return (vector bool int)(__a == __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpeq(__vector float __a, __vector float __b) { + return (__vector __bool int)(__a == __b); } #endif -static inline __ATTRS_o_ai vector bool long long -vec_cmpeq(vector double __a, vector double __b) { - return (vector bool long long)(__a == __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpeq(__vector double __a, __vector double __b) { + return (__vector __bool long long)(__a == __b); } /*-- vec_cmpge --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmpge(vector signed char __a, vector signed char __b) { - return (vector bool char)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpge(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char)(__a >= __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmpge(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpge(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)(__a >= __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpge(vector signed short __a, vector signed short __b) { - return (vector bool short)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpge(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short)(__a >= __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpge(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpge(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)(__a >= __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpge(vector signed int __a, vector signed int __b) { - return (vector bool int)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpge(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int)(__a >= __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpge(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpge(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)(__a >= __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpge(vector signed long long __a, vector signed long long __b) { - return (vector bool long long)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpge(__vector signed long long __a, __vector signed long long __b) { + return (__vector __bool long long)(__a >= __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) { - return (vector bool long long)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpge(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector __bool long long)(__a >= __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool int -vec_cmpge(vector float __a, vector float __b) { - return (vector bool int)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpge(__vector float __a, __vector float __b) { + return (__vector __bool int)(__a >= __b); } #endif -static inline __ATTRS_o_ai vector bool long long -vec_cmpge(vector double __a, vector double __b) { - return (vector bool long long)(__a >= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpge(__vector double __a, __vector double __b) { + return (__vector __bool long long)(__a >= __b); } /*-- vec_cmpgt --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmpgt(vector signed char __a, vector signed char __b) { - return (vector bool char)(__a > __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpgt(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char)(__a > __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmpgt(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)(__a > __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpgt(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)(__a > __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpgt(vector signed short __a, vector signed short __b) { - return (vector bool short)(__a > __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpgt(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short)(__a > __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmpgt(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)(__a > __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpgt(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)(__a > __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpgt(vector signed int __a, vector signed int __b) { - return (vector bool int)(__a > __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpgt(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int)(__a > __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmpgt(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)(__a > __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpgt(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)(__a > __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpgt(vector signed long long __a, vector signed long long __b) { - return (vector bool long long)(__a > __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpgt(__vector signed long long __a, __vector signed long long __b) { + return (__vector __bool long long)(__a > __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) { - return (vector bool long long)(__a > __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpgt(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector __bool long long)(__a > __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool int -vec_cmpgt(vector float __a, vector float __b) { - return (vector bool int)(__a > __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpgt(__vector float __a, __vector float __b) { + return (__vector __bool int)(__a > __b); } #endif -static inline __ATTRS_o_ai vector bool long long -vec_cmpgt(vector double __a, vector double __b) { - return (vector bool long long)(__a > __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmpgt(__vector double __a, __vector double __b) { + return (__vector __bool long long)(__a > __b); } /*-- vec_cmple --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmple(vector signed char __a, vector signed char __b) { - return (vector bool char)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmple(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char)(__a <= __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmple(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmple(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)(__a <= __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmple(vector signed short __a, vector signed short __b) { - return (vector bool short)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmple(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short)(__a <= __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmple(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmple(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)(__a <= __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmple(vector signed int __a, vector signed int __b) { - return (vector bool int)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmple(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int)(__a <= __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmple(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmple(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)(__a <= __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmple(vector signed long long __a, vector signed long long __b) { - return (vector bool long long)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmple(__vector signed long long __a, __vector signed long long __b) { + return (__vector __bool long long)(__a <= __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmple(vector unsigned long long __a, vector unsigned long long __b) { - return (vector bool long long)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmple(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector __bool long long)(__a <= __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool int -vec_cmple(vector float __a, vector float __b) { - return (vector bool int)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmple(__vector float __a, __vector float __b) { + return (__vector __bool int)(__a <= __b); } #endif -static inline __ATTRS_o_ai vector bool long long -vec_cmple(vector double __a, vector double __b) { - return (vector bool long long)(__a <= __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmple(__vector double __a, __vector double __b) { + return (__vector __bool long long)(__a <= __b); } /*-- vec_cmplt --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmplt(vector signed char __a, vector signed char __b) { - return (vector bool char)(__a < __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmplt(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char)(__a < __b); } -static inline __ATTRS_o_ai vector bool char -vec_cmplt(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)(__a < __b); +static inline __ATTRS_o_ai __vector __bool char +vec_cmplt(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)(__a < __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmplt(vector signed short __a, vector signed short __b) { - return (vector bool short)(__a < __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmplt(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short)(__a < __b); } -static inline __ATTRS_o_ai vector bool short -vec_cmplt(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)(__a < __b); +static inline __ATTRS_o_ai __vector __bool short +vec_cmplt(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)(__a < __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmplt(vector signed int __a, vector signed int __b) { - return (vector bool int)(__a < __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmplt(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int)(__a < __b); } -static inline __ATTRS_o_ai vector bool int -vec_cmplt(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)(__a < __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmplt(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)(__a < __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmplt(vector signed long long __a, vector signed long long __b) { - return (vector bool long long)(__a < __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmplt(__vector signed long long __a, __vector signed long long __b) { + return (__vector __bool long long)(__a < __b); } -static inline __ATTRS_o_ai vector bool long long -vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) { - return (vector bool long long)(__a < __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmplt(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector __bool long long)(__a < __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool int -vec_cmplt(vector float __a, vector float __b) { - return (vector bool int)(__a < __b); +static inline __ATTRS_o_ai __vector __bool int +vec_cmplt(__vector float __a, __vector float __b) { + return (__vector __bool int)(__a < __b); } #endif -static inline __ATTRS_o_ai vector bool long long -vec_cmplt(vector double __a, vector double __b) { - return (vector bool long long)(__a < __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_cmplt(__vector double __a, __vector double __b) { + return (__vector __bool long long)(__a < __b); } /*-- vec_all_eq -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_eq(vector signed char __a, vector signed char __b) { +vec_all_eq(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vceqbs(__a, __b, &__cc); return __cc == 0; @@ -2533,56 +2601,56 @@ vec_all_eq(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector signed char __a, vector bool char __b) { +vec_all_eq(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool char __a, vector signed char __b) { +vec_all_eq(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned char __a, vector unsigned char __b) { +vec_all_eq(__vector unsigned char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned char __a, vector bool char __b) { +vec_all_eq(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool char __a, vector unsigned char __b) { +vec_all_eq(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector bool char __a, vector bool char __b) { +vec_all_eq(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector signed short __a, vector signed short __b) { +vec_all_eq(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vceqhs(__a, __b, &__cc); return __cc == 0; @@ -2590,56 +2658,56 @@ vec_all_eq(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector signed short __a, vector bool short __b) { +vec_all_eq(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool short __a, vector signed short __b) { +vec_all_eq(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned short __a, vector unsigned short __b) { +vec_all_eq(__vector unsigned short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned short __a, vector bool short __b) { +vec_all_eq(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool short __a, vector unsigned short __b) { +vec_all_eq(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector bool short __a, vector bool short __b) { +vec_all_eq(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector signed int __a, vector signed int __b) { +vec_all_eq(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vceqfs(__a, __b, &__cc); return __cc == 0; @@ -2647,56 +2715,56 @@ vec_all_eq(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector signed int __a, vector bool int __b) { +vec_all_eq(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool int __a, vector signed int __b) { +vec_all_eq(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned int __a, vector unsigned int __b) { +vec_all_eq(__vector unsigned int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned int __a, vector bool int __b) { +vec_all_eq(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool int __a, vector unsigned int __b) { +vec_all_eq(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector bool int __a, vector bool int __b) { +vec_all_eq(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector signed long long __a, vector signed long long __b) { +vec_all_eq(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vceqgs(__a, __b, &__cc); return __cc == 0; @@ -2704,57 +2772,57 @@ vec_all_eq(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector signed long long __a, vector bool long long __b) { +vec_all_eq(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool long long __a, vector signed long long __b) { +vec_all_eq(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_eq(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector unsigned long long __a, vector bool long long __b) { +vec_all_eq(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_eq(vector bool long long __a, vector unsigned long long __b) { +vec_all_eq(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_eq(vector bool long long __a, vector bool long long __b) { +vec_all_eq(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_eq(vector float __a, vector float __b) { +vec_all_eq(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfcesbs(__a, __b, &__cc); return __cc == 0; @@ -2762,7 +2830,7 @@ vec_all_eq(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_eq(vector double __a, vector double __b) { +vec_all_eq(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfcedbs(__a, __b, &__cc); return __cc == 0; @@ -2771,7 +2839,7 @@ vec_all_eq(vector double __a, vector double __b) { /*-- vec_all_ne -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_ne(vector signed char __a, vector signed char __b) { +vec_all_ne(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vceqbs(__a, __b, &__cc); return __cc == 3; @@ -2779,56 +2847,56 @@ vec_all_ne(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector signed char __a, vector bool char __b) { +vec_all_ne(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool char __a, vector signed char __b) { +vec_all_ne(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned char __a, vector unsigned char __b) { +vec_all_ne(__vector unsigned char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned char __a, vector bool char __b) { +vec_all_ne(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool char __a, vector unsigned char __b) { +vec_all_ne(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector bool char __a, vector bool char __b) { +vec_all_ne(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector signed short __a, vector signed short __b) { +vec_all_ne(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vceqhs(__a, __b, &__cc); return __cc == 3; @@ -2836,56 +2904,56 @@ vec_all_ne(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector signed short __a, vector bool short __b) { +vec_all_ne(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool short __a, vector signed short __b) { +vec_all_ne(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned short __a, vector unsigned short __b) { +vec_all_ne(__vector unsigned short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned short __a, vector bool short __b) { +vec_all_ne(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool short __a, vector unsigned short __b) { +vec_all_ne(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector bool short __a, vector bool short __b) { +vec_all_ne(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector signed int __a, vector signed int __b) { +vec_all_ne(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vceqfs(__a, __b, &__cc); return __cc == 3; @@ -2893,56 +2961,56 @@ vec_all_ne(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector signed int __a, vector bool int __b) { +vec_all_ne(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool int __a, vector signed int __b) { +vec_all_ne(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned int __a, vector unsigned int __b) { +vec_all_ne(__vector unsigned int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned int __a, vector bool int __b) { +vec_all_ne(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool int __a, vector unsigned int __b) { +vec_all_ne(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector bool int __a, vector bool int __b) { +vec_all_ne(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector signed long long __a, vector signed long long __b) { +vec_all_ne(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vceqgs(__a, __b, &__cc); return __cc == 3; @@ -2950,57 +3018,57 @@ vec_all_ne(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector signed long long __a, vector bool long long __b) { +vec_all_ne(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool long long __a, vector signed long long __b) { +vec_all_ne(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_ne(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector unsigned long long __a, vector bool long long __b) { +vec_all_ne(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ne(vector bool long long __a, vector unsigned long long __b) { +vec_all_ne(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ne(vector bool long long __a, vector bool long long __b) { +vec_all_ne(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc == 3; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_ne(vector float __a, vector float __b) { +vec_all_ne(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfcesbs(__a, __b, &__cc); return __cc == 3; @@ -3008,7 +3076,7 @@ vec_all_ne(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_ne(vector double __a, vector double __b) { +vec_all_ne(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfcedbs(__a, __b, &__cc); return __cc == 3; @@ -3017,7 +3085,7 @@ vec_all_ne(vector double __a, vector double __b) { /*-- vec_all_ge -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_ge(vector signed char __a, vector signed char __b) { +vec_all_ge(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__b, __a, &__cc); return __cc == 3; @@ -3025,22 +3093,22 @@ vec_all_ge(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector signed char __a, vector bool char __b) { +vec_all_ge(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__b, __a, &__cc); + __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool char __a, vector signed char __b) { +vec_all_ge(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc); + __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned char __a, vector unsigned char __b) { +vec_all_ge(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__b, __a, &__cc); return __cc == 3; @@ -3048,31 +3116,31 @@ vec_all_ge(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned char __a, vector bool char __b) { +vec_all_ge(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool char __a, vector unsigned char __b) { +vec_all_ge(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool char __a, vector bool char __b) { +vec_all_ge(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, - (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, + (__vector unsigned char)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector signed short __a, vector signed short __b) { +vec_all_ge(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__b, __a, &__cc); return __cc == 3; @@ -3080,22 +3148,22 @@ vec_all_ge(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector signed short __a, vector bool short __b) { +vec_all_ge(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__b, __a, &__cc); + __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool short __a, vector signed short __b) { +vec_all_ge(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc); + __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned short __a, vector unsigned short __b) { +vec_all_ge(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__b, __a, &__cc); return __cc == 3; @@ -3103,31 +3171,31 @@ vec_all_ge(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned short __a, vector bool short __b) { +vec_all_ge(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool short __a, vector unsigned short __b) { +vec_all_ge(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool short __a, vector bool short __b) { +vec_all_ge(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, - (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, + (__vector unsigned short)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector signed int __a, vector signed int __b) { +vec_all_ge(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__b, __a, &__cc); return __cc == 3; @@ -3135,22 +3203,22 @@ vec_all_ge(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector signed int __a, vector bool int __b) { +vec_all_ge(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__b, __a, &__cc); + __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool int __a, vector signed int __b) { +vec_all_ge(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc); + __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned int __a, vector unsigned int __b) { +vec_all_ge(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__b, __a, &__cc); return __cc == 3; @@ -3158,31 +3226,31 @@ vec_all_ge(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned int __a, vector bool int __b) { +vec_all_ge(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool int __a, vector unsigned int __b) { +vec_all_ge(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool int __a, vector bool int __b) { +vec_all_ge(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, - (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, + (__vector unsigned int)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector signed long long __a, vector signed long long __b) { +vec_all_ge(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__b, __a, &__cc); return __cc == 3; @@ -3190,22 +3258,22 @@ vec_all_ge(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector signed long long __a, vector bool long long __b) { +vec_all_ge(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc); + __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool long long __a, vector signed long long __b) { +vec_all_ge(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc); + __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_ge(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__b, __a, &__cc); return __cc == 3; @@ -3213,32 +3281,32 @@ vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector unsigned long long __a, vector bool long long __b) { +vec_all_ge(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool long long __a, vector unsigned long long __b) { +vec_all_ge(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_ge(vector bool long long __a, vector bool long long __b) { +vec_all_ge(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, - (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, + (__vector unsigned long long)__a, &__cc); return __cc == 3; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_ge(vector float __a, vector float __b) { +vec_all_ge(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__a, __b, &__cc); return __cc == 0; @@ -3246,7 +3314,7 @@ vec_all_ge(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_ge(vector double __a, vector double __b) { +vec_all_ge(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__a, __b, &__cc); return __cc == 0; @@ -3255,7 +3323,7 @@ vec_all_ge(vector double __a, vector double __b) { /*-- vec_all_gt -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_gt(vector signed char __a, vector signed char __b) { +vec_all_gt(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__a, __b, &__cc); return __cc == 0; @@ -3263,22 +3331,22 @@ vec_all_gt(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector signed char __a, vector bool char __b) { +vec_all_gt(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool char __a, vector signed char __b) { +vec_all_gt(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned char __a, vector unsigned char __b) { +vec_all_gt(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__a, __b, &__cc); return __cc == 0; @@ -3286,31 +3354,31 @@ vec_all_gt(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned char __a, vector bool char __b) { +vec_all_gt(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool char __a, vector unsigned char __b) { +vec_all_gt(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool char __a, vector bool char __b) { +vec_all_gt(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, - (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, + (__vector unsigned char)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector signed short __a, vector signed short __b) { +vec_all_gt(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__a, __b, &__cc); return __cc == 0; @@ -3318,22 +3386,22 @@ vec_all_gt(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector signed short __a, vector bool short __b) { +vec_all_gt(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool short __a, vector signed short __b) { +vec_all_gt(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned short __a, vector unsigned short __b) { +vec_all_gt(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__a, __b, &__cc); return __cc == 0; @@ -3341,31 +3409,31 @@ vec_all_gt(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned short __a, vector bool short __b) { +vec_all_gt(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool short __a, vector unsigned short __b) { +vec_all_gt(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool short __a, vector bool short __b) { +vec_all_gt(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, - (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, + (__vector unsigned short)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector signed int __a, vector signed int __b) { +vec_all_gt(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__a, __b, &__cc); return __cc == 0; @@ -3373,22 +3441,22 @@ vec_all_gt(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector signed int __a, vector bool int __b) { +vec_all_gt(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool int __a, vector signed int __b) { +vec_all_gt(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned int __a, vector unsigned int __b) { +vec_all_gt(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__a, __b, &__cc); return __cc == 0; @@ -3396,31 +3464,31 @@ vec_all_gt(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned int __a, vector bool int __b) { +vec_all_gt(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool int __a, vector unsigned int __b) { +vec_all_gt(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool int __a, vector bool int __b) { +vec_all_gt(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, - (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, + (__vector unsigned int)__b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector signed long long __a, vector signed long long __b) { +vec_all_gt(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__a, __b, &__cc); return __cc == 0; @@ -3428,22 +3496,22 @@ vec_all_gt(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector signed long long __a, vector bool long long __b) { +vec_all_gt(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool long long __a, vector signed long long __b) { +vec_all_gt(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_gt(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__a, __b, &__cc); return __cc == 0; @@ -3451,32 +3519,32 @@ vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector unsigned long long __a, vector bool long long __b) { +vec_all_gt(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool long long __a, vector unsigned long long __b) { +vec_all_gt(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_gt(vector bool long long __a, vector bool long long __b) { +vec_all_gt(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, - (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, + (__vector unsigned long long)__b, &__cc); return __cc == 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_gt(vector float __a, vector float __b) { +vec_all_gt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__a, __b, &__cc); return __cc == 0; @@ -3484,7 +3552,7 @@ vec_all_gt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_gt(vector double __a, vector double __b) { +vec_all_gt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__a, __b, &__cc); return __cc == 0; @@ -3493,7 +3561,7 @@ vec_all_gt(vector double __a, vector double __b) { /*-- vec_all_le -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_le(vector signed char __a, vector signed char __b) { +vec_all_le(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__a, __b, &__cc); return __cc == 3; @@ -3501,22 +3569,22 @@ vec_all_le(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector signed char __a, vector bool char __b) { +vec_all_le(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool char __a, vector signed char __b) { +vec_all_le(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector unsigned char __a, vector unsigned char __b) { +vec_all_le(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__a, __b, &__cc); return __cc == 3; @@ -3524,31 +3592,31 @@ vec_all_le(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector unsigned char __a, vector bool char __b) { +vec_all_le(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool char __a, vector unsigned char __b) { +vec_all_le(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool char __a, vector bool char __b) { +vec_all_le(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, - (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, + (__vector unsigned char)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector signed short __a, vector signed short __b) { +vec_all_le(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__a, __b, &__cc); return __cc == 3; @@ -3556,22 +3624,22 @@ vec_all_le(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector signed short __a, vector bool short __b) { +vec_all_le(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool short __a, vector signed short __b) { +vec_all_le(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector unsigned short __a, vector unsigned short __b) { +vec_all_le(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__a, __b, &__cc); return __cc == 3; @@ -3579,31 +3647,31 @@ vec_all_le(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector unsigned short __a, vector bool short __b) { +vec_all_le(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool short __a, vector unsigned short __b) { +vec_all_le(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool short __a, vector bool short __b) { +vec_all_le(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, - (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, + (__vector unsigned short)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector signed int __a, vector signed int __b) { +vec_all_le(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__a, __b, &__cc); return __cc == 3; @@ -3611,22 +3679,22 @@ vec_all_le(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector signed int __a, vector bool int __b) { +vec_all_le(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool int __a, vector signed int __b) { +vec_all_le(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector unsigned int __a, vector unsigned int __b) { +vec_all_le(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__a, __b, &__cc); return __cc == 3; @@ -3634,31 +3702,31 @@ vec_all_le(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector unsigned int __a, vector bool int __b) { +vec_all_le(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool int __a, vector unsigned int __b) { +vec_all_le(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool int __a, vector bool int __b) { +vec_all_le(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, - (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, + (__vector unsigned int)__b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector signed long long __a, vector signed long long __b) { +vec_all_le(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__a, __b, &__cc); return __cc == 3; @@ -3666,22 +3734,22 @@ vec_all_le(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector signed long long __a, vector bool long long __b) { +vec_all_le(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool long long __a, vector signed long long __b) { +vec_all_le(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc); return __cc == 3; } static inline __ATTRS_o_ai int -vec_all_le(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_le(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__a, __b, &__cc); return __cc == 3; @@ -3689,32 +3757,32 @@ vec_all_le(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector unsigned long long __a, vector bool long long __b) { +vec_all_le(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool long long __a, vector unsigned long long __b) { +vec_all_le(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc); return __cc == 3; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_le(vector bool long long __a, vector bool long long __b) { +vec_all_le(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, - (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, + (__vector unsigned long long)__b, &__cc); return __cc == 3; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_le(vector float __a, vector float __b) { +vec_all_le(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__b, __a, &__cc); return __cc == 0; @@ -3722,7 +3790,7 @@ vec_all_le(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_le(vector double __a, vector double __b) { +vec_all_le(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__b, __a, &__cc); return __cc == 0; @@ -3731,7 +3799,7 @@ vec_all_le(vector double __a, vector double __b) { /*-- vec_all_lt -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_all_lt(vector signed char __a, vector signed char __b) { +vec_all_lt(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__b, __a, &__cc); return __cc == 0; @@ -3739,22 +3807,22 @@ vec_all_lt(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector signed char __a, vector bool char __b) { +vec_all_lt(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__b, __a, &__cc); + __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool char __a, vector signed char __b) { +vec_all_lt(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc); + __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned char __a, vector unsigned char __b) { +vec_all_lt(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__b, __a, &__cc); return __cc == 0; @@ -3762,31 +3830,31 @@ vec_all_lt(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned char __a, vector bool char __b) { +vec_all_lt(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool char __a, vector unsigned char __b) { +vec_all_lt(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool char __a, vector bool char __b) { +vec_all_lt(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, - (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, + (__vector unsigned char)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector signed short __a, vector signed short __b) { +vec_all_lt(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__b, __a, &__cc); return __cc == 0; @@ -3794,22 +3862,22 @@ vec_all_lt(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector signed short __a, vector bool short __b) { +vec_all_lt(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__b, __a, &__cc); + __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool short __a, vector signed short __b) { +vec_all_lt(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc); + __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned short __a, vector unsigned short __b) { +vec_all_lt(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__b, __a, &__cc); return __cc == 0; @@ -3817,31 +3885,31 @@ vec_all_lt(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned short __a, vector bool short __b) { +vec_all_lt(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool short __a, vector unsigned short __b) { +vec_all_lt(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool short __a, vector bool short __b) { +vec_all_lt(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, - (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, + (__vector unsigned short)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector signed int __a, vector signed int __b) { +vec_all_lt(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__b, __a, &__cc); return __cc == 0; @@ -3849,22 +3917,22 @@ vec_all_lt(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector signed int __a, vector bool int __b) { +vec_all_lt(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__b, __a, &__cc); + __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool int __a, vector signed int __b) { +vec_all_lt(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc); + __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned int __a, vector unsigned int __b) { +vec_all_lt(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__b, __a, &__cc); return __cc == 0; @@ -3872,31 +3940,31 @@ vec_all_lt(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned int __a, vector bool int __b) { +vec_all_lt(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool int __a, vector unsigned int __b) { +vec_all_lt(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool int __a, vector bool int __b) { +vec_all_lt(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, - (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, + (__vector unsigned int)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector signed long long __a, vector signed long long __b) { +vec_all_lt(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__b, __a, &__cc); return __cc == 0; @@ -3904,22 +3972,22 @@ vec_all_lt(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector signed long long __a, vector bool long long __b) { +vec_all_lt(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc); + __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool long long __a, vector signed long long __b) { +vec_all_lt(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc); + __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc); return __cc == 0; } static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) { +vec_all_lt(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__b, __a, &__cc); return __cc == 0; @@ -3927,32 +3995,32 @@ vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector unsigned long long __a, vector bool long long __b) { +vec_all_lt(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool long long __a, vector unsigned long long __b) { +vec_all_lt(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc); return __cc == 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_all_lt(vector bool long long __a, vector bool long long __b) { +vec_all_lt(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, - (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, + (__vector unsigned long long)__a, &__cc); return __cc == 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_lt(vector float __a, vector float __b) { +vec_all_lt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__b, __a, &__cc); return __cc == 0; @@ -3960,7 +4028,7 @@ vec_all_lt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_lt(vector double __a, vector double __b) { +vec_all_lt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__b, __a, &__cc); return __cc == 0; @@ -3970,7 +4038,7 @@ vec_all_lt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_nge(vector float __a, vector float __b) { +vec_all_nge(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__a, __b, &__cc); return __cc == 3; @@ -3978,7 +4046,7 @@ vec_all_nge(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_nge(vector double __a, vector double __b) { +vec_all_nge(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__a, __b, &__cc); return __cc == 3; @@ -3988,7 +4056,7 @@ vec_all_nge(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_ngt(vector float __a, vector float __b) { +vec_all_ngt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__a, __b, &__cc); return __cc == 3; @@ -3996,7 +4064,7 @@ vec_all_ngt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_ngt(vector double __a, vector double __b) { +vec_all_ngt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__a, __b, &__cc); return __cc == 3; @@ -4006,7 +4074,7 @@ vec_all_ngt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_nle(vector float __a, vector float __b) { +vec_all_nle(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__b, __a, &__cc); return __cc == 3; @@ -4014,7 +4082,7 @@ vec_all_nle(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_nle(vector double __a, vector double __b) { +vec_all_nle(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__b, __a, &__cc); return __cc == 3; @@ -4024,7 +4092,7 @@ vec_all_nle(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_nlt(vector float __a, vector float __b) { +vec_all_nlt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__b, __a, &__cc); return __cc == 3; @@ -4032,7 +4100,7 @@ vec_all_nlt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_all_nlt(vector double __a, vector double __b) { +vec_all_nlt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__b, __a, &__cc); return __cc == 3; @@ -4042,7 +4110,7 @@ vec_all_nlt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_nan(vector float __a) { +vec_all_nan(__vector float __a) { int __cc; __builtin_s390_vftcisb(__a, 15, &__cc); return __cc == 0; @@ -4050,7 +4118,7 @@ vec_all_nan(vector float __a) { #endif static inline __ATTRS_o_ai int -vec_all_nan(vector double __a) { +vec_all_nan(__vector double __a) { int __cc; __builtin_s390_vftcidb(__a, 15, &__cc); return __cc == 0; @@ -4060,7 +4128,7 @@ vec_all_nan(vector double __a) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_all_numeric(vector float __a) { +vec_all_numeric(__vector float __a) { int __cc; __builtin_s390_vftcisb(__a, 15, &__cc); return __cc == 3; @@ -4068,7 +4136,7 @@ vec_all_numeric(vector float __a) { #endif static inline __ATTRS_o_ai int -vec_all_numeric(vector double __a) { +vec_all_numeric(__vector double __a) { int __cc; __builtin_s390_vftcidb(__a, 15, &__cc); return __cc == 3; @@ -4077,7 +4145,7 @@ vec_all_numeric(vector double __a) { /*-- vec_any_eq -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_eq(vector signed char __a, vector signed char __b) { +vec_any_eq(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vceqbs(__a, __b, &__cc); return __cc <= 1; @@ -4085,56 +4153,56 @@ vec_any_eq(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector signed char __a, vector bool char __b) { +vec_any_eq(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool char __a, vector signed char __b) { +vec_any_eq(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned char __a, vector unsigned char __b) { +vec_any_eq(__vector unsigned char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned char __a, vector bool char __b) { +vec_any_eq(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool char __a, vector unsigned char __b) { +vec_any_eq(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector bool char __a, vector bool char __b) { +vec_any_eq(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector signed short __a, vector signed short __b) { +vec_any_eq(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vceqhs(__a, __b, &__cc); return __cc <= 1; @@ -4142,56 +4210,56 @@ vec_any_eq(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector signed short __a, vector bool short __b) { +vec_any_eq(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool short __a, vector signed short __b) { +vec_any_eq(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned short __a, vector unsigned short __b) { +vec_any_eq(__vector unsigned short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned short __a, vector bool short __b) { +vec_any_eq(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool short __a, vector unsigned short __b) { +vec_any_eq(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector bool short __a, vector bool short __b) { +vec_any_eq(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector signed int __a, vector signed int __b) { +vec_any_eq(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vceqfs(__a, __b, &__cc); return __cc <= 1; @@ -4199,56 +4267,56 @@ vec_any_eq(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector signed int __a, vector bool int __b) { +vec_any_eq(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool int __a, vector signed int __b) { +vec_any_eq(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned int __a, vector unsigned int __b) { +vec_any_eq(__vector unsigned int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned int __a, vector bool int __b) { +vec_any_eq(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool int __a, vector unsigned int __b) { +vec_any_eq(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector bool int __a, vector bool int __b) { +vec_any_eq(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector signed long long __a, vector signed long long __b) { +vec_any_eq(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vceqgs(__a, __b, &__cc); return __cc <= 1; @@ -4256,57 +4324,57 @@ vec_any_eq(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector signed long long __a, vector bool long long __b) { +vec_any_eq(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool long long __a, vector signed long long __b) { +vec_any_eq(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_eq(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector unsigned long long __a, vector bool long long __b) { +vec_any_eq(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_eq(vector bool long long __a, vector unsigned long long __b) { +vec_any_eq(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_eq(vector bool long long __a, vector bool long long __b) { +vec_any_eq(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc <= 1; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_eq(vector float __a, vector float __b) { +vec_any_eq(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfcesbs(__a, __b, &__cc); return __cc <= 1; @@ -4314,7 +4382,7 @@ vec_any_eq(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_eq(vector double __a, vector double __b) { +vec_any_eq(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfcedbs(__a, __b, &__cc); return __cc <= 1; @@ -4323,7 +4391,7 @@ vec_any_eq(vector double __a, vector double __b) { /*-- vec_any_ne -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_ne(vector signed char __a, vector signed char __b) { +vec_any_ne(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vceqbs(__a, __b, &__cc); return __cc != 0; @@ -4331,56 +4399,56 @@ vec_any_ne(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector signed char __a, vector bool char __b) { +vec_any_ne(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vceqbs(__a, (__vector signed char)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool char __a, vector signed char __b) { +vec_any_ne(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned char __a, vector unsigned char __b) { +vec_any_ne(__vector unsigned char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned char __a, vector bool char __b) { +vec_any_ne(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool char __a, vector unsigned char __b) { +vec_any_ne(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector bool char __a, vector bool char __b) { +vec_any_ne(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vceqbs((vector signed char)__a, - (vector signed char)__b, &__cc); + __builtin_s390_vceqbs((__vector signed char)__a, + (__vector signed char)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector signed short __a, vector signed short __b) { +vec_any_ne(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vceqhs(__a, __b, &__cc); return __cc != 0; @@ -4388,56 +4456,56 @@ vec_any_ne(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector signed short __a, vector bool short __b) { +vec_any_ne(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vceqhs(__a, (__vector signed short)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool short __a, vector signed short __b) { +vec_any_ne(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned short __a, vector unsigned short __b) { +vec_any_ne(__vector unsigned short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned short __a, vector bool short __b) { +vec_any_ne(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool short __a, vector unsigned short __b) { +vec_any_ne(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector bool short __a, vector bool short __b) { +vec_any_ne(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vceqhs((vector signed short)__a, - (vector signed short)__b, &__cc); + __builtin_s390_vceqhs((__vector signed short)__a, + (__vector signed short)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector signed int __a, vector signed int __b) { +vec_any_ne(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vceqfs(__a, __b, &__cc); return __cc != 0; @@ -4445,56 +4513,56 @@ vec_any_ne(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector signed int __a, vector bool int __b) { +vec_any_ne(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vceqfs(__a, (__vector signed int)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool int __a, vector signed int __b) { +vec_any_ne(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned int __a, vector unsigned int __b) { +vec_any_ne(__vector unsigned int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned int __a, vector bool int __b) { +vec_any_ne(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool int __a, vector unsigned int __b) { +vec_any_ne(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector bool int __a, vector bool int __b) { +vec_any_ne(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vceqfs((vector signed int)__a, - (vector signed int)__b, &__cc); + __builtin_s390_vceqfs((__vector signed int)__a, + (__vector signed int)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector signed long long __a, vector signed long long __b) { +vec_any_ne(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vceqgs(__a, __b, &__cc); return __cc != 0; @@ -4502,57 +4570,57 @@ vec_any_ne(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector signed long long __a, vector bool long long __b) { +vec_any_ne(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs(__a, (__vector signed long long)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool long long __a, vector signed long long __b) { +vec_any_ne(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_ne(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector unsigned long long __a, vector bool long long __b) { +vec_any_ne(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ne(vector bool long long __a, vector unsigned long long __b) { +vec_any_ne(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ne(vector bool long long __a, vector bool long long __b) { +vec_any_ne(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vceqgs((vector signed long long)__a, - (vector signed long long)__b, &__cc); + __builtin_s390_vceqgs((__vector signed long long)__a, + (__vector signed long long)__b, &__cc); return __cc != 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_ne(vector float __a, vector float __b) { +vec_any_ne(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfcesbs(__a, __b, &__cc); return __cc != 0; @@ -4560,7 +4628,7 @@ vec_any_ne(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_ne(vector double __a, vector double __b) { +vec_any_ne(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfcedbs(__a, __b, &__cc); return __cc != 0; @@ -4569,7 +4637,7 @@ vec_any_ne(vector double __a, vector double __b) { /*-- vec_any_ge -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_ge(vector signed char __a, vector signed char __b) { +vec_any_ge(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__b, __a, &__cc); return __cc != 0; @@ -4577,22 +4645,22 @@ vec_any_ge(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector signed char __a, vector bool char __b) { +vec_any_ge(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__b, __a, &__cc); + __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool char __a, vector signed char __b) { +vec_any_ge(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc); + __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned char __a, vector unsigned char __b) { +vec_any_ge(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__b, __a, &__cc); return __cc != 0; @@ -4600,31 +4668,31 @@ vec_any_ge(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned char __a, vector bool char __b) { +vec_any_ge(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool char __a, vector unsigned char __b) { +vec_any_ge(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool char __a, vector bool char __b) { +vec_any_ge(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, - (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, + (__vector unsigned char)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector signed short __a, vector signed short __b) { +vec_any_ge(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__b, __a, &__cc); return __cc != 0; @@ -4632,22 +4700,22 @@ vec_any_ge(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector signed short __a, vector bool short __b) { +vec_any_ge(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__b, __a, &__cc); + __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool short __a, vector signed short __b) { +vec_any_ge(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc); + __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned short __a, vector unsigned short __b) { +vec_any_ge(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__b, __a, &__cc); return __cc != 0; @@ -4655,31 +4723,31 @@ vec_any_ge(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned short __a, vector bool short __b) { +vec_any_ge(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool short __a, vector unsigned short __b) { +vec_any_ge(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool short __a, vector bool short __b) { +vec_any_ge(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, - (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, + (__vector unsigned short)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector signed int __a, vector signed int __b) { +vec_any_ge(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__b, __a, &__cc); return __cc != 0; @@ -4687,22 +4755,22 @@ vec_any_ge(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector signed int __a, vector bool int __b) { +vec_any_ge(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__b, __a, &__cc); + __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool int __a, vector signed int __b) { +vec_any_ge(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc); + __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned int __a, vector unsigned int __b) { +vec_any_ge(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__b, __a, &__cc); return __cc != 0; @@ -4710,31 +4778,31 @@ vec_any_ge(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned int __a, vector bool int __b) { +vec_any_ge(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool int __a, vector unsigned int __b) { +vec_any_ge(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool int __a, vector bool int __b) { +vec_any_ge(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, - (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, + (__vector unsigned int)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector signed long long __a, vector signed long long __b) { +vec_any_ge(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__b, __a, &__cc); return __cc != 0; @@ -4742,22 +4810,22 @@ vec_any_ge(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector signed long long __a, vector bool long long __b) { +vec_any_ge(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc); + __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool long long __a, vector signed long long __b) { +vec_any_ge(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc); + __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_ge(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__b, __a, &__cc); return __cc != 0; @@ -4765,32 +4833,32 @@ vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector unsigned long long __a, vector bool long long __b) { +vec_any_ge(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool long long __a, vector unsigned long long __b) { +vec_any_ge(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_ge(vector bool long long __a, vector bool long long __b) { +vec_any_ge(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, - (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, + (__vector unsigned long long)__a, &__cc); return __cc != 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_ge(vector float __a, vector float __b) { +vec_any_ge(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__a, __b, &__cc); return __cc <= 1; @@ -4798,7 +4866,7 @@ vec_any_ge(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_ge(vector double __a, vector double __b) { +vec_any_ge(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__a, __b, &__cc); return __cc <= 1; @@ -4807,7 +4875,7 @@ vec_any_ge(vector double __a, vector double __b) { /*-- vec_any_gt -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_gt(vector signed char __a, vector signed char __b) { +vec_any_gt(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__a, __b, &__cc); return __cc <= 1; @@ -4815,22 +4883,22 @@ vec_any_gt(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector signed char __a, vector bool char __b) { +vec_any_gt(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool char __a, vector signed char __b) { +vec_any_gt(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned char __a, vector unsigned char __b) { +vec_any_gt(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__a, __b, &__cc); return __cc <= 1; @@ -4838,31 +4906,31 @@ vec_any_gt(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned char __a, vector bool char __b) { +vec_any_gt(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool char __a, vector unsigned char __b) { +vec_any_gt(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool char __a, vector bool char __b) { +vec_any_gt(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, - (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, + (__vector unsigned char)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector signed short __a, vector signed short __b) { +vec_any_gt(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__a, __b, &__cc); return __cc <= 1; @@ -4870,22 +4938,22 @@ vec_any_gt(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector signed short __a, vector bool short __b) { +vec_any_gt(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool short __a, vector signed short __b) { +vec_any_gt(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned short __a, vector unsigned short __b) { +vec_any_gt(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__a, __b, &__cc); return __cc <= 1; @@ -4893,31 +4961,31 @@ vec_any_gt(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned short __a, vector bool short __b) { +vec_any_gt(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool short __a, vector unsigned short __b) { +vec_any_gt(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool short __a, vector bool short __b) { +vec_any_gt(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, - (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, + (__vector unsigned short)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector signed int __a, vector signed int __b) { +vec_any_gt(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__a, __b, &__cc); return __cc <= 1; @@ -4925,22 +4993,22 @@ vec_any_gt(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector signed int __a, vector bool int __b) { +vec_any_gt(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool int __a, vector signed int __b) { +vec_any_gt(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned int __a, vector unsigned int __b) { +vec_any_gt(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__a, __b, &__cc); return __cc <= 1; @@ -4948,31 +5016,31 @@ vec_any_gt(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned int __a, vector bool int __b) { +vec_any_gt(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool int __a, vector unsigned int __b) { +vec_any_gt(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool int __a, vector bool int __b) { +vec_any_gt(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, - (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, + (__vector unsigned int)__b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector signed long long __a, vector signed long long __b) { +vec_any_gt(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__a, __b, &__cc); return __cc <= 1; @@ -4980,22 +5048,22 @@ vec_any_gt(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector signed long long __a, vector bool long long __b) { +vec_any_gt(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool long long __a, vector signed long long __b) { +vec_any_gt(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_gt(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__a, __b, &__cc); return __cc <= 1; @@ -5003,32 +5071,32 @@ vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector unsigned long long __a, vector bool long long __b) { +vec_any_gt(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool long long __a, vector unsigned long long __b) { +vec_any_gt(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_gt(vector bool long long __a, vector bool long long __b) { +vec_any_gt(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, - (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, + (__vector unsigned long long)__b, &__cc); return __cc <= 1; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_gt(vector float __a, vector float __b) { +vec_any_gt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__a, __b, &__cc); return __cc <= 1; @@ -5036,7 +5104,7 @@ vec_any_gt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_gt(vector double __a, vector double __b) { +vec_any_gt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__a, __b, &__cc); return __cc <= 1; @@ -5045,7 +5113,7 @@ vec_any_gt(vector double __a, vector double __b) { /*-- vec_any_le -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_le(vector signed char __a, vector signed char __b) { +vec_any_le(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__a, __b, &__cc); return __cc != 0; @@ -5053,22 +5121,22 @@ vec_any_le(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector signed char __a, vector bool char __b) { +vec_any_le(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs(__a, (vector signed char)__b, &__cc); + __builtin_s390_vchbs(__a, (__vector signed char)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool char __a, vector signed char __b) { +vec_any_le(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__a, __b, &__cc); + __builtin_s390_vchbs((__vector signed char)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector unsigned char __a, vector unsigned char __b) { +vec_any_le(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__a, __b, &__cc); return __cc != 0; @@ -5076,31 +5144,31 @@ vec_any_le(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector unsigned char __a, vector bool char __b) { +vec_any_le(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs(__a, (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs(__a, (__vector unsigned char)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool char __a, vector unsigned char __b) { +vec_any_le(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, __b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, __b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool char __a, vector bool char __b) { +vec_any_le(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__a, - (vector unsigned char)__b, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__a, + (__vector unsigned char)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector signed short __a, vector signed short __b) { +vec_any_le(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__a, __b, &__cc); return __cc != 0; @@ -5108,22 +5176,22 @@ vec_any_le(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector signed short __a, vector bool short __b) { +vec_any_le(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs(__a, (vector signed short)__b, &__cc); + __builtin_s390_vchhs(__a, (__vector signed short)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool short __a, vector signed short __b) { +vec_any_le(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__a, __b, &__cc); + __builtin_s390_vchhs((__vector signed short)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector unsigned short __a, vector unsigned short __b) { +vec_any_le(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__a, __b, &__cc); return __cc != 0; @@ -5131,31 +5199,31 @@ vec_any_le(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector unsigned short __a, vector bool short __b) { +vec_any_le(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs(__a, (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs(__a, (__vector unsigned short)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool short __a, vector unsigned short __b) { +vec_any_le(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, __b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, __b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool short __a, vector bool short __b) { +vec_any_le(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__a, - (vector unsigned short)__b, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__a, + (__vector unsigned short)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector signed int __a, vector signed int __b) { +vec_any_le(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__a, __b, &__cc); return __cc != 0; @@ -5163,22 +5231,22 @@ vec_any_le(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector signed int __a, vector bool int __b) { +vec_any_le(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs(__a, (vector signed int)__b, &__cc); + __builtin_s390_vchfs(__a, (__vector signed int)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool int __a, vector signed int __b) { +vec_any_le(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__a, __b, &__cc); + __builtin_s390_vchfs((__vector signed int)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector unsigned int __a, vector unsigned int __b) { +vec_any_le(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__a, __b, &__cc); return __cc != 0; @@ -5186,31 +5254,31 @@ vec_any_le(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector unsigned int __a, vector bool int __b) { +vec_any_le(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs(__a, (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs(__a, (__vector unsigned int)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool int __a, vector unsigned int __b) { +vec_any_le(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, __b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, __b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool int __a, vector bool int __b) { +vec_any_le(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__a, - (vector unsigned int)__b, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__a, + (__vector unsigned int)__b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector signed long long __a, vector signed long long __b) { +vec_any_le(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__a, __b, &__cc); return __cc != 0; @@ -5218,22 +5286,22 @@ vec_any_le(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector signed long long __a, vector bool long long __b) { +vec_any_le(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs(__a, (vector signed long long)__b, &__cc); + __builtin_s390_vchgs(__a, (__vector signed long long)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool long long __a, vector signed long long __b) { +vec_any_le(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__a, __b, &__cc); + __builtin_s390_vchgs((__vector signed long long)__a, __b, &__cc); return __cc != 0; } static inline __ATTRS_o_ai int -vec_any_le(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_le(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__a, __b, &__cc); return __cc != 0; @@ -5241,32 +5309,32 @@ vec_any_le(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector unsigned long long __a, vector bool long long __b) { +vec_any_le(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs(__a, (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs(__a, (__vector unsigned long long)__b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool long long __a, vector unsigned long long __b) { +vec_any_le(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, __b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, __b, &__cc); return __cc != 0; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_le(vector bool long long __a, vector bool long long __b) { +vec_any_le(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__a, - (vector unsigned long long)__b, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__a, + (__vector unsigned long long)__b, &__cc); return __cc != 0; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_le(vector float __a, vector float __b) { +vec_any_le(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__b, __a, &__cc); return __cc <= 1; @@ -5274,7 +5342,7 @@ vec_any_le(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_le(vector double __a, vector double __b) { +vec_any_le(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__b, __a, &__cc); return __cc <= 1; @@ -5283,7 +5351,7 @@ vec_any_le(vector double __a, vector double __b) { /*-- vec_any_lt -------------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_any_lt(vector signed char __a, vector signed char __b) { +vec_any_lt(__vector signed char __a, __vector signed char __b) { int __cc; __builtin_s390_vchbs(__b, __a, &__cc); return __cc <= 1; @@ -5291,22 +5359,22 @@ vec_any_lt(vector signed char __a, vector signed char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector signed char __a, vector bool char __b) { +vec_any_lt(__vector signed char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchbs((vector signed char)__b, __a, &__cc); + __builtin_s390_vchbs((__vector signed char)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool char __a, vector signed char __b) { +vec_any_lt(__vector __bool char __a, __vector signed char __b) { int __cc; - __builtin_s390_vchbs(__b, (vector signed char)__a, &__cc); + __builtin_s390_vchbs(__b, (__vector signed char)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned char __a, vector unsigned char __b) { +vec_any_lt(__vector unsigned char __a, __vector unsigned char __b) { int __cc; __builtin_s390_vchlbs(__b, __a, &__cc); return __cc <= 1; @@ -5314,31 +5382,31 @@ vec_any_lt(vector unsigned char __a, vector unsigned char __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned char __a, vector bool char __b) { +vec_any_lt(__vector unsigned char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, __a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool char __a, vector unsigned char __b) { +vec_any_lt(__vector __bool char __a, __vector unsigned char __b) { int __cc; - __builtin_s390_vchlbs(__b, (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs(__b, (__vector unsigned char)__a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool char __a, vector bool char __b) { +vec_any_lt(__vector __bool char __a, __vector __bool char __b) { int __cc; - __builtin_s390_vchlbs((vector unsigned char)__b, - (vector unsigned char)__a, &__cc); + __builtin_s390_vchlbs((__vector unsigned char)__b, + (__vector unsigned char)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector signed short __a, vector signed short __b) { +vec_any_lt(__vector signed short __a, __vector signed short __b) { int __cc; __builtin_s390_vchhs(__b, __a, &__cc); return __cc <= 1; @@ -5346,22 +5414,22 @@ vec_any_lt(vector signed short __a, vector signed short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector signed short __a, vector bool short __b) { +vec_any_lt(__vector signed short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchhs((vector signed short)__b, __a, &__cc); + __builtin_s390_vchhs((__vector signed short)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool short __a, vector signed short __b) { +vec_any_lt(__vector __bool short __a, __vector signed short __b) { int __cc; - __builtin_s390_vchhs(__b, (vector signed short)__a, &__cc); + __builtin_s390_vchhs(__b, (__vector signed short)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned short __a, vector unsigned short __b) { +vec_any_lt(__vector unsigned short __a, __vector unsigned short __b) { int __cc; __builtin_s390_vchlhs(__b, __a, &__cc); return __cc <= 1; @@ -5369,31 +5437,31 @@ vec_any_lt(vector unsigned short __a, vector unsigned short __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned short __a, vector bool short __b) { +vec_any_lt(__vector unsigned short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, __a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool short __a, vector unsigned short __b) { +vec_any_lt(__vector __bool short __a, __vector unsigned short __b) { int __cc; - __builtin_s390_vchlhs(__b, (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs(__b, (__vector unsigned short)__a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool short __a, vector bool short __b) { +vec_any_lt(__vector __bool short __a, __vector __bool short __b) { int __cc; - __builtin_s390_vchlhs((vector unsigned short)__b, - (vector unsigned short)__a, &__cc); + __builtin_s390_vchlhs((__vector unsigned short)__b, + (__vector unsigned short)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector signed int __a, vector signed int __b) { +vec_any_lt(__vector signed int __a, __vector signed int __b) { int __cc; __builtin_s390_vchfs(__b, __a, &__cc); return __cc <= 1; @@ -5401,22 +5469,22 @@ vec_any_lt(vector signed int __a, vector signed int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector signed int __a, vector bool int __b) { +vec_any_lt(__vector signed int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchfs((vector signed int)__b, __a, &__cc); + __builtin_s390_vchfs((__vector signed int)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool int __a, vector signed int __b) { +vec_any_lt(__vector __bool int __a, __vector signed int __b) { int __cc; - __builtin_s390_vchfs(__b, (vector signed int)__a, &__cc); + __builtin_s390_vchfs(__b, (__vector signed int)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned int __a, vector unsigned int __b) { +vec_any_lt(__vector unsigned int __a, __vector unsigned int __b) { int __cc; __builtin_s390_vchlfs(__b, __a, &__cc); return __cc <= 1; @@ -5424,31 +5492,31 @@ vec_any_lt(vector unsigned int __a, vector unsigned int __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned int __a, vector bool int __b) { +vec_any_lt(__vector unsigned int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, __a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool int __a, vector unsigned int __b) { +vec_any_lt(__vector __bool int __a, __vector unsigned int __b) { int __cc; - __builtin_s390_vchlfs(__b, (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs(__b, (__vector unsigned int)__a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool int __a, vector bool int __b) { +vec_any_lt(__vector __bool int __a, __vector __bool int __b) { int __cc; - __builtin_s390_vchlfs((vector unsigned int)__b, - (vector unsigned int)__a, &__cc); + __builtin_s390_vchlfs((__vector unsigned int)__b, + (__vector unsigned int)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector signed long long __a, vector signed long long __b) { +vec_any_lt(__vector signed long long __a, __vector signed long long __b) { int __cc; __builtin_s390_vchgs(__b, __a, &__cc); return __cc <= 1; @@ -5456,22 +5524,22 @@ vec_any_lt(vector signed long long __a, vector signed long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector signed long long __a, vector bool long long __b) { +vec_any_lt(__vector signed long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchgs((vector signed long long)__b, __a, &__cc); + __builtin_s390_vchgs((__vector signed long long)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool long long __a, vector signed long long __b) { +vec_any_lt(__vector __bool long long __a, __vector signed long long __b) { int __cc; - __builtin_s390_vchgs(__b, (vector signed long long)__a, &__cc); + __builtin_s390_vchgs(__b, (__vector signed long long)__a, &__cc); return __cc <= 1; } static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) { +vec_any_lt(__vector unsigned long long __a, __vector unsigned long long __b) { int __cc; __builtin_s390_vchlgs(__b, __a, &__cc); return __cc <= 1; @@ -5479,32 +5547,32 @@ vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) { // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector unsigned long long __a, vector bool long long __b) { +vec_any_lt(__vector unsigned long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, __a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, __a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool long long __a, vector unsigned long long __b) { +vec_any_lt(__vector __bool long long __a, __vector unsigned long long __b) { int __cc; - __builtin_s390_vchlgs(__b, (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs(__b, (__vector unsigned long long)__a, &__cc); return __cc <= 1; } // This prototype is deprecated. static inline __ATTRS_o_ai int -vec_any_lt(vector bool long long __a, vector bool long long __b) { +vec_any_lt(__vector __bool long long __a, __vector __bool long long __b) { int __cc; - __builtin_s390_vchlgs((vector unsigned long long)__b, - (vector unsigned long long)__a, &__cc); + __builtin_s390_vchlgs((__vector unsigned long long)__b, + (__vector unsigned long long)__a, &__cc); return __cc <= 1; } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_lt(vector float __a, vector float __b) { +vec_any_lt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__b, __a, &__cc); return __cc <= 1; @@ -5512,7 +5580,7 @@ vec_any_lt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_lt(vector double __a, vector double __b) { +vec_any_lt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__b, __a, &__cc); return __cc <= 1; @@ -5522,7 +5590,7 @@ vec_any_lt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_nge(vector float __a, vector float __b) { +vec_any_nge(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__a, __b, &__cc); return __cc != 0; @@ -5530,7 +5598,7 @@ vec_any_nge(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_nge(vector double __a, vector double __b) { +vec_any_nge(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__a, __b, &__cc); return __cc != 0; @@ -5540,7 +5608,7 @@ vec_any_nge(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_ngt(vector float __a, vector float __b) { +vec_any_ngt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__a, __b, &__cc); return __cc != 0; @@ -5548,7 +5616,7 @@ vec_any_ngt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_ngt(vector double __a, vector double __b) { +vec_any_ngt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__a, __b, &__cc); return __cc != 0; @@ -5558,7 +5626,7 @@ vec_any_ngt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_nle(vector float __a, vector float __b) { +vec_any_nle(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchesbs(__b, __a, &__cc); return __cc != 0; @@ -5566,7 +5634,7 @@ vec_any_nle(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_nle(vector double __a, vector double __b) { +vec_any_nle(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchedbs(__b, __a, &__cc); return __cc != 0; @@ -5576,7 +5644,7 @@ vec_any_nle(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_nlt(vector float __a, vector float __b) { +vec_any_nlt(__vector float __a, __vector float __b) { int __cc; __builtin_s390_vfchsbs(__b, __a, &__cc); return __cc != 0; @@ -5584,7 +5652,7 @@ vec_any_nlt(vector float __a, vector float __b) { #endif static inline __ATTRS_o_ai int -vec_any_nlt(vector double __a, vector double __b) { +vec_any_nlt(__vector double __a, __vector double __b) { int __cc; __builtin_s390_vfchdbs(__b, __a, &__cc); return __cc != 0; @@ -5594,7 +5662,7 @@ vec_any_nlt(vector double __a, vector double __b) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_nan(vector float __a) { +vec_any_nan(__vector float __a) { int __cc; __builtin_s390_vftcisb(__a, 15, &__cc); return __cc != 3; @@ -5602,7 +5670,7 @@ vec_any_nan(vector float __a) { #endif static inline __ATTRS_o_ai int -vec_any_nan(vector double __a) { +vec_any_nan(__vector double __a) { int __cc; __builtin_s390_vftcidb(__a, 15, &__cc); return __cc != 3; @@ -5612,7 +5680,7 @@ vec_any_nan(vector double __a) { #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_any_numeric(vector float __a) { +vec_any_numeric(__vector float __a) { int __cc; __builtin_s390_vftcisb(__a, 15, &__cc); return __cc != 0; @@ -5620,7 +5688,7 @@ vec_any_numeric(vector float __a) { #endif static inline __ATTRS_o_ai int -vec_any_numeric(vector double __a) { +vec_any_numeric(__vector double __a) { int __cc; __builtin_s390_vftcidb(__a, 15, &__cc); return __cc != 0; @@ -5628,2389 +5696,2393 @@ vec_any_numeric(vector double __a) { /*-- vec_andc ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_andc(vector bool char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector __bool char +vec_andc(__vector __bool char __a, __vector __bool char __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector signed char -vec_andc(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_andc(__vector signed char __a, __vector signed char __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_andc(vector bool char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_andc(__vector __bool char __a, __vector signed char __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_andc(vector signed char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_andc(__vector signed char __a, __vector __bool char __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector unsigned char -vec_andc(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_andc(__vector unsigned char __a, __vector unsigned char __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_andc(vector bool char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_andc(__vector __bool char __a, __vector unsigned char __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_andc(vector unsigned char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_andc(__vector unsigned char __a, __vector __bool char __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector bool short -vec_andc(vector bool short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector __bool short +vec_andc(__vector __bool short __a, __vector __bool short __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector signed short -vec_andc(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_andc(__vector signed short __a, __vector signed short __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_andc(vector bool short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_andc(__vector __bool short __a, __vector signed short __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_andc(vector signed short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_andc(__vector signed short __a, __vector __bool short __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector unsigned short -vec_andc(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_andc(__vector unsigned short __a, __vector unsigned short __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_andc(vector bool short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_andc(__vector __bool short __a, __vector unsigned short __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_andc(vector unsigned short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_andc(__vector unsigned short __a, __vector __bool short __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector bool int -vec_andc(vector bool int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector __bool int +vec_andc(__vector __bool int __a, __vector __bool int __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector signed int -vec_andc(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_andc(__vector signed int __a, __vector signed int __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_andc(vector bool int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_andc(__vector __bool int __a, __vector signed int __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_andc(vector signed int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_andc(__vector signed int __a, __vector __bool int __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector unsigned int -vec_andc(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_andc(__vector unsigned int __a, __vector unsigned int __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_andc(vector bool int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_andc(__vector __bool int __a, __vector unsigned int __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_andc(vector unsigned int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_andc(__vector unsigned int __a, __vector __bool int __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector bool long long -vec_andc(vector bool long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector __bool long long +vec_andc(__vector __bool long long __a, __vector __bool long long __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector signed long long -vec_andc(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_andc(__vector signed long long __a, __vector signed long long __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_andc(vector bool long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_andc(__vector __bool long long __a, __vector signed long long __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_andc(vector signed long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_andc(__vector signed long long __a, __vector __bool long long __b) { return __a & ~__b; } -static inline __ATTRS_o_ai vector unsigned long long -vec_andc(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_andc(__vector unsigned long long __a, __vector unsigned long long __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_andc(vector bool long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_andc(__vector __bool long long __a, __vector unsigned long long __b) { return __a & ~__b; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_andc(vector unsigned long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_andc(__vector unsigned long long __a, __vector __bool long long __b) { return __a & ~__b; } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_andc(vector float __a, vector float __b) { - return (vector float)((vector unsigned int)__a & - ~(vector unsigned int)__b); +static inline __ATTRS_o_ai __vector float +vec_andc(__vector float __a, __vector float __b) { + return (__vector float)((__vector unsigned int)__a & + ~(__vector unsigned int)__b); } #endif -static inline __ATTRS_o_ai vector double -vec_andc(vector double __a, vector double __b) { - return (vector double)((vector unsigned long long)__a & - ~(vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_andc(__vector double __a, __vector double __b) { + return (__vector double)((__vector unsigned long long)__a & + ~(__vector unsigned long long)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_andc(vector bool long long __a, vector double __b) { - return (vector double)((vector unsigned long long)__a & - ~(vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_andc(__vector __bool long long __a, __vector double __b) { + return (__vector double)((__vector unsigned long long)__a & + ~(__vector unsigned long long)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_andc(vector double __a, vector bool long long __b) { - return (vector double)((vector unsigned long long)__a & - ~(vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_andc(__vector double __a, __vector __bool long long __b) { + return (__vector double)((__vector unsigned long long)__a & + ~(__vector unsigned long long)__b); } /*-- vec_nor ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_nor(vector bool char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector __bool char +vec_nor(__vector __bool char __a, __vector __bool char __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector signed char -vec_nor(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_nor(__vector signed char __a, __vector signed char __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_nor(vector bool char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_nor(__vector __bool char __a, __vector signed char __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_nor(vector signed char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_nor(__vector signed char __a, __vector __bool char __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_nor(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_nor(__vector unsigned char __a, __vector unsigned char __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_nor(vector bool char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_nor(__vector __bool char __a, __vector unsigned char __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_nor(vector unsigned char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_nor(__vector unsigned char __a, __vector __bool char __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector bool short -vec_nor(vector bool short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector __bool short +vec_nor(__vector __bool short __a, __vector __bool short __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector signed short -vec_nor(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_nor(__vector signed short __a, __vector signed short __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_nor(vector bool short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_nor(__vector __bool short __a, __vector signed short __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_nor(vector signed short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_nor(__vector signed short __a, __vector __bool short __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_nor(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_nor(__vector unsigned short __a, __vector unsigned short __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_nor(vector bool short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_nor(__vector __bool short __a, __vector unsigned short __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_nor(vector unsigned short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_nor(__vector unsigned short __a, __vector __bool short __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector bool int -vec_nor(vector bool int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector __bool int +vec_nor(__vector __bool int __a, __vector __bool int __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector signed int -vec_nor(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_nor(__vector signed int __a, __vector signed int __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_nor(vector bool int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_nor(__vector __bool int __a, __vector signed int __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_nor(vector signed int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_nor(__vector signed int __a, __vector __bool int __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_nor(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_nor(__vector unsigned int __a, __vector unsigned int __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_nor(vector bool int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_nor(__vector __bool int __a, __vector unsigned int __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_nor(vector unsigned int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_nor(__vector unsigned int __a, __vector __bool int __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector bool long long -vec_nor(vector bool long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector __bool long long +vec_nor(__vector __bool long long __a, __vector __bool long long __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector signed long long -vec_nor(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_nor(__vector signed long long __a, __vector signed long long __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_nor(vector bool long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_nor(__vector __bool long long __a, __vector signed long long __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_nor(vector signed long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_nor(__vector signed long long __a, __vector __bool long long __b) { return ~(__a | __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_nor(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_nor(__vector unsigned long long __a, __vector unsigned long long __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_nor(vector bool long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_nor(__vector __bool long long __a, __vector unsigned long long __b) { return ~(__a | __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_nor(vector unsigned long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_nor(__vector unsigned long long __a, __vector __bool long long __b) { return ~(__a | __b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_nor(vector float __a, vector float __b) { - return (vector float)~((vector unsigned int)__a | - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector float +vec_nor(__vector float __a, __vector float __b) { + return (__vector float)~((__vector unsigned int)__a | + (__vector unsigned int)__b); } #endif -static inline __ATTRS_o_ai vector double -vec_nor(vector double __a, vector double __b) { - return (vector double)~((vector unsigned long long)__a | - (vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_nor(__vector double __a, __vector double __b) { + return (__vector double)~((__vector unsigned long long)__a | + (__vector unsigned long long)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_nor(vector bool long long __a, vector double __b) { - return (vector double)~((vector unsigned long long)__a | - (vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_nor(__vector __bool long long __a, __vector double __b) { + return (__vector double)~((__vector unsigned long long)__a | + (__vector unsigned long long)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_nor(vector double __a, vector bool long long __b) { - return (vector double)~((vector unsigned long long)__a | - (vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_nor(__vector double __a, __vector __bool long long __b) { + return (__vector double)~((__vector unsigned long long)__a | + (__vector unsigned long long)__b); } /*-- vec_orc ----------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool char -vec_orc(vector bool char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector __bool char +vec_orc(__vector __bool char __a, __vector __bool char __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector signed char -vec_orc(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_orc(__vector signed char __a, __vector signed char __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector unsigned char -vec_orc(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_orc(__vector unsigned char __a, __vector unsigned char __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector bool short -vec_orc(vector bool short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector __bool short +vec_orc(__vector __bool short __a, __vector __bool short __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector signed short -vec_orc(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_orc(__vector signed short __a, __vector signed short __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector unsigned short -vec_orc(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_orc(__vector unsigned short __a, __vector unsigned short __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector bool int -vec_orc(vector bool int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector __bool int +vec_orc(__vector __bool int __a, __vector __bool int __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector signed int -vec_orc(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_orc(__vector signed int __a, __vector signed int __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector unsigned int -vec_orc(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_orc(__vector unsigned int __a, __vector unsigned int __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector bool long long -vec_orc(vector bool long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector __bool long long +vec_orc(__vector __bool long long __a, __vector __bool long long __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector signed long long -vec_orc(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_orc(__vector signed long long __a, __vector signed long long __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector unsigned long long -vec_orc(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_orc(__vector unsigned long long __a, __vector unsigned long long __b) { return __a | ~__b; } -static inline __ATTRS_o_ai vector float -vec_orc(vector float __a, vector float __b) { - return (vector float)((vector unsigned int)__a | - ~(vector unsigned int)__b); +static inline __ATTRS_o_ai __vector float +vec_orc(__vector float __a, __vector float __b) { + return (__vector float)((__vector unsigned int)__a | + ~(__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector double -vec_orc(vector double __a, vector double __b) { - return (vector double)((vector unsigned long long)__a | - ~(vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_orc(__vector double __a, __vector double __b) { + return (__vector double)((__vector unsigned long long)__a | + ~(__vector unsigned long long)__b); } #endif /*-- vec_nand ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool char -vec_nand(vector bool char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector __bool char +vec_nand(__vector __bool char __a, __vector __bool char __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector signed char -vec_nand(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_nand(__vector signed char __a, __vector signed char __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_nand(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_nand(__vector unsigned char __a, __vector unsigned char __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector bool short -vec_nand(vector bool short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector __bool short +vec_nand(__vector __bool short __a, __vector __bool short __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector signed short -vec_nand(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_nand(__vector signed short __a, __vector signed short __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_nand(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_nand(__vector unsigned short __a, __vector unsigned short __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector bool int -vec_nand(vector bool int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector __bool int +vec_nand(__vector __bool int __a, __vector __bool int __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector signed int -vec_nand(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_nand(__vector signed int __a, __vector signed int __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_nand(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_nand(__vector unsigned int __a, __vector unsigned int __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector bool long long -vec_nand(vector bool long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector __bool long long +vec_nand(__vector __bool long long __a, __vector __bool long long __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector signed long long -vec_nand(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_nand(__vector signed long long __a, __vector signed long long __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_nand(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_nand(__vector unsigned long long __a, __vector unsigned long long __b) { return ~(__a & __b); } -static inline __ATTRS_o_ai vector float -vec_nand(vector float __a, vector float __b) { - return (vector float)~((vector unsigned int)__a & - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector float +vec_nand(__vector float __a, __vector float __b) { + return (__vector float)~((__vector unsigned int)__a & + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector double -vec_nand(vector double __a, vector double __b) { - return (vector double)~((vector unsigned long long)__a & - (vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_nand(__vector double __a, __vector double __b) { + return (__vector double)~((__vector unsigned long long)__a & + (__vector unsigned long long)__b); } #endif /*-- vec_eqv ----------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector bool char -vec_eqv(vector bool char __a, vector bool char __b) { +static inline __ATTRS_o_ai __vector __bool char +vec_eqv(__vector __bool char __a, __vector __bool char __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector signed char -vec_eqv(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_eqv(__vector signed char __a, __vector signed char __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_eqv(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_eqv(__vector unsigned char __a, __vector unsigned char __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector bool short -vec_eqv(vector bool short __a, vector bool short __b) { +static inline __ATTRS_o_ai __vector __bool short +vec_eqv(__vector __bool short __a, __vector __bool short __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector signed short -vec_eqv(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_eqv(__vector signed short __a, __vector signed short __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_eqv(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_eqv(__vector unsigned short __a, __vector unsigned short __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector bool int -vec_eqv(vector bool int __a, vector bool int __b) { +static inline __ATTRS_o_ai __vector __bool int +vec_eqv(__vector __bool int __a, __vector __bool int __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector signed int -vec_eqv(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_eqv(__vector signed int __a, __vector signed int __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_eqv(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_eqv(__vector unsigned int __a, __vector unsigned int __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector bool long long -vec_eqv(vector bool long long __a, vector bool long long __b) { +static inline __ATTRS_o_ai __vector __bool long long +vec_eqv(__vector __bool long long __a, __vector __bool long long __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector signed long long -vec_eqv(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_eqv(__vector signed long long __a, __vector signed long long __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_eqv(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_eqv(__vector unsigned long long __a, __vector unsigned long long __b) { return ~(__a ^ __b); } -static inline __ATTRS_o_ai vector float -vec_eqv(vector float __a, vector float __b) { - return (vector float)~((vector unsigned int)__a ^ - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector float +vec_eqv(__vector float __a, __vector float __b) { + return (__vector float)~((__vector unsigned int)__a ^ + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector double -vec_eqv(vector double __a, vector double __b) { - return (vector double)~((vector unsigned long long)__a ^ - (vector unsigned long long)__b); +static inline __ATTRS_o_ai __vector double +vec_eqv(__vector double __a, __vector double __b) { + return (__vector double)~((__vector unsigned long long)__a ^ + (__vector unsigned long long)__b); } #endif /*-- vec_cntlz --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cntlz(vector signed char __a) { - return __builtin_s390_vclzb((vector unsigned char)__a); +static inline __ATTRS_o_ai __vector unsigned char +vec_cntlz(__vector signed char __a) { + return __builtin_s390_vclzb((__vector unsigned char)__a); } -static inline __ATTRS_o_ai vector unsigned char -vec_cntlz(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cntlz(__vector unsigned char __a) { return __builtin_s390_vclzb(__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_cntlz(vector signed short __a) { - return __builtin_s390_vclzh((vector unsigned short)__a); +static inline __ATTRS_o_ai __vector unsigned short +vec_cntlz(__vector signed short __a) { + return __builtin_s390_vclzh((__vector unsigned short)__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_cntlz(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cntlz(__vector unsigned short __a) { return __builtin_s390_vclzh(__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_cntlz(vector signed int __a) { - return __builtin_s390_vclzf((vector unsigned int)__a); +static inline __ATTRS_o_ai __vector unsigned int +vec_cntlz(__vector signed int __a) { + return __builtin_s390_vclzf((__vector unsigned int)__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_cntlz(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cntlz(__vector unsigned int __a) { return __builtin_s390_vclzf(__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_cntlz(vector signed long long __a) { - return __builtin_s390_vclzg((vector unsigned long long)__a); +static inline __ATTRS_o_ai __vector unsigned long long +vec_cntlz(__vector signed long long __a) { + return __builtin_s390_vclzg((__vector unsigned long long)__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_cntlz(vector unsigned long long __a) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_cntlz(__vector unsigned long long __a) { return __builtin_s390_vclzg(__a); } /*-- vec_cnttz --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cnttz(vector signed char __a) { - return __builtin_s390_vctzb((vector unsigned char)__a); +static inline __ATTRS_o_ai __vector unsigned char +vec_cnttz(__vector signed char __a) { + return __builtin_s390_vctzb((__vector unsigned char)__a); } -static inline __ATTRS_o_ai vector unsigned char -vec_cnttz(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cnttz(__vector unsigned char __a) { return __builtin_s390_vctzb(__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_cnttz(vector signed short __a) { - return __builtin_s390_vctzh((vector unsigned short)__a); +static inline __ATTRS_o_ai __vector unsigned short +vec_cnttz(__vector signed short __a) { + return __builtin_s390_vctzh((__vector unsigned short)__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_cnttz(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cnttz(__vector unsigned short __a) { return __builtin_s390_vctzh(__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_cnttz(vector signed int __a) { - return __builtin_s390_vctzf((vector unsigned int)__a); +static inline __ATTRS_o_ai __vector unsigned int +vec_cnttz(__vector signed int __a) { + return __builtin_s390_vctzf((__vector unsigned int)__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_cnttz(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cnttz(__vector unsigned int __a) { return __builtin_s390_vctzf(__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_cnttz(vector signed long long __a) { - return __builtin_s390_vctzg((vector unsigned long long)__a); +static inline __ATTRS_o_ai __vector unsigned long long +vec_cnttz(__vector signed long long __a) { + return __builtin_s390_vctzg((__vector unsigned long long)__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_cnttz(vector unsigned long long __a) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_cnttz(__vector unsigned long long __a) { return __builtin_s390_vctzg(__a); } /*-- vec_popcnt -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_popcnt(vector signed char __a) { - return __builtin_s390_vpopctb((vector unsigned char)__a); +static inline __ATTRS_o_ai __vector unsigned char +vec_popcnt(__vector signed char __a) { + return __builtin_s390_vpopctb((__vector unsigned char)__a); } -static inline __ATTRS_o_ai vector unsigned char -vec_popcnt(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned char +vec_popcnt(__vector unsigned char __a) { return __builtin_s390_vpopctb(__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_popcnt(vector signed short __a) { - return __builtin_s390_vpopcth((vector unsigned short)__a); +static inline __ATTRS_o_ai __vector unsigned short +vec_popcnt(__vector signed short __a) { + return __builtin_s390_vpopcth((__vector unsigned short)__a); } -static inline __ATTRS_o_ai vector unsigned short -vec_popcnt(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_popcnt(__vector unsigned short __a) { return __builtin_s390_vpopcth(__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_popcnt(vector signed int __a) { - return __builtin_s390_vpopctf((vector unsigned int)__a); +static inline __ATTRS_o_ai __vector unsigned int +vec_popcnt(__vector signed int __a) { + return __builtin_s390_vpopctf((__vector unsigned int)__a); } -static inline __ATTRS_o_ai vector unsigned int -vec_popcnt(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_popcnt(__vector unsigned int __a) { return __builtin_s390_vpopctf(__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_popcnt(vector signed long long __a) { - return __builtin_s390_vpopctg((vector unsigned long long)__a); +static inline __ATTRS_o_ai __vector unsigned long long +vec_popcnt(__vector signed long long __a) { + return __builtin_s390_vpopctg((__vector unsigned long long)__a); } -static inline __ATTRS_o_ai vector unsigned long long -vec_popcnt(vector unsigned long long __a) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_popcnt(__vector unsigned long long __a) { return __builtin_s390_vpopctg(__a); } /*-- vec_rl -----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_rl(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_verllvb( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_rl(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_verllvb( + (__vector unsigned char)__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_rl(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_rl(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_verllvb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_rl(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_verllvh( - (vector unsigned short)__a, __b); +static inline __ATTRS_o_ai __vector signed short +vec_rl(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_verllvh( + (__vector unsigned short)__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_rl(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_rl(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_verllvh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_rl(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_verllvf( - (vector unsigned int)__a, __b); +static inline __ATTRS_o_ai __vector signed int +vec_rl(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_verllvf( + (__vector unsigned int)__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_rl(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_rl(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_verllvf(__a, __b); } -static inline __ATTRS_o_ai vector signed long long -vec_rl(vector signed long long __a, vector unsigned long long __b) { - return (vector signed long long)__builtin_s390_verllvg( - (vector unsigned long long)__a, __b); +static inline __ATTRS_o_ai __vector signed long long +vec_rl(__vector signed long long __a, __vector unsigned long long __b) { + return (__vector signed long long)__builtin_s390_verllvg( + (__vector unsigned long long)__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_rl(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_rl(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_verllvg(__a, __b); } /*-- vec_rli ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_rli(vector signed char __a, unsigned long __b) { - return (vector signed char)__builtin_s390_verllb( - (vector unsigned char)__a, (int)__b); +static inline __ATTRS_o_ai __vector signed char +vec_rli(__vector signed char __a, unsigned long __b) { + return (__vector signed char)__builtin_s390_verllb( + (__vector unsigned char)__a, (int)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_rli(vector unsigned char __a, unsigned long __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_rli(__vector unsigned char __a, unsigned long __b) { return __builtin_s390_verllb(__a, (int)__b); } -static inline __ATTRS_o_ai vector signed short -vec_rli(vector signed short __a, unsigned long __b) { - return (vector signed short)__builtin_s390_verllh( - (vector unsigned short)__a, (int)__b); +static inline __ATTRS_o_ai __vector signed short +vec_rli(__vector signed short __a, unsigned long __b) { + return (__vector signed short)__builtin_s390_verllh( + (__vector unsigned short)__a, (int)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_rli(vector unsigned short __a, unsigned long __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_rli(__vector unsigned short __a, unsigned long __b) { return __builtin_s390_verllh(__a, (int)__b); } -static inline __ATTRS_o_ai vector signed int -vec_rli(vector signed int __a, unsigned long __b) { - return (vector signed int)__builtin_s390_verllf( - (vector unsigned int)__a, (int)__b); +static inline __ATTRS_o_ai __vector signed int +vec_rli(__vector signed int __a, unsigned long __b) { + return (__vector signed int)__builtin_s390_verllf( + (__vector unsigned int)__a, (int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_rli(vector unsigned int __a, unsigned long __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_rli(__vector unsigned int __a, unsigned long __b) { return __builtin_s390_verllf(__a, (int)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_rli(vector signed long long __a, unsigned long __b) { - return (vector signed long long)__builtin_s390_verllg( - (vector unsigned long long)__a, (int)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_rli(__vector signed long long __a, unsigned long __b) { + return (__vector signed long long)__builtin_s390_verllg( + (__vector unsigned long long)__a, (int)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_rli(vector unsigned long long __a, unsigned long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_rli(__vector unsigned long long __a, unsigned long __b) { return __builtin_s390_verllg(__a, (int)__b); } /*-- vec_rl_mask ------------------------------------------------------------*/ -extern __ATTRS_o vector signed char -vec_rl_mask(vector signed char __a, vector unsigned char __b, +extern __ATTRS_o __vector signed char +vec_rl_mask(__vector signed char __a, __vector unsigned char __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector unsigned char -vec_rl_mask(vector unsigned char __a, vector unsigned char __b, +extern __ATTRS_o __vector unsigned char +vec_rl_mask(__vector unsigned char __a, __vector unsigned char __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector signed short -vec_rl_mask(vector signed short __a, vector unsigned short __b, +extern __ATTRS_o __vector signed short +vec_rl_mask(__vector signed short __a, __vector unsigned short __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector unsigned short -vec_rl_mask(vector unsigned short __a, vector unsigned short __b, +extern __ATTRS_o __vector unsigned short +vec_rl_mask(__vector unsigned short __a, __vector unsigned short __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector signed int -vec_rl_mask(vector signed int __a, vector unsigned int __b, +extern __ATTRS_o __vector signed int +vec_rl_mask(__vector signed int __a, __vector unsigned int __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector unsigned int -vec_rl_mask(vector unsigned int __a, vector unsigned int __b, +extern __ATTRS_o __vector unsigned int +vec_rl_mask(__vector unsigned int __a, __vector unsigned int __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector signed long long -vec_rl_mask(vector signed long long __a, vector unsigned long long __b, +extern __ATTRS_o __vector signed long long +vec_rl_mask(__vector signed long long __a, __vector unsigned long long __b, unsigned char __c) __constant(__c); -extern __ATTRS_o vector unsigned long long -vec_rl_mask(vector unsigned long long __a, vector unsigned long long __b, +extern __ATTRS_o __vector unsigned long long +vec_rl_mask(__vector unsigned long long __a, __vector unsigned long long __b, unsigned char __c) __constant(__c); #define vec_rl_mask(X, Y, Z) ((__typeof__((vec_rl_mask)((X), (Y), (Z)))) \ __extension__ ({ \ - vector unsigned char __res; \ - vector unsigned char __x = (vector unsigned char)(X); \ - vector unsigned char __y = (vector unsigned char)(Y); \ + __vector unsigned char __res; \ + __vector unsigned char __x = (__vector unsigned char)(X); \ + __vector unsigned char __y = (__vector unsigned char)(Y); \ switch (sizeof ((X)[0])) { \ - case 1: __res = (vector unsigned char) __builtin_s390_verimb( \ - (vector unsigned char)__x, (vector unsigned char)__x, \ - (vector unsigned char)__y, (Z)); break; \ - case 2: __res = (vector unsigned char) __builtin_s390_verimh( \ - (vector unsigned short)__x, (vector unsigned short)__x, \ - (vector unsigned short)__y, (Z)); break; \ - case 4: __res = (vector unsigned char) __builtin_s390_verimf( \ - (vector unsigned int)__x, (vector unsigned int)__x, \ - (vector unsigned int)__y, (Z)); break; \ - default: __res = (vector unsigned char) __builtin_s390_verimg( \ - (vector unsigned long long)__x, (vector unsigned long long)__x, \ - (vector unsigned long long)__y, (Z)); break; \ + case 1: __res = (__vector unsigned char) __builtin_s390_verimb( \ + (__vector unsigned char)__x, (__vector unsigned char)__x, \ + (__vector unsigned char)__y, (Z)); break; \ + case 2: __res = (__vector unsigned char) __builtin_s390_verimh( \ + (__vector unsigned short)__x, (__vector unsigned short)__x, \ + (__vector unsigned short)__y, (Z)); break; \ + case 4: __res = (__vector unsigned char) __builtin_s390_verimf( \ + (__vector unsigned int)__x, (__vector unsigned int)__x, \ + (__vector unsigned int)__y, (Z)); break; \ + default: __res = (__vector unsigned char) __builtin_s390_verimg( \ + (__vector unsigned long long)__x, (__vector unsigned long long)__x, \ + (__vector unsigned long long)__y, (Z)); break; \ } __res; })) /*-- vec_sll ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_sll(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_sll(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_sll(vector signed char __a, vector unsigned short __b) { - return (vector signed char)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_sll(__vector signed char __a, __vector unsigned short __b) { + return (__vector signed char)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_sll(vector signed char __a, vector unsigned int __b) { - return (vector signed char)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_sll(__vector signed char __a, __vector unsigned int __b) { + return (__vector signed char)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sll(vector bool char __a, vector unsigned char __b) { - return (vector bool char)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool char +vec_sll(__vector __bool char __a, __vector unsigned char __b) { + return (__vector __bool char)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sll(vector bool char __a, vector unsigned short __b) { - return (vector bool char)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_sll(__vector __bool char __a, __vector unsigned short __b) { + return (__vector __bool char)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sll(vector bool char __a, vector unsigned int __b) { - return (vector bool char)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_sll(__vector __bool char __a, __vector unsigned int __b) { + return (__vector __bool char)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_sll(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_sll(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsl(__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_sll(vector unsigned char __a, vector unsigned short __b) { - return __builtin_s390_vsl(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_sll(__vector unsigned char __a, __vector unsigned short __b) { + return __builtin_s390_vsl(__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_sll(vector unsigned char __a, vector unsigned int __b) { - return __builtin_s390_vsl(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_sll(__vector unsigned char __a, __vector unsigned int __b) { + return __builtin_s390_vsl(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_sll(vector signed short __a, vector unsigned char __b) { - return (vector signed short)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed short +vec_sll(__vector signed short __a, __vector unsigned char __b) { + return (__vector signed short)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_sll(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_sll(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_sll(vector signed short __a, vector unsigned int __b) { - return (vector signed short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_sll(__vector signed short __a, __vector unsigned int __b) { + return (__vector signed short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sll(vector bool short __a, vector unsigned char __b) { - return (vector bool short)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool short +vec_sll(__vector __bool short __a, __vector unsigned char __b) { + return (__vector __bool short)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sll(vector bool short __a, vector unsigned short __b) { - return (vector bool short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_sll(__vector __bool short __a, __vector unsigned short __b) { + return (__vector __bool short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sll(vector bool short __a, vector unsigned int __b) { - return (vector bool short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_sll(__vector __bool short __a, __vector unsigned int __b) { + return (__vector __bool short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_sll(vector unsigned short __a, vector unsigned char __b) { - return (vector unsigned short)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sll(__vector unsigned short __a, __vector unsigned char __b) { + return (__vector unsigned short)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_sll(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sll(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_sll(vector unsigned short __a, vector unsigned int __b) { - return (vector unsigned short)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sll(__vector unsigned short __a, __vector unsigned int __b) { + return (__vector unsigned short)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_sll(vector signed int __a, vector unsigned char __b) { - return (vector signed int)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed int +vec_sll(__vector signed int __a, __vector unsigned char __b) { + return (__vector signed int)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_sll(vector signed int __a, vector unsigned short __b) { - return (vector signed int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_sll(__vector signed int __a, __vector unsigned short __b) { + return (__vector signed int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_sll(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_sll(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sll(vector bool int __a, vector unsigned char __b) { - return (vector bool int)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool int +vec_sll(__vector __bool int __a, __vector unsigned char __b) { + return (__vector __bool int)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sll(vector bool int __a, vector unsigned short __b) { - return (vector bool int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_sll(__vector __bool int __a, __vector unsigned short __b) { + return (__vector __bool int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sll(vector bool int __a, vector unsigned int __b) { - return (vector bool int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_sll(__vector __bool int __a, __vector unsigned int __b) { + return (__vector __bool int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_sll(vector unsigned int __a, vector unsigned char __b) { - return (vector unsigned int)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sll(__vector unsigned int __a, __vector unsigned char __b) { + return (__vector unsigned int)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_sll(vector unsigned int __a, vector unsigned short __b) { - return (vector unsigned int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sll(__vector unsigned int __a, __vector unsigned short __b) { + return (__vector unsigned int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_sll(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sll(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_sll(vector signed long long __a, vector unsigned char __b) { - return (vector signed long long)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed long long +vec_sll(__vector signed long long __a, __vector unsigned char __b) { + return (__vector signed long long)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_sll(vector signed long long __a, vector unsigned short __b) { - return (vector signed long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_sll(__vector signed long long __a, __vector unsigned short __b) { + return (__vector signed long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_sll(vector signed long long __a, vector unsigned int __b) { - return (vector signed long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_sll(__vector signed long long __a, __vector unsigned int __b) { + return (__vector signed long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sll(vector bool long long __a, vector unsigned char __b) { - return (vector bool long long)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sll(__vector __bool long long __a, __vector unsigned char __b) { + return (__vector __bool long long)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sll(vector bool long long __a, vector unsigned short __b) { - return (vector bool long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sll(__vector __bool long long __a, __vector unsigned short __b) { + return (__vector __bool long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sll(vector bool long long __a, vector unsigned int __b) { - return (vector bool long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sll(__vector __bool long long __a, __vector unsigned int __b) { + return (__vector __bool long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_sll(vector unsigned long long __a, vector unsigned char __b) { - return (vector unsigned long long)__builtin_s390_vsl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sll(__vector unsigned long long __a, __vector unsigned char __b) { + return (__vector unsigned long long)__builtin_s390_vsl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_sll(vector unsigned long long __a, vector unsigned short __b) { - return (vector unsigned long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sll(__vector unsigned long long __a, __vector unsigned short __b) { + return (__vector unsigned long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_sll(vector unsigned long long __a, vector unsigned int __b) { - return (vector unsigned long long)__builtin_s390_vsl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sll(__vector unsigned long long __a, __vector unsigned int __b) { + return (__vector unsigned long long)__builtin_s390_vsl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_slb ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_slb(vector signed char __a, vector signed char __b) { - return (vector signed char)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_slb(__vector signed char __a, __vector signed char __b) { + return (__vector signed char)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed char -vec_slb(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vslb( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_slb(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vslb( + (__vector unsigned char)__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_slb(vector unsigned char __a, vector signed char __b) { - return __builtin_s390_vslb(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_slb(__vector unsigned char __a, __vector signed char __b) { + return __builtin_s390_vslb(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_slb(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_slb(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vslb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_slb(vector signed short __a, vector signed short __b) { - return (vector signed short)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_slb(__vector signed short __a, __vector signed short __b) { + return (__vector signed short)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_slb(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_slb(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_slb(vector unsigned short __a, vector signed short __b) { - return (vector unsigned short)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_slb(__vector unsigned short __a, __vector signed short __b) { + return (__vector unsigned short)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_slb(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_slb(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_slb(vector signed int __a, vector signed int __b) { - return (vector signed int)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_slb(__vector signed int __a, __vector signed int __b) { + return (__vector signed int)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_slb(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_slb(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_slb(vector unsigned int __a, vector signed int __b) { - return (vector unsigned int)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_slb(__vector unsigned int __a, __vector signed int __b) { + return (__vector unsigned int)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_slb(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_slb(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_slb(vector signed long long __a, vector signed long long __b) { - return (vector signed long long)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_slb(__vector signed long long __a, __vector signed long long __b) { + return (__vector signed long long)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_slb(vector signed long long __a, vector unsigned long long __b) { - return (vector signed long long)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_slb(__vector signed long long __a, __vector unsigned long long __b) { + return (__vector signed long long)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_slb(vector unsigned long long __a, vector signed long long __b) { - return (vector unsigned long long)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_slb(__vector unsigned long long __a, __vector signed long long __b) { + return (__vector unsigned long long)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_slb(vector unsigned long long __a, vector unsigned long long __b) { - return (vector unsigned long long)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_slb(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector unsigned long long)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_slb(vector float __a, vector signed int __b) { - return (vector float)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_slb(__vector float __a, __vector signed int __b) { + return (__vector float)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector float -vec_slb(vector float __a, vector unsigned int __b) { - return (vector float)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_slb(__vector float __a, __vector unsigned int __b) { + return (__vector float)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #endif -static inline __ATTRS_o_ai vector double -vec_slb(vector double __a, vector signed long long __b) { - return (vector double)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_slb(__vector double __a, __vector signed long long __b) { + return (__vector double)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector double -vec_slb(vector double __a, vector unsigned long long __b) { - return (vector double)__builtin_s390_vslb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_slb(__vector double __a, __vector unsigned long long __b) { + return (__vector double)__builtin_s390_vslb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_sld ----------------------------------------------------------------*/ -extern __ATTRS_o vector signed char -vec_sld(vector signed char __a, vector signed char __b, int __c) +extern __ATTRS_o __vector signed char +vec_sld(__vector signed char __a, __vector signed char __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector bool char -vec_sld(vector bool char __a, vector bool char __b, int __c) +extern __ATTRS_o __vector __bool char +vec_sld(__vector __bool char __a, __vector __bool char __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector unsigned char -vec_sld(vector unsigned char __a, vector unsigned char __b, int __c) +extern __ATTRS_o __vector unsigned char +vec_sld(__vector unsigned char __a, __vector unsigned char __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector signed short -vec_sld(vector signed short __a, vector signed short __b, int __c) +extern __ATTRS_o __vector signed short +vec_sld(__vector signed short __a, __vector signed short __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector bool short -vec_sld(vector bool short __a, vector bool short __b, int __c) +extern __ATTRS_o __vector __bool short +vec_sld(__vector __bool short __a, __vector __bool short __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector unsigned short -vec_sld(vector unsigned short __a, vector unsigned short __b, int __c) +extern __ATTRS_o __vector unsigned short +vec_sld(__vector unsigned short __a, __vector unsigned short __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector signed int -vec_sld(vector signed int __a, vector signed int __b, int __c) +extern __ATTRS_o __vector signed int +vec_sld(__vector signed int __a, __vector signed int __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector bool int -vec_sld(vector bool int __a, vector bool int __b, int __c) +extern __ATTRS_o __vector __bool int +vec_sld(__vector __bool int __a, __vector __bool int __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector unsigned int -vec_sld(vector unsigned int __a, vector unsigned int __b, int __c) +extern __ATTRS_o __vector unsigned int +vec_sld(__vector unsigned int __a, __vector unsigned int __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector signed long long -vec_sld(vector signed long long __a, vector signed long long __b, int __c) +extern __ATTRS_o __vector signed long long +vec_sld(__vector signed long long __a, __vector signed long long __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector bool long long -vec_sld(vector bool long long __a, vector bool long long __b, int __c) +extern __ATTRS_o __vector __bool long long +vec_sld(__vector __bool long long __a, __vector __bool long long __b, int __c) __constant_range(__c, 0, 15); -extern __ATTRS_o vector unsigned long long -vec_sld(vector unsigned long long __a, vector unsigned long long __b, int __c) +extern __ATTRS_o __vector unsigned long long +vec_sld(__vector unsigned long long __a, __vector unsigned long long __b, + int __c) __constant_range(__c, 0, 15); #if __ARCH__ >= 12 -extern __ATTRS_o vector float -vec_sld(vector float __a, vector float __b, int __c) +extern __ATTRS_o __vector float +vec_sld(__vector float __a, __vector float __b, int __c) __constant_range(__c, 0, 15); #endif -extern __ATTRS_o vector double -vec_sld(vector double __a, vector double __b, int __c) +extern __ATTRS_o __vector double +vec_sld(__vector double __a, __vector double __b, int __c) __constant_range(__c, 0, 15); #define vec_sld(X, Y, Z) ((__typeof__((vec_sld)((X), (Y), (Z)))) \ - __builtin_s390_vsldb((vector unsigned char)(X), \ - (vector unsigned char)(Y), (Z))) + __builtin_s390_vsldb((__vector unsigned char)(X), \ + (__vector unsigned char)(Y), (Z))) /*-- vec_sldw ---------------------------------------------------------------*/ -extern __ATTRS_o vector signed char -vec_sldw(vector signed char __a, vector signed char __b, int __c) +extern __ATTRS_o __vector signed char +vec_sldw(__vector signed char __a, __vector signed char __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector unsigned char -vec_sldw(vector unsigned char __a, vector unsigned char __b, int __c) +extern __ATTRS_o __vector unsigned char +vec_sldw(__vector unsigned char __a, __vector unsigned char __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector signed short -vec_sldw(vector signed short __a, vector signed short __b, int __c) +extern __ATTRS_o __vector signed short +vec_sldw(__vector signed short __a, __vector signed short __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector unsigned short -vec_sldw(vector unsigned short __a, vector unsigned short __b, int __c) +extern __ATTRS_o __vector unsigned short +vec_sldw(__vector unsigned short __a, __vector unsigned short __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector signed int -vec_sldw(vector signed int __a, vector signed int __b, int __c) +extern __ATTRS_o __vector signed int +vec_sldw(__vector signed int __a, __vector signed int __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector unsigned int -vec_sldw(vector unsigned int __a, vector unsigned int __b, int __c) +extern __ATTRS_o __vector unsigned int +vec_sldw(__vector unsigned int __a, __vector unsigned int __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector signed long long -vec_sldw(vector signed long long __a, vector signed long long __b, int __c) +extern __ATTRS_o __vector signed long long +vec_sldw(__vector signed long long __a, __vector signed long long __b, int __c) __constant_range(__c, 0, 3); -extern __ATTRS_o vector unsigned long long -vec_sldw(vector unsigned long long __a, vector unsigned long long __b, int __c) +extern __ATTRS_o __vector unsigned long long +vec_sldw(__vector unsigned long long __a, __vector unsigned long long __b, + int __c) __constant_range(__c, 0, 3); // This prototype is deprecated. -extern __ATTRS_o vector double -vec_sldw(vector double __a, vector double __b, int __c) +extern __ATTRS_o __vector double +vec_sldw(__vector double __a, __vector double __b, int __c) __constant_range(__c, 0, 3); #define vec_sldw(X, Y, Z) ((__typeof__((vec_sldw)((X), (Y), (Z)))) \ - __builtin_s390_vsldb((vector unsigned char)(X), \ - (vector unsigned char)(Y), (Z) * 4)) + __builtin_s390_vsldb((__vector unsigned char)(X), \ + (__vector unsigned char)(Y), (Z) * 4)) /*-- vec_sldb ---------------------------------------------------------------*/ #if __ARCH__ >= 13 -extern __ATTRS_o vector signed char -vec_sldb(vector signed char __a, vector signed char __b, int __c) +extern __ATTRS_o __vector signed char +vec_sldb(__vector signed char __a, __vector signed char __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned char -vec_sldb(vector unsigned char __a, vector unsigned char __b, int __c) +extern __ATTRS_o __vector unsigned char +vec_sldb(__vector unsigned char __a, __vector unsigned char __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed short -vec_sldb(vector signed short __a, vector signed short __b, int __c) +extern __ATTRS_o __vector signed short +vec_sldb(__vector signed short __a, __vector signed short __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned short -vec_sldb(vector unsigned short __a, vector unsigned short __b, int __c) +extern __ATTRS_o __vector unsigned short +vec_sldb(__vector unsigned short __a, __vector unsigned short __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed int -vec_sldb(vector signed int __a, vector signed int __b, int __c) +extern __ATTRS_o __vector signed int +vec_sldb(__vector signed int __a, __vector signed int __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned int -vec_sldb(vector unsigned int __a, vector unsigned int __b, int __c) +extern __ATTRS_o __vector unsigned int +vec_sldb(__vector unsigned int __a, __vector unsigned int __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed long long -vec_sldb(vector signed long long __a, vector signed long long __b, int __c) +extern __ATTRS_o __vector signed long long +vec_sldb(__vector signed long long __a, __vector signed long long __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned long long -vec_sldb(vector unsigned long long __a, vector unsigned long long __b, int __c) +extern __ATTRS_o __vector unsigned long long +vec_sldb(__vector unsigned long long __a, __vector unsigned long long __b, + int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector float -vec_sldb(vector float __a, vector float __b, int __c) +extern __ATTRS_o __vector float +vec_sldb(__vector float __a, __vector float __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector double -vec_sldb(vector double __a, vector double __b, int __c) +extern __ATTRS_o __vector double +vec_sldb(__vector double __a, __vector double __b, int __c) __constant_range(__c, 0, 7); #define vec_sldb(X, Y, Z) ((__typeof__((vec_sldb)((X), (Y), (Z)))) \ - __builtin_s390_vsld((vector unsigned char)(X), \ - (vector unsigned char)(Y), (Z))) + __builtin_s390_vsld((__vector unsigned char)(X), \ + (__vector unsigned char)(Y), (Z))) #endif /*-- vec_sral ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_sral(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_sral(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_sral(vector signed char __a, vector unsigned short __b) { - return (vector signed char)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_sral(__vector signed char __a, __vector unsigned short __b) { + return (__vector signed char)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_sral(vector signed char __a, vector unsigned int __b) { - return (vector signed char)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_sral(__vector signed char __a, __vector unsigned int __b) { + return (__vector signed char)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sral(vector bool char __a, vector unsigned char __b) { - return (vector bool char)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool char +vec_sral(__vector __bool char __a, __vector unsigned char __b) { + return (__vector __bool char)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sral(vector bool char __a, vector unsigned short __b) { - return (vector bool char)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_sral(__vector __bool char __a, __vector unsigned short __b) { + return (__vector __bool char)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_sral(vector bool char __a, vector unsigned int __b) { - return (vector bool char)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_sral(__vector __bool char __a, __vector unsigned int __b) { + return (__vector __bool char)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_sral(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_sral(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsra(__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_sral(vector unsigned char __a, vector unsigned short __b) { - return __builtin_s390_vsra(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_sral(__vector unsigned char __a, __vector unsigned short __b) { + return __builtin_s390_vsra(__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_sral(vector unsigned char __a, vector unsigned int __b) { - return __builtin_s390_vsra(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_sral(__vector unsigned char __a, __vector unsigned int __b) { + return __builtin_s390_vsra(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_sral(vector signed short __a, vector unsigned char __b) { - return (vector signed short)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed short +vec_sral(__vector signed short __a, __vector unsigned char __b) { + return (__vector signed short)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_sral(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_sral(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_sral(vector signed short __a, vector unsigned int __b) { - return (vector signed short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_sral(__vector signed short __a, __vector unsigned int __b) { + return (__vector signed short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sral(vector bool short __a, vector unsigned char __b) { - return (vector bool short)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool short +vec_sral(__vector __bool short __a, __vector unsigned char __b) { + return (__vector __bool short)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sral(vector bool short __a, vector unsigned short __b) { - return (vector bool short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_sral(__vector __bool short __a, __vector unsigned short __b) { + return (__vector __bool short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_sral(vector bool short __a, vector unsigned int __b) { - return (vector bool short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_sral(__vector __bool short __a, __vector unsigned int __b) { + return (__vector __bool short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_sral(vector unsigned short __a, vector unsigned char __b) { - return (vector unsigned short)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sral(__vector unsigned short __a, __vector unsigned char __b) { + return (__vector unsigned short)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_sral(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sral(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_sral(vector unsigned short __a, vector unsigned int __b) { - return (vector unsigned short)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_sral(__vector unsigned short __a, __vector unsigned int __b) { + return (__vector unsigned short)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_sral(vector signed int __a, vector unsigned char __b) { - return (vector signed int)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed int +vec_sral(__vector signed int __a, __vector unsigned char __b) { + return (__vector signed int)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_sral(vector signed int __a, vector unsigned short __b) { - return (vector signed int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_sral(__vector signed int __a, __vector unsigned short __b) { + return (__vector signed int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_sral(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_sral(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sral(vector bool int __a, vector unsigned char __b) { - return (vector bool int)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool int +vec_sral(__vector __bool int __a, __vector unsigned char __b) { + return (__vector __bool int)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sral(vector bool int __a, vector unsigned short __b) { - return (vector bool int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_sral(__vector __bool int __a, __vector unsigned short __b) { + return (__vector __bool int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_sral(vector bool int __a, vector unsigned int __b) { - return (vector bool int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_sral(__vector __bool int __a, __vector unsigned int __b) { + return (__vector __bool int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_sral(vector unsigned int __a, vector unsigned char __b) { - return (vector unsigned int)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sral(__vector unsigned int __a, __vector unsigned char __b) { + return (__vector unsigned int)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_sral(vector unsigned int __a, vector unsigned short __b) { - return (vector unsigned int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sral(__vector unsigned int __a, __vector unsigned short __b) { + return (__vector unsigned int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_sral(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_sral(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_sral(vector signed long long __a, vector unsigned char __b) { - return (vector signed long long)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed long long +vec_sral(__vector signed long long __a, __vector unsigned char __b) { + return (__vector signed long long)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_sral(vector signed long long __a, vector unsigned short __b) { - return (vector signed long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_sral(__vector signed long long __a, __vector unsigned short __b) { + return (__vector signed long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_sral(vector signed long long __a, vector unsigned int __b) { - return (vector signed long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_sral(__vector signed long long __a, __vector unsigned int __b) { + return (__vector signed long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sral(vector bool long long __a, vector unsigned char __b) { - return (vector bool long long)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sral(__vector __bool long long __a, __vector unsigned char __b) { + return (__vector __bool long long)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sral(vector bool long long __a, vector unsigned short __b) { - return (vector bool long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sral(__vector __bool long long __a, __vector unsigned short __b) { + return (__vector __bool long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_sral(vector bool long long __a, vector unsigned int __b) { - return (vector bool long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_sral(__vector __bool long long __a, __vector unsigned int __b) { + return (__vector __bool long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_sral(vector unsigned long long __a, vector unsigned char __b) { - return (vector unsigned long long)__builtin_s390_vsra( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sral(__vector unsigned long long __a, __vector unsigned char __b) { + return (__vector unsigned long long)__builtin_s390_vsra( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_sral(vector unsigned long long __a, vector unsigned short __b) { - return (vector unsigned long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sral(__vector unsigned long long __a, __vector unsigned short __b) { + return (__vector unsigned long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_sral(vector unsigned long long __a, vector unsigned int __b) { - return (vector unsigned long long)__builtin_s390_vsra( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_sral(__vector unsigned long long __a, __vector unsigned int __b) { + return (__vector unsigned long long)__builtin_s390_vsra( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_srab ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_srab(vector signed char __a, vector signed char __b) { - return (vector signed char)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_srab(__vector signed char __a, __vector signed char __b) { + return (__vector signed char)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed char -vec_srab(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vsrab( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_srab(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vsrab( + (__vector unsigned char)__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_srab(vector unsigned char __a, vector signed char __b) { - return __builtin_s390_vsrab(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_srab(__vector unsigned char __a, __vector signed char __b) { + return __builtin_s390_vsrab(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_srab(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_srab(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsrab(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_srab(vector signed short __a, vector signed short __b) { - return (vector signed short)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srab(__vector signed short __a, __vector signed short __b) { + return (__vector signed short)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_srab(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srab(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_srab(vector unsigned short __a, vector signed short __b) { - return (vector unsigned short)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srab(__vector unsigned short __a, __vector signed short __b) { + return (__vector unsigned short)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_srab(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srab(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_srab(vector signed int __a, vector signed int __b) { - return (vector signed int)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srab(__vector signed int __a, __vector signed int __b) { + return (__vector signed int)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_srab(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srab(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_srab(vector unsigned int __a, vector signed int __b) { - return (vector unsigned int)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srab(__vector unsigned int __a, __vector signed int __b) { + return (__vector unsigned int)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_srab(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srab(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_srab(vector signed long long __a, vector signed long long __b) { - return (vector signed long long)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srab(__vector signed long long __a, __vector signed long long __b) { + return (__vector signed long long)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_srab(vector signed long long __a, vector unsigned long long __b) { - return (vector signed long long)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srab(__vector signed long long __a, __vector unsigned long long __b) { + return (__vector signed long long)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_srab(vector unsigned long long __a, vector signed long long __b) { - return (vector unsigned long long)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srab(__vector unsigned long long __a, __vector signed long long __b) { + return (__vector unsigned long long)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_srab(vector unsigned long long __a, vector unsigned long long __b) { - return (vector unsigned long long)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srab(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector unsigned long long)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_srab(vector float __a, vector signed int __b) { - return (vector float)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_srab(__vector float __a, __vector signed int __b) { + return (__vector float)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector float -vec_srab(vector float __a, vector unsigned int __b) { - return (vector float)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_srab(__vector float __a, __vector unsigned int __b) { + return (__vector float)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #endif -static inline __ATTRS_o_ai vector double -vec_srab(vector double __a, vector signed long long __b) { - return (vector double)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_srab(__vector double __a, __vector signed long long __b) { + return (__vector double)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector double -vec_srab(vector double __a, vector unsigned long long __b) { - return (vector double)__builtin_s390_vsrab( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_srab(__vector double __a, __vector unsigned long long __b) { + return (__vector double)__builtin_s390_vsrab( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_srl ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_srl(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_srl(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_srl(vector signed char __a, vector unsigned short __b) { - return (vector signed char)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_srl(__vector signed char __a, __vector unsigned short __b) { + return (__vector signed char)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_srl(vector signed char __a, vector unsigned int __b) { - return (vector signed char)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_srl(__vector signed char __a, __vector unsigned int __b) { + return (__vector signed char)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_srl(vector bool char __a, vector unsigned char __b) { - return (vector bool char)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool char +vec_srl(__vector __bool char __a, __vector unsigned char __b) { + return (__vector __bool char)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_srl(vector bool char __a, vector unsigned short __b) { - return (vector bool char)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_srl(__vector __bool char __a, __vector unsigned short __b) { + return (__vector __bool char)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool char -vec_srl(vector bool char __a, vector unsigned int __b) { - return (vector bool char)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool char +vec_srl(__vector __bool char __a, __vector unsigned int __b) { + return (__vector __bool char)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_srl(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_srl(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsrl(__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_srl(vector unsigned char __a, vector unsigned short __b) { - return __builtin_s390_vsrl(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_srl(__vector unsigned char __a, __vector unsigned short __b) { + return __builtin_s390_vsrl(__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_srl(vector unsigned char __a, vector unsigned int __b) { - return __builtin_s390_vsrl(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_srl(__vector unsigned char __a, __vector unsigned int __b) { + return __builtin_s390_vsrl(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_srl(vector signed short __a, vector unsigned char __b) { - return (vector signed short)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed short +vec_srl(__vector signed short __a, __vector unsigned char __b) { + return (__vector signed short)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_srl(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srl(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_srl(vector signed short __a, vector unsigned int __b) { - return (vector signed short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srl(__vector signed short __a, __vector unsigned int __b) { + return (__vector signed short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_srl(vector bool short __a, vector unsigned char __b) { - return (vector bool short)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool short +vec_srl(__vector __bool short __a, __vector unsigned char __b) { + return (__vector __bool short)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_srl(vector bool short __a, vector unsigned short __b) { - return (vector bool short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_srl(__vector __bool short __a, __vector unsigned short __b) { + return (__vector __bool short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool short -vec_srl(vector bool short __a, vector unsigned int __b) { - return (vector bool short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool short +vec_srl(__vector __bool short __a, __vector unsigned int __b) { + return (__vector __bool short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_srl(vector unsigned short __a, vector unsigned char __b) { - return (vector unsigned short)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srl(__vector unsigned short __a, __vector unsigned char __b) { + return (__vector unsigned short)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_srl(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srl(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_srl(vector unsigned short __a, vector unsigned int __b) { - return (vector unsigned short)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srl(__vector unsigned short __a, __vector unsigned int __b) { + return (__vector unsigned short)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_srl(vector signed int __a, vector unsigned char __b) { - return (vector signed int)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed int +vec_srl(__vector signed int __a, __vector unsigned char __b) { + return (__vector signed int)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_srl(vector signed int __a, vector unsigned short __b) { - return (vector signed int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srl(__vector signed int __a, __vector unsigned short __b) { + return (__vector signed int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_srl(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srl(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_srl(vector bool int __a, vector unsigned char __b) { - return (vector bool int)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool int +vec_srl(__vector __bool int __a, __vector unsigned char __b) { + return (__vector __bool int)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_srl(vector bool int __a, vector unsigned short __b) { - return (vector bool int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_srl(__vector __bool int __a, __vector unsigned short __b) { + return (__vector __bool int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool int -vec_srl(vector bool int __a, vector unsigned int __b) { - return (vector bool int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool int +vec_srl(__vector __bool int __a, __vector unsigned int __b) { + return (__vector __bool int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_srl(vector unsigned int __a, vector unsigned char __b) { - return (vector unsigned int)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srl(__vector unsigned int __a, __vector unsigned char __b) { + return (__vector unsigned int)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_srl(vector unsigned int __a, vector unsigned short __b) { - return (vector unsigned int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srl(__vector unsigned int __a, __vector unsigned short __b) { + return (__vector unsigned int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_srl(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srl(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_srl(vector signed long long __a, vector unsigned char __b) { - return (vector signed long long)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed long long +vec_srl(__vector signed long long __a, __vector unsigned char __b) { + return (__vector signed long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_srl(vector signed long long __a, vector unsigned short __b) { - return (vector signed long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srl(__vector signed long long __a, __vector unsigned short __b) { + return (__vector signed long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_srl(vector signed long long __a, vector unsigned int __b) { - return (vector signed long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srl(__vector signed long long __a, __vector unsigned int __b) { + return (__vector signed long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_srl(vector bool long long __a, vector unsigned char __b) { - return (vector bool long long)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector __bool long long +vec_srl(__vector __bool long long __a, __vector unsigned char __b) { + return (__vector __bool long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_srl(vector bool long long __a, vector unsigned short __b) { - return (vector bool long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_srl(__vector __bool long long __a, __vector unsigned short __b) { + return (__vector __bool long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector bool long long -vec_srl(vector bool long long __a, vector unsigned int __b) { - return (vector bool long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector __bool long long +vec_srl(__vector __bool long long __a, __vector unsigned int __b) { + return (__vector __bool long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_srl(vector unsigned long long __a, vector unsigned char __b) { - return (vector unsigned long long)__builtin_s390_vsrl( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srl(__vector unsigned long long __a, __vector unsigned char __b) { + return (__vector unsigned long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, __b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_srl(vector unsigned long long __a, vector unsigned short __b) { - return (vector unsigned long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srl(__vector unsigned long long __a, __vector unsigned short __b) { + return (__vector unsigned long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_srl(vector unsigned long long __a, vector unsigned int __b) { - return (vector unsigned long long)__builtin_s390_vsrl( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srl(__vector unsigned long long __a, __vector unsigned int __b) { + return (__vector unsigned long long)__builtin_s390_vsrl( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_srb ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_srb(vector signed char __a, vector signed char __b) { - return (vector signed char)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_srb(__vector signed char __a, __vector signed char __b) { + return (__vector signed char)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed char -vec_srb(vector signed char __a, vector unsigned char __b) { - return (vector signed char)__builtin_s390_vsrlb( - (vector unsigned char)__a, __b); +static inline __ATTRS_o_ai __vector signed char +vec_srb(__vector signed char __a, __vector unsigned char __b) { + return (__vector signed char)__builtin_s390_vsrlb( + (__vector unsigned char)__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_srb(vector unsigned char __a, vector signed char __b) { - return __builtin_s390_vsrlb(__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_srb(__vector unsigned char __a, __vector signed char __b) { + return __builtin_s390_vsrlb(__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_srb(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_srb(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsrlb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_srb(vector signed short __a, vector signed short __b) { - return (vector signed short)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srb(__vector signed short __a, __vector signed short __b) { + return (__vector signed short)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed short -vec_srb(vector signed short __a, vector unsigned short __b) { - return (vector signed short)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed short +vec_srb(__vector signed short __a, __vector unsigned short __b) { + return (__vector signed short)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_srb(vector unsigned short __a, vector signed short __b) { - return (vector unsigned short)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srb(__vector unsigned short __a, __vector signed short __b) { + return (__vector unsigned short)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_srb(vector unsigned short __a, vector unsigned short __b) { - return (vector unsigned short)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_srb(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector unsigned short)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_srb(vector signed int __a, vector signed int __b) { - return (vector signed int)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srb(__vector signed int __a, __vector signed int __b) { + return (__vector signed int)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed int -vec_srb(vector signed int __a, vector unsigned int __b) { - return (vector signed int)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed int +vec_srb(__vector signed int __a, __vector unsigned int __b) { + return (__vector signed int)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_srb(vector unsigned int __a, vector signed int __b) { - return (vector unsigned int)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srb(__vector unsigned int __a, __vector signed int __b) { + return (__vector unsigned int)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_srb(vector unsigned int __a, vector unsigned int __b) { - return (vector unsigned int)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_srb(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector unsigned int)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_srb(vector signed long long __a, vector signed long long __b) { - return (vector signed long long)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srb(__vector signed long long __a, __vector signed long long __b) { + return (__vector signed long long)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector signed long long -vec_srb(vector signed long long __a, vector unsigned long long __b) { - return (vector signed long long)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed long long +vec_srb(__vector signed long long __a, __vector unsigned long long __b) { + return (__vector signed long long)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_srb(vector unsigned long long __a, vector signed long long __b) { - return (vector unsigned long long)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srb(__vector unsigned long long __a, __vector signed long long __b) { + return (__vector unsigned long long)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_srb(vector unsigned long long __a, vector unsigned long long __b) { - return (vector unsigned long long)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned long long +vec_srb(__vector unsigned long long __a, __vector unsigned long long __b) { + return (__vector unsigned long long)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_srb(vector float __a, vector signed int __b) { - return (vector float)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_srb(__vector float __a, __vector signed int __b) { + return (__vector float)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector float -vec_srb(vector float __a, vector unsigned int __b) { - return (vector float)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector float +vec_srb(__vector float __a, __vector unsigned int __b) { + return (__vector float)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } #endif -static inline __ATTRS_o_ai vector double -vec_srb(vector double __a, vector signed long long __b) { - return (vector double)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_srb(__vector double __a, __vector signed long long __b) { + return (__vector double)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector double -vec_srb(vector double __a, vector unsigned long long __b) { - return (vector double)__builtin_s390_vsrlb( - (vector unsigned char)__a, (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector double +vec_srb(__vector double __a, __vector unsigned long long __b) { + return (__vector double)__builtin_s390_vsrlb( + (__vector unsigned char)__a, (__vector unsigned char)__b); } /*-- vec_srdb ---------------------------------------------------------------*/ #if __ARCH__ >= 13 -extern __ATTRS_o vector signed char -vec_srdb(vector signed char __a, vector signed char __b, int __c) +extern __ATTRS_o __vector signed char +vec_srdb(__vector signed char __a, __vector signed char __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned char -vec_srdb(vector unsigned char __a, vector unsigned char __b, int __c) +extern __ATTRS_o __vector unsigned char +vec_srdb(__vector unsigned char __a, __vector unsigned char __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed short -vec_srdb(vector signed short __a, vector signed short __b, int __c) +extern __ATTRS_o __vector signed short +vec_srdb(__vector signed short __a, __vector signed short __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned short -vec_srdb(vector unsigned short __a, vector unsigned short __b, int __c) +extern __ATTRS_o __vector unsigned short +vec_srdb(__vector unsigned short __a, __vector unsigned short __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed int -vec_srdb(vector signed int __a, vector signed int __b, int __c) +extern __ATTRS_o __vector signed int +vec_srdb(__vector signed int __a, __vector signed int __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned int -vec_srdb(vector unsigned int __a, vector unsigned int __b, int __c) +extern __ATTRS_o __vector unsigned int +vec_srdb(__vector unsigned int __a, __vector unsigned int __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector signed long long -vec_srdb(vector signed long long __a, vector signed long long __b, int __c) +extern __ATTRS_o __vector signed long long +vec_srdb(__vector signed long long __a, __vector signed long long __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector unsigned long long -vec_srdb(vector unsigned long long __a, vector unsigned long long __b, int __c) +extern __ATTRS_o __vector unsigned long long +vec_srdb(__vector unsigned long long __a, __vector unsigned long long __b, + int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector float -vec_srdb(vector float __a, vector float __b, int __c) +extern __ATTRS_o __vector float +vec_srdb(__vector float __a, __vector float __b, int __c) __constant_range(__c, 0, 7); -extern __ATTRS_o vector double -vec_srdb(vector double __a, vector double __b, int __c) +extern __ATTRS_o __vector double +vec_srdb(__vector double __a, __vector double __b, int __c) __constant_range(__c, 0, 7); #define vec_srdb(X, Y, Z) ((__typeof__((vec_srdb)((X), (Y), (Z)))) \ - __builtin_s390_vsrd((vector unsigned char)(X), \ - (vector unsigned char)(Y), (Z))) + __builtin_s390_vsrd((__vector unsigned char)(X), \ + (__vector unsigned char)(Y), (Z))) #endif /*-- vec_abs ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_abs(vector signed char __a) { - return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed char)0)); +static inline __ATTRS_o_ai __vector signed char +vec_abs(__vector signed char __a) { + return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed char)0)); } -static inline __ATTRS_o_ai vector signed short -vec_abs(vector signed short __a) { - return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed short)0)); +static inline __ATTRS_o_ai __vector signed short +vec_abs(__vector signed short __a) { + return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed short)0)); } -static inline __ATTRS_o_ai vector signed int -vec_abs(vector signed int __a) { - return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed int)0)); +static inline __ATTRS_o_ai __vector signed int +vec_abs(__vector signed int __a) { + return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed int)0)); } -static inline __ATTRS_o_ai vector signed long long -vec_abs(vector signed long long __a) { - return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed long long)0)); +static inline __ATTRS_o_ai __vector signed long long +vec_abs(__vector signed long long __a) { + return vec_sel(__a, -__a, vec_cmplt(__a, (__vector signed long long)0)); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_abs(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_abs(__vector float __a) { return __builtin_s390_vflpsb(__a); } #endif -static inline __ATTRS_o_ai vector double -vec_abs(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_abs(__vector double __a) { return __builtin_s390_vflpdb(__a); } /*-- vec_nabs ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_nabs(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_nabs(__vector float __a) { return __builtin_s390_vflnsb(__a); } #endif -static inline __ATTRS_o_ai vector double -vec_nabs(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_nabs(__vector double __a) { return __builtin_s390_vflndb(__a); } /*-- vec_max ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_max(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_max(__vector signed char __a, __vector signed char __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_max(vector signed char __a, vector bool char __b) { - vector signed char __bc = (vector signed char)__b; +static inline __ATTRS_o_ai __vector signed char +vec_max(__vector signed char __a, __vector __bool char __b) { + __vector signed char __bc = (__vector signed char)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_max(vector bool char __a, vector signed char __b) { - vector signed char __ac = (vector signed char)__a; +static inline __ATTRS_o_ai __vector signed char +vec_max(__vector __bool char __a, __vector signed char __b) { + __vector signed char __ac = (__vector signed char)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned char -vec_max(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_max(__vector unsigned char __a, __vector unsigned char __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_max(vector unsigned char __a, vector bool char __b) { - vector unsigned char __bc = (vector unsigned char)__b; +static inline __ATTRS_o_ai __vector unsigned char +vec_max(__vector unsigned char __a, __vector __bool char __b) { + __vector unsigned char __bc = (__vector unsigned char)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_max(vector bool char __a, vector unsigned char __b) { - vector unsigned char __ac = (vector unsigned char)__a; +static inline __ATTRS_o_ai __vector unsigned char +vec_max(__vector __bool char __a, __vector unsigned char __b) { + __vector unsigned char __ac = (__vector unsigned char)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed short -vec_max(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_max(__vector signed short __a, __vector signed short __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_max(vector signed short __a, vector bool short __b) { - vector signed short __bc = (vector signed short)__b; +static inline __ATTRS_o_ai __vector signed short +vec_max(__vector signed short __a, __vector __bool short __b) { + __vector signed short __bc = (__vector signed short)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_max(vector bool short __a, vector signed short __b) { - vector signed short __ac = (vector signed short)__a; +static inline __ATTRS_o_ai __vector signed short +vec_max(__vector __bool short __a, __vector signed short __b) { + __vector signed short __ac = (__vector signed short)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned short -vec_max(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_max(__vector unsigned short __a, __vector unsigned short __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_max(vector unsigned short __a, vector bool short __b) { - vector unsigned short __bc = (vector unsigned short)__b; +static inline __ATTRS_o_ai __vector unsigned short +vec_max(__vector unsigned short __a, __vector __bool short __b) { + __vector unsigned short __bc = (__vector unsigned short)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_max(vector bool short __a, vector unsigned short __b) { - vector unsigned short __ac = (vector unsigned short)__a; +static inline __ATTRS_o_ai __vector unsigned short +vec_max(__vector __bool short __a, __vector unsigned short __b) { + __vector unsigned short __ac = (__vector unsigned short)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed int -vec_max(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_max(__vector signed int __a, __vector signed int __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_max(vector signed int __a, vector bool int __b) { - vector signed int __bc = (vector signed int)__b; +static inline __ATTRS_o_ai __vector signed int +vec_max(__vector signed int __a, __vector __bool int __b) { + __vector signed int __bc = (__vector signed int)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_max(vector bool int __a, vector signed int __b) { - vector signed int __ac = (vector signed int)__a; +static inline __ATTRS_o_ai __vector signed int +vec_max(__vector __bool int __a, __vector signed int __b) { + __vector signed int __ac = (__vector signed int)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned int -vec_max(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_max(__vector unsigned int __a, __vector unsigned int __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_max(vector unsigned int __a, vector bool int __b) { - vector unsigned int __bc = (vector unsigned int)__b; +static inline __ATTRS_o_ai __vector unsigned int +vec_max(__vector unsigned int __a, __vector __bool int __b) { + __vector unsigned int __bc = (__vector unsigned int)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_max(vector bool int __a, vector unsigned int __b) { - vector unsigned int __ac = (vector unsigned int)__a; +static inline __ATTRS_o_ai __vector unsigned int +vec_max(__vector __bool int __a, __vector unsigned int __b) { + __vector unsigned int __ac = (__vector unsigned int)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed long long -vec_max(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_max(__vector signed long long __a, __vector signed long long __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_max(vector signed long long __a, vector bool long long __b) { - vector signed long long __bc = (vector signed long long)__b; +static inline __ATTRS_o_ai __vector signed long long +vec_max(__vector signed long long __a, __vector __bool long long __b) { + __vector signed long long __bc = (__vector signed long long)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_max(vector bool long long __a, vector signed long long __b) { - vector signed long long __ac = (vector signed long long)__a; +static inline __ATTRS_o_ai __vector signed long long +vec_max(__vector __bool long long __a, __vector signed long long __b) { + __vector signed long long __ac = (__vector signed long long)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned long long -vec_max(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_max(__vector unsigned long long __a, __vector unsigned long long __b) { return vec_sel(__b, __a, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_max(vector unsigned long long __a, vector bool long long __b) { - vector unsigned long long __bc = (vector unsigned long long)__b; +static inline __ATTRS_o_ai __vector unsigned long long +vec_max(__vector unsigned long long __a, __vector __bool long long __b) { + __vector unsigned long long __bc = (__vector unsigned long long)__b; return vec_sel(__bc, __a, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_max(vector bool long long __a, vector unsigned long long __b) { - vector unsigned long long __ac = (vector unsigned long long)__a; +static inline __ATTRS_o_ai __vector unsigned long long +vec_max(__vector __bool long long __a, __vector unsigned long long __b) { + __vector unsigned long long __ac = (__vector unsigned long long)__a; return vec_sel(__b, __ac, vec_cmpgt(__ac, __b)); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_max(vector float __a, vector float __b) { +static inline __ATTRS_o_ai __vector float +vec_max(__vector float __a, __vector float __b) { return __builtin_s390_vfmaxsb(__a, __b, 0); } #endif -static inline __ATTRS_o_ai vector double -vec_max(vector double __a, vector double __b) { +static inline __ATTRS_o_ai __vector double +vec_max(__vector double __a, __vector double __b) { #if __ARCH__ >= 12 return __builtin_s390_vfmaxdb(__a, __b, 0); #else @@ -8020,167 +8092,167 @@ vec_max(vector double __a, vector double __b) { /*-- vec_min ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_min(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_min(__vector signed char __a, __vector signed char __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_min(vector signed char __a, vector bool char __b) { - vector signed char __bc = (vector signed char)__b; +static inline __ATTRS_o_ai __vector signed char +vec_min(__vector signed char __a, __vector __bool char __b) { + __vector signed char __bc = (__vector signed char)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed char -vec_min(vector bool char __a, vector signed char __b) { - vector signed char __ac = (vector signed char)__a; +static inline __ATTRS_o_ai __vector signed char +vec_min(__vector __bool char __a, __vector signed char __b) { + __vector signed char __ac = (__vector signed char)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned char -vec_min(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_min(__vector unsigned char __a, __vector unsigned char __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_min(vector unsigned char __a, vector bool char __b) { - vector unsigned char __bc = (vector unsigned char)__b; +static inline __ATTRS_o_ai __vector unsigned char +vec_min(__vector unsigned char __a, __vector __bool char __b) { + __vector unsigned char __bc = (__vector unsigned char)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned char -vec_min(vector bool char __a, vector unsigned char __b) { - vector unsigned char __ac = (vector unsigned char)__a; +static inline __ATTRS_o_ai __vector unsigned char +vec_min(__vector __bool char __a, __vector unsigned char __b) { + __vector unsigned char __ac = (__vector unsigned char)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed short -vec_min(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_min(__vector signed short __a, __vector signed short __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_min(vector signed short __a, vector bool short __b) { - vector signed short __bc = (vector signed short)__b; +static inline __ATTRS_o_ai __vector signed short +vec_min(__vector signed short __a, __vector __bool short __b) { + __vector signed short __bc = (__vector signed short)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed short -vec_min(vector bool short __a, vector signed short __b) { - vector signed short __ac = (vector signed short)__a; +static inline __ATTRS_o_ai __vector signed short +vec_min(__vector __bool short __a, __vector signed short __b) { + __vector signed short __ac = (__vector signed short)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned short -vec_min(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_min(__vector unsigned short __a, __vector unsigned short __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_min(vector unsigned short __a, vector bool short __b) { - vector unsigned short __bc = (vector unsigned short)__b; +static inline __ATTRS_o_ai __vector unsigned short +vec_min(__vector unsigned short __a, __vector __bool short __b) { + __vector unsigned short __bc = (__vector unsigned short)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned short -vec_min(vector bool short __a, vector unsigned short __b) { - vector unsigned short __ac = (vector unsigned short)__a; +static inline __ATTRS_o_ai __vector unsigned short +vec_min(__vector __bool short __a, __vector unsigned short __b) { + __vector unsigned short __ac = (__vector unsigned short)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed int -vec_min(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_min(__vector signed int __a, __vector signed int __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_min(vector signed int __a, vector bool int __b) { - vector signed int __bc = (vector signed int)__b; +static inline __ATTRS_o_ai __vector signed int +vec_min(__vector signed int __a, __vector __bool int __b) { + __vector signed int __bc = (__vector signed int)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed int -vec_min(vector bool int __a, vector signed int __b) { - vector signed int __ac = (vector signed int)__a; +static inline __ATTRS_o_ai __vector signed int +vec_min(__vector __bool int __a, __vector signed int __b) { + __vector signed int __ac = (__vector signed int)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned int -vec_min(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_min(__vector unsigned int __a, __vector unsigned int __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_min(vector unsigned int __a, vector bool int __b) { - vector unsigned int __bc = (vector unsigned int)__b; +static inline __ATTRS_o_ai __vector unsigned int +vec_min(__vector unsigned int __a, __vector __bool int __b) { + __vector unsigned int __bc = (__vector unsigned int)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned int -vec_min(vector bool int __a, vector unsigned int __b) { - vector unsigned int __ac = (vector unsigned int)__a; +static inline __ATTRS_o_ai __vector unsigned int +vec_min(__vector __bool int __a, __vector unsigned int __b) { + __vector unsigned int __ac = (__vector unsigned int)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector signed long long -vec_min(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_min(__vector signed long long __a, __vector signed long long __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_min(vector signed long long __a, vector bool long long __b) { - vector signed long long __bc = (vector signed long long)__b; +static inline __ATTRS_o_ai __vector signed long long +vec_min(__vector signed long long __a, __vector __bool long long __b) { + __vector signed long long __bc = (__vector signed long long)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_min(vector bool long long __a, vector signed long long __b) { - vector signed long long __ac = (vector signed long long)__a; +static inline __ATTRS_o_ai __vector signed long long +vec_min(__vector __bool long long __a, __vector signed long long __b) { + __vector signed long long __ac = (__vector signed long long)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } -static inline __ATTRS_o_ai vector unsigned long long -vec_min(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_min(__vector unsigned long long __a, __vector unsigned long long __b) { return vec_sel(__a, __b, vec_cmpgt(__a, __b)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_min(vector unsigned long long __a, vector bool long long __b) { - vector unsigned long long __bc = (vector unsigned long long)__b; +static inline __ATTRS_o_ai __vector unsigned long long +vec_min(__vector unsigned long long __a, __vector __bool long long __b) { + __vector unsigned long long __bc = (__vector unsigned long long)__b; return vec_sel(__a, __bc, vec_cmpgt(__a, __bc)); } // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_min(vector bool long long __a, vector unsigned long long __b) { - vector unsigned long long __ac = (vector unsigned long long)__a; +static inline __ATTRS_o_ai __vector unsigned long long +vec_min(__vector __bool long long __a, __vector unsigned long long __b) { + __vector unsigned long long __ac = (__vector unsigned long long)__a; return vec_sel(__ac, __b, vec_cmpgt(__ac, __b)); } #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_min(vector float __a, vector float __b) { +static inline __ATTRS_o_ai __vector float +vec_min(__vector float __a, __vector float __b) { return __builtin_s390_vfminsb(__a, __b, 0); } #endif -static inline __ATTRS_o_ai vector double -vec_min(vector double __a, vector double __b) { +static inline __ATTRS_o_ai __vector double +vec_min(__vector double __a, __vector double __b) { #if __ARCH__ >= 12 return __builtin_s390_vfmindb(__a, __b, 0); #else @@ -8190,439 +8262,440 @@ vec_min(vector double __a, vector double __b) { /*-- vec_add_u128 -----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_add_u128(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_ai __vector unsigned char +vec_add_u128(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vaq(__a, __b); } /*-- vec_addc ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_addc(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_addc(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vaccb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_addc(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_addc(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vacch(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_addc(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_addc(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vaccf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_addc(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_addc(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vaccg(__a, __b); } /*-- vec_addc_u128 ----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_addc_u128(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_ai __vector unsigned char +vec_addc_u128(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vaccq(__a, __b); } /*-- vec_adde_u128 ----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_adde_u128(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_ai __vector unsigned char +vec_adde_u128(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vacq(__a, __b, __c); } /*-- vec_addec_u128 ---------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_addec_u128(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_ai __vector unsigned char +vec_addec_u128(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vacccq(__a, __b, __c); } /*-- vec_avg ----------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_avg(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_avg(__vector signed char __a, __vector signed char __b) { return __builtin_s390_vavgb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_avg(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_avg(__vector signed short __a, __vector signed short __b) { return __builtin_s390_vavgh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_avg(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_avg(__vector signed int __a, __vector signed int __b) { return __builtin_s390_vavgf(__a, __b); } -static inline __ATTRS_o_ai vector signed long long -vec_avg(vector signed long long __a, vector signed long long __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_avg(__vector signed long long __a, __vector signed long long __b) { return __builtin_s390_vavgg(__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_avg(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_avg(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vavglb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_avg(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_avg(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vavglh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_avg(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_avg(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vavglf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_avg(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_avg(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vavglg(__a, __b); } /*-- vec_checksum -----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned int -vec_checksum(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_ai __vector unsigned int +vec_checksum(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vcksm(__a, __b); } /*-- vec_gfmsum -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned short -vec_gfmsum(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_gfmsum(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vgfmb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_gfmsum(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_gfmsum(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vgfmh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_gfmsum(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_gfmsum(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vgfmf(__a, __b); } /*-- vec_gfmsum_128 ---------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_gfmsum_128(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_gfmsum_128(__vector unsigned long long __a, + __vector unsigned long long __b) { return __builtin_s390_vgfmg(__a, __b); } /*-- vec_gfmsum_accum -------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned short -vec_gfmsum_accum(vector unsigned char __a, vector unsigned char __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_gfmsum_accum(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned short __c) { return __builtin_s390_vgfmab(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned int -vec_gfmsum_accum(vector unsigned short __a, vector unsigned short __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_gfmsum_accum(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned int __c) { return __builtin_s390_vgfmah(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned long long -vec_gfmsum_accum(vector unsigned int __a, vector unsigned int __b, - vector unsigned long long __c) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_gfmsum_accum(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned long long __c) { return __builtin_s390_vgfmaf(__a, __b, __c); } /*-- vec_gfmsum_accum_128 ---------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_gfmsum_accum_128(vector unsigned long long __a, - vector unsigned long long __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_gfmsum_accum_128(__vector unsigned long long __a, + __vector unsigned long long __b, + __vector unsigned char __c) { return __builtin_s390_vgfmag(__a, __b, __c); } /*-- vec_mladd --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_mladd(vector signed char __a, vector signed char __b, - vector signed char __c) { +static inline __ATTRS_o_ai __vector signed char +vec_mladd(__vector signed char __a, __vector signed char __b, + __vector signed char __c) { return __a * __b + __c; } -static inline __ATTRS_o_ai vector signed char -vec_mladd(vector unsigned char __a, vector signed char __b, - vector signed char __c) { - return (vector signed char)__a * __b + __c; +static inline __ATTRS_o_ai __vector signed char +vec_mladd(__vector unsigned char __a, __vector signed char __b, + __vector signed char __c) { + return (__vector signed char)__a * __b + __c; } -static inline __ATTRS_o_ai vector signed char -vec_mladd(vector signed char __a, vector unsigned char __b, - vector unsigned char __c) { - return __a * (vector signed char)__b + (vector signed char)__c; +static inline __ATTRS_o_ai __vector signed char +vec_mladd(__vector signed char __a, __vector unsigned char __b, + __vector unsigned char __c) { + return __a * (__vector signed char)__b + (__vector signed char)__c; } -static inline __ATTRS_o_ai vector unsigned char -vec_mladd(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_mladd(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __a * __b + __c; } -static inline __ATTRS_o_ai vector signed short -vec_mladd(vector signed short __a, vector signed short __b, - vector signed short __c) { +static inline __ATTRS_o_ai __vector signed short +vec_mladd(__vector signed short __a, __vector signed short __b, + __vector signed short __c) { return __a * __b + __c; } -static inline __ATTRS_o_ai vector signed short -vec_mladd(vector unsigned short __a, vector signed short __b, - vector signed short __c) { - return (vector signed short)__a * __b + __c; +static inline __ATTRS_o_ai __vector signed short +vec_mladd(__vector unsigned short __a, __vector signed short __b, + __vector signed short __c) { + return (__vector signed short)__a * __b + __c; } -static inline __ATTRS_o_ai vector signed short -vec_mladd(vector signed short __a, vector unsigned short __b, - vector unsigned short __c) { - return __a * (vector signed short)__b + (vector signed short)__c; +static inline __ATTRS_o_ai __vector signed short +vec_mladd(__vector signed short __a, __vector unsigned short __b, + __vector unsigned short __c) { + return __a * (__vector signed short)__b + (__vector signed short)__c; } -static inline __ATTRS_o_ai vector unsigned short -vec_mladd(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_mladd(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __a * __b + __c; } -static inline __ATTRS_o_ai vector signed int -vec_mladd(vector signed int __a, vector signed int __b, - vector signed int __c) { +static inline __ATTRS_o_ai __vector signed int +vec_mladd(__vector signed int __a, __vector signed int __b, + __vector signed int __c) { return __a * __b + __c; } -static inline __ATTRS_o_ai vector signed int -vec_mladd(vector unsigned int __a, vector signed int __b, - vector signed int __c) { - return (vector signed int)__a * __b + __c; +static inline __ATTRS_o_ai __vector signed int +vec_mladd(__vector unsigned int __a, __vector signed int __b, + __vector signed int __c) { + return (__vector signed int)__a * __b + __c; } -static inline __ATTRS_o_ai vector signed int -vec_mladd(vector signed int __a, vector unsigned int __b, - vector unsigned int __c) { - return __a * (vector signed int)__b + (vector signed int)__c; +static inline __ATTRS_o_ai __vector signed int +vec_mladd(__vector signed int __a, __vector unsigned int __b, + __vector unsigned int __c) { + return __a * (__vector signed int)__b + (__vector signed int)__c; } -static inline __ATTRS_o_ai vector unsigned int -vec_mladd(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_mladd(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __a * __b + __c; } /*-- vec_mhadd --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_mhadd(vector signed char __a, vector signed char __b, - vector signed char __c) { +static inline __ATTRS_o_ai __vector signed char +vec_mhadd(__vector signed char __a, __vector signed char __b, + __vector signed char __c) { return __builtin_s390_vmahb(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned char -vec_mhadd(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_mhadd(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vmalhb(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed short -vec_mhadd(vector signed short __a, vector signed short __b, - vector signed short __c) { +static inline __ATTRS_o_ai __vector signed short +vec_mhadd(__vector signed short __a, __vector signed short __b, + __vector signed short __c) { return __builtin_s390_vmahh(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned short -vec_mhadd(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_mhadd(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __builtin_s390_vmalhh(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed int -vec_mhadd(vector signed int __a, vector signed int __b, - vector signed int __c) { +static inline __ATTRS_o_ai __vector signed int +vec_mhadd(__vector signed int __a, __vector signed int __b, + __vector signed int __c) { return __builtin_s390_vmahf(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned int -vec_mhadd(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_mhadd(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __builtin_s390_vmalhf(__a, __b, __c); } /*-- vec_meadd --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_meadd(vector signed char __a, vector signed char __b, - vector signed short __c) { +static inline __ATTRS_o_ai __vector signed short +vec_meadd(__vector signed char __a, __vector signed char __b, + __vector signed short __c) { return __builtin_s390_vmaeb(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned short -vec_meadd(vector unsigned char __a, vector unsigned char __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_meadd(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned short __c) { return __builtin_s390_vmaleb(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed int -vec_meadd(vector signed short __a, vector signed short __b, - vector signed int __c) { +static inline __ATTRS_o_ai __vector signed int +vec_meadd(__vector signed short __a, __vector signed short __b, + __vector signed int __c) { return __builtin_s390_vmaeh(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned int -vec_meadd(vector unsigned short __a, vector unsigned short __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_meadd(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned int __c) { return __builtin_s390_vmaleh(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed long long -vec_meadd(vector signed int __a, vector signed int __b, - vector signed long long __c) { +static inline __ATTRS_o_ai __vector signed long long +vec_meadd(__vector signed int __a, __vector signed int __b, + __vector signed long long __c) { return __builtin_s390_vmaef(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned long long -vec_meadd(vector unsigned int __a, vector unsigned int __b, - vector unsigned long long __c) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_meadd(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned long long __c) { return __builtin_s390_vmalef(__a, __b, __c); } /*-- vec_moadd --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_moadd(vector signed char __a, vector signed char __b, - vector signed short __c) { +static inline __ATTRS_o_ai __vector signed short +vec_moadd(__vector signed char __a, __vector signed char __b, + __vector signed short __c) { return __builtin_s390_vmaob(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned short -vec_moadd(vector unsigned char __a, vector unsigned char __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_moadd(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned short __c) { return __builtin_s390_vmalob(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed int -vec_moadd(vector signed short __a, vector signed short __b, - vector signed int __c) { +static inline __ATTRS_o_ai __vector signed int +vec_moadd(__vector signed short __a, __vector signed short __b, + __vector signed int __c) { return __builtin_s390_vmaoh(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned int -vec_moadd(vector unsigned short __a, vector unsigned short __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_moadd(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned int __c) { return __builtin_s390_vmaloh(__a, __b, __c); } -static inline __ATTRS_o_ai vector signed long long -vec_moadd(vector signed int __a, vector signed int __b, - vector signed long long __c) { +static inline __ATTRS_o_ai __vector signed long long +vec_moadd(__vector signed int __a, __vector signed int __b, + __vector signed long long __c) { return __builtin_s390_vmaof(__a, __b, __c); } -static inline __ATTRS_o_ai vector unsigned long long -vec_moadd(vector unsigned int __a, vector unsigned int __b, - vector unsigned long long __c) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_moadd(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned long long __c) { return __builtin_s390_vmalof(__a, __b, __c); } /*-- vec_mulh ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_mulh(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed char +vec_mulh(__vector signed char __a, __vector signed char __b) { return __builtin_s390_vmhb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_mulh(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_mulh(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vmlhb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_mulh(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed short +vec_mulh(__vector signed short __a, __vector signed short __b) { return __builtin_s390_vmhh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_mulh(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_mulh(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vmlhh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_mulh(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed int +vec_mulh(__vector signed int __a, __vector signed int __b) { return __builtin_s390_vmhf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_mulh(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_mulh(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vmlhf(__a, __b); } /*-- vec_mule ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_mule(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed short +vec_mule(__vector signed char __a, __vector signed char __b) { return __builtin_s390_vmeb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_mule(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_mule(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vmleb(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_mule(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed int +vec_mule(__vector signed short __a, __vector signed short __b) { return __builtin_s390_vmeh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_mule(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_mule(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vmleh(__a, __b); } -static inline __ATTRS_o_ai vector signed long long -vec_mule(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_mule(__vector signed int __a, __vector signed int __b) { return __builtin_s390_vmef(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_mule(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_mule(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vmlef(__a, __b); } /*-- vec_mulo ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed short -vec_mulo(vector signed char __a, vector signed char __b) { +static inline __ATTRS_o_ai __vector signed short +vec_mulo(__vector signed char __a, __vector signed char __b) { return __builtin_s390_vmob(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_mulo(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_mulo(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vmlob(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_mulo(vector signed short __a, vector signed short __b) { +static inline __ATTRS_o_ai __vector signed int +vec_mulo(__vector signed short __a, __vector signed short __b) { return __builtin_s390_vmoh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_mulo(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_mulo(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vmloh(__a, __b); } -static inline __ATTRS_o_ai vector signed long long -vec_mulo(vector signed int __a, vector signed int __b) { +static inline __ATTRS_o_ai __vector signed long long +vec_mulo(__vector signed int __a, __vector signed int __b) { return __builtin_s390_vmof(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_mulo(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_mulo(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vmlof(__a, __b); } @@ -8630,198 +8703,199 @@ vec_mulo(vector unsigned int __a, vector unsigned int __b) { #if __ARCH__ >= 12 #define vec_msum_u128(X, Y, Z, W) \ - ((vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W))); + ((__vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W))); #endif /*-- vec_sub_u128 -----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_sub_u128(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_ai __vector unsigned char +vec_sub_u128(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsq(__a, __b); } /*-- vec_subc ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_subc(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_subc(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vscbib(__a, __b); } -static inline __ATTRS_o_ai vector unsigned short -vec_subc(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_subc(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vscbih(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_subc(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_subc(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vscbif(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_subc(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_subc(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vscbig(__a, __b); } /*-- vec_subc_u128 ----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_subc_u128(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_ai __vector unsigned char +vec_subc_u128(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vscbiq(__a, __b); } /*-- vec_sube_u128 ----------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_sube_u128(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_ai __vector unsigned char +vec_sube_u128(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vsbiq(__a, __b, __c); } /*-- vec_subec_u128 ---------------------------------------------------------*/ -static inline __ATTRS_ai vector unsigned char -vec_subec_u128(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_ai __vector unsigned char +vec_subec_u128(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vsbcbiq(__a, __b, __c); } /*-- vec_sum2 ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned long long -vec_sum2(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_sum2(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vsumgh(__a, __b); } -static inline __ATTRS_o_ai vector unsigned long long -vec_sum2(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned long long +vec_sum2(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vsumgf(__a, __b); } /*-- vec_sum_u128 -----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_sum_u128(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_sum_u128(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vsumqf(__a, __b); } -static inline __ATTRS_o_ai vector unsigned char -vec_sum_u128(vector unsigned long long __a, vector unsigned long long __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_sum_u128(__vector unsigned long long __a, __vector unsigned long long __b) { return __builtin_s390_vsumqg(__a, __b); } /*-- vec_sum4 ---------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned int -vec_sum4(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_sum4(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vsumb(__a, __b); } -static inline __ATTRS_o_ai vector unsigned int -vec_sum4(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_sum4(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vsumh(__a, __b); } /*-- vec_test_mask ----------------------------------------------------------*/ static inline __ATTRS_o_ai int -vec_test_mask(vector signed char __a, vector unsigned char __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector signed char __a, __vector unsigned char __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector unsigned char __a, vector unsigned char __b) { +vec_test_mask(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vtm(__a, __b); } static inline __ATTRS_o_ai int -vec_test_mask(vector signed short __a, vector unsigned short __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector signed short __a, __vector unsigned short __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector unsigned short __a, vector unsigned short __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector unsigned short __a, __vector unsigned short __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector signed int __a, vector unsigned int __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector signed int __a, __vector unsigned int __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector unsigned int __a, vector unsigned int __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector unsigned int __a, __vector unsigned int __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector signed long long __a, vector unsigned long long __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector signed long long __a, __vector unsigned long long __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } static inline __ATTRS_o_ai int -vec_test_mask(vector unsigned long long __a, vector unsigned long long __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector unsigned long long __a, + __vector unsigned long long __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } #if __ARCH__ >= 12 static inline __ATTRS_o_ai int -vec_test_mask(vector float __a, vector unsigned int __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector float __a, __vector unsigned int __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } #endif static inline __ATTRS_o_ai int -vec_test_mask(vector double __a, vector unsigned long long __b) { - return __builtin_s390_vtm((vector unsigned char)__a, - (vector unsigned char)__b); +vec_test_mask(__vector double __a, __vector unsigned long long __b) { + return __builtin_s390_vtm((__vector unsigned char)__a, + (__vector unsigned char)__b); } /*-- vec_madd ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_madd(vector float __a, vector float __b, vector float __c) { +static inline __ATTRS_o_ai __vector float +vec_madd(__vector float __a, __vector float __b, __vector float __c) { return __builtin_s390_vfmasb(__a, __b, __c); } #endif -static inline __ATTRS_o_ai vector double -vec_madd(vector double __a, vector double __b, vector double __c) { +static inline __ATTRS_o_ai __vector double +vec_madd(__vector double __a, __vector double __b, __vector double __c) { return __builtin_s390_vfmadb(__a, __b, __c); } /*-- vec_msub ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_msub(vector float __a, vector float __b, vector float __c) { +static inline __ATTRS_o_ai __vector float +vec_msub(__vector float __a, __vector float __b, __vector float __c) { return __builtin_s390_vfmssb(__a, __b, __c); } #endif -static inline __ATTRS_o_ai vector double -vec_msub(vector double __a, vector double __b, vector double __c) { +static inline __ATTRS_o_ai __vector double +vec_msub(__vector double __a, __vector double __b, __vector double __c) { return __builtin_s390_vfmsdb(__a, __b, __c); } /*-- vec_nmadd ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_nmadd(vector float __a, vector float __b, vector float __c) { +static inline __ATTRS_o_ai __vector float +vec_nmadd(__vector float __a, __vector float __b, __vector float __c) { return __builtin_s390_vfnmasb(__a, __b, __c); } -static inline __ATTRS_o_ai vector double -vec_nmadd(vector double __a, vector double __b, vector double __c) { +static inline __ATTRS_o_ai __vector double +vec_nmadd(__vector double __a, __vector double __b, __vector double __c) { return __builtin_s390_vfnmadb(__a, __b, __c); } #endif @@ -8829,13 +8903,13 @@ vec_nmadd(vector double __a, vector double __b, vector double __c) { /*-- vec_nmsub ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_nmsub(vector float __a, vector float __b, vector float __c) { +static inline __ATTRS_o_ai __vector float +vec_nmsub(__vector float __a, __vector float __b, __vector float __c) { return __builtin_s390_vfnmssb(__a, __b, __c); } -static inline __ATTRS_o_ai vector double -vec_nmsub(vector double __a, vector double __b, vector double __c) { +static inline __ATTRS_o_ai __vector double +vec_nmsub(__vector double __a, __vector double __b, __vector double __c) { return __builtin_s390_vfnmsdb(__a, __b, __c); } #endif @@ -8843,31 +8917,31 @@ vec_nmsub(vector double __a, vector double __b, vector double __c) { /*-- vec_sqrt ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_sqrt(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_sqrt(__vector float __a) { return __builtin_s390_vfsqsb(__a); } #endif -static inline __ATTRS_o_ai vector double -vec_sqrt(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_sqrt(__vector double __a) { return __builtin_s390_vfsqdb(__a); } /*-- vec_ld2f ---------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_ai vector double +static inline __ATTRS_ai __vector double vec_ld2f(const float *__ptr) { typedef float __v2f32 __attribute__((__vector_size__(8))); - return __builtin_convertvector(*(const __v2f32 *)__ptr, vector double); + return __builtin_convertvector(*(const __v2f32 *)__ptr, __vector double); } /*-- vec_st2f ---------------------------------------------------------------*/ // This prototype is deprecated. static inline __ATTRS_ai void -vec_st2f(vector double __a, float *__ptr) { +vec_st2f(__vector double __a, float *__ptr) { typedef float __v2f32 __attribute__((__vector_size__(8))); *(__v2f32 *)__ptr = __builtin_convertvector(__a, __v2f32); } @@ -8875,59 +8949,63 @@ vec_st2f(vector double __a, float *__ptr) { /*-- vec_ctd ----------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_ctd(vector signed long long __a, int __b) +static inline __ATTRS_o_ai __vector double +vec_ctd(__vector signed long long __a, int __b) __constant_range(__b, 0, 31) { - vector double __conv = __builtin_convertvector(__a, vector double); - __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52); + __vector double __conv = __builtin_convertvector(__a, __vector double); + __conv *= ((__vector double)(__vector unsigned long long) + ((0x3ffULL - __b) << 52)); return __conv; } // This prototype is deprecated. -static inline __ATTRS_o_ai vector double -vec_ctd(vector unsigned long long __a, int __b) +static inline __ATTRS_o_ai __vector double +vec_ctd(__vector unsigned long long __a, int __b) __constant_range(__b, 0, 31) { - vector double __conv = __builtin_convertvector(__a, vector double); - __conv *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52); + __vector double __conv = __builtin_convertvector(__a, __vector double); + __conv *= ((__vector double)(__vector unsigned long long) + ((0x3ffULL - __b) << 52)); return __conv; } /*-- vec_ctsl ---------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_o_ai vector signed long long -vec_ctsl(vector double __a, int __b) +static inline __ATTRS_o_ai __vector signed long long +vec_ctsl(__vector double __a, int __b) __constant_range(__b, 0, 31) { - __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52); - return __builtin_convertvector(__a, vector signed long long); + __a *= ((__vector double)(__vector unsigned long long) + ((0x3ffULL + __b) << 52)); + return __builtin_convertvector(__a, __vector signed long long); } /*-- vec_ctul ---------------------------------------------------------------*/ // This prototype is deprecated. -static inline __ATTRS_o_ai vector unsigned long long -vec_ctul(vector double __a, int __b) +static inline __ATTRS_o_ai __vector unsigned long long +vec_ctul(__vector double __a, int __b) __constant_range(__b, 0, 31) { - __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52); - return __builtin_convertvector(__a, vector unsigned long long); + __a *= ((__vector double)(__vector unsigned long long) + ((0x3ffULL + __b) << 52)); + return __builtin_convertvector(__a, __vector unsigned long long); } /*-- vec_doublee ------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_ai vector double -vec_doublee(vector float __a) { +static inline __ATTRS_ai __vector double +vec_doublee(__vector float __a) { typedef float __v2f32 __attribute__((__vector_size__(8))); __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2); - return __builtin_convertvector(__pack, vector double); + return __builtin_convertvector(__pack, __vector double); } #endif /*-- vec_floate -------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_ai vector float -vec_floate(vector double __a) { +static inline __ATTRS_ai __vector float +vec_floate(__vector double __a) { typedef float __v2f32 __attribute__((__vector_size__(8))); __v2f32 __pack = __builtin_convertvector(__a, __v2f32); return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1); @@ -8936,86 +9014,86 @@ vec_floate(vector double __a) { /*-- vec_double -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector double -vec_double(vector signed long long __a) { - return __builtin_convertvector(__a, vector double); +static inline __ATTRS_o_ai __vector double +vec_double(__vector signed long long __a) { + return __builtin_convertvector(__a, __vector double); } -static inline __ATTRS_o_ai vector double -vec_double(vector unsigned long long __a) { - return __builtin_convertvector(__a, vector double); +static inline __ATTRS_o_ai __vector double +vec_double(__vector unsigned long long __a) { + return __builtin_convertvector(__a, __vector double); } /*-- vec_float --------------------------------------------------------------*/ #if __ARCH__ >= 13 -static inline __ATTRS_o_ai vector float -vec_float(vector signed int __a) { - return __builtin_convertvector(__a, vector float); +static inline __ATTRS_o_ai __vector float +vec_float(__vector signed int __a) { + return __builtin_convertvector(__a, __vector float); } -static inline __ATTRS_o_ai vector float -vec_float(vector unsigned int __a) { - return __builtin_convertvector(__a, vector float); +static inline __ATTRS_o_ai __vector float +vec_float(__vector unsigned int __a) { + return __builtin_convertvector(__a, __vector float); } #endif /*-- vec_signed -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed long long -vec_signed(vector double __a) { - return __builtin_convertvector(__a, vector signed long long); +static inline __ATTRS_o_ai __vector signed long long +vec_signed(__vector double __a) { + return __builtin_convertvector(__a, __vector signed long long); } #if __ARCH__ >= 13 -static inline __ATTRS_o_ai vector signed int -vec_signed(vector float __a) { - return __builtin_convertvector(__a, vector signed int); +static inline __ATTRS_o_ai __vector signed int +vec_signed(__vector float __a) { + return __builtin_convertvector(__a, __vector signed int); } #endif /*-- vec_unsigned -----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned long long -vec_unsigned(vector double __a) { - return __builtin_convertvector(__a, vector unsigned long long); +static inline __ATTRS_o_ai __vector unsigned long long +vec_unsigned(__vector double __a) { + return __builtin_convertvector(__a, __vector unsigned long long); } #if __ARCH__ >= 13 -static inline __ATTRS_o_ai vector unsigned int -vec_unsigned(vector float __a) { - return __builtin_convertvector(__a, vector unsigned int); +static inline __ATTRS_o_ai __vector unsigned int +vec_unsigned(__vector float __a) { + return __builtin_convertvector(__a, __vector unsigned int); } #endif /*-- vec_roundp -------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_roundp(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_roundp(__vector float __a) { return __builtin_s390_vfisb(__a, 4, 6); } #endif -static inline __ATTRS_o_ai vector double -vec_roundp(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_roundp(__vector double __a) { return __builtin_s390_vfidb(__a, 4, 6); } /*-- vec_ceil ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_ceil(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_ceil(__vector float __a) { // On this platform, vec_ceil never triggers the IEEE-inexact exception. return __builtin_s390_vfisb(__a, 4, 6); } #endif -static inline __ATTRS_o_ai vector double -vec_ceil(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_ceil(__vector double __a) { // On this platform, vec_ceil never triggers the IEEE-inexact exception. return __builtin_s390_vfidb(__a, 4, 6); } @@ -9023,29 +9101,29 @@ vec_ceil(vector double __a) { /*-- vec_roundm -------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_roundm(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_roundm(__vector float __a) { return __builtin_s390_vfisb(__a, 4, 7); } #endif -static inline __ATTRS_o_ai vector double -vec_roundm(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_roundm(__vector double __a) { return __builtin_s390_vfidb(__a, 4, 7); } /*-- vec_floor --------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_floor(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_floor(__vector float __a) { // On this platform, vec_floor never triggers the IEEE-inexact exception. return __builtin_s390_vfisb(__a, 4, 7); } #endif -static inline __ATTRS_o_ai vector double -vec_floor(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_floor(__vector double __a) { // On this platform, vec_floor never triggers the IEEE-inexact exception. return __builtin_s390_vfidb(__a, 4, 7); } @@ -9053,29 +9131,29 @@ vec_floor(vector double __a) { /*-- vec_roundz -------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_roundz(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_roundz(__vector float __a) { return __builtin_s390_vfisb(__a, 4, 5); } #endif -static inline __ATTRS_o_ai vector double -vec_roundz(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_roundz(__vector double __a) { return __builtin_s390_vfidb(__a, 4, 5); } /*-- vec_trunc --------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_trunc(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_trunc(__vector float __a) { // On this platform, vec_trunc never triggers the IEEE-inexact exception. return __builtin_s390_vfisb(__a, 4, 5); } #endif -static inline __ATTRS_o_ai vector double -vec_trunc(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_trunc(__vector double __a) { // On this platform, vec_trunc never triggers the IEEE-inexact exception. return __builtin_s390_vfidb(__a, 4, 5); } @@ -9083,29 +9161,29 @@ vec_trunc(vector double __a) { /*-- vec_roundc -------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_roundc(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_roundc(__vector float __a) { return __builtin_s390_vfisb(__a, 4, 0); } #endif -static inline __ATTRS_o_ai vector double -vec_roundc(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_roundc(__vector double __a) { return __builtin_s390_vfidb(__a, 4, 0); } /*-- vec_rint ---------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_rint(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_rint(__vector float __a) { // vec_rint may trigger the IEEE-inexact exception. return __builtin_s390_vfisb(__a, 0, 0); } #endif -static inline __ATTRS_o_ai vector double -vec_rint(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_rint(__vector double __a) { // vec_rint may trigger the IEEE-inexact exception. return __builtin_s390_vfidb(__a, 0, 0); } @@ -9113,45 +9191,45 @@ vec_rint(vector double __a) { /*-- vec_round --------------------------------------------------------------*/ #if __ARCH__ >= 12 -static inline __ATTRS_o_ai vector float -vec_round(vector float __a) { +static inline __ATTRS_o_ai __vector float +vec_round(__vector float __a) { return __builtin_s390_vfisb(__a, 4, 4); } #endif -static inline __ATTRS_o_ai vector double -vec_round(vector double __a) { +static inline __ATTRS_o_ai __vector double +vec_round(__vector double __a) { return __builtin_s390_vfidb(__a, 4, 4); } /*-- vec_fp_test_data_class -------------------------------------------------*/ #if __ARCH__ >= 12 -extern __ATTRS_o vector bool int -vec_fp_test_data_class(vector float __a, int __b, int *__c) +extern __ATTRS_o __vector __bool int +vec_fp_test_data_class(__vector float __a, int __b, int *__c) __constant_range(__b, 0, 4095); -extern __ATTRS_o vector bool long long -vec_fp_test_data_class(vector double __a, int __b, int *__c) +extern __ATTRS_o __vector __bool long long +vec_fp_test_data_class(__vector double __a, int __b, int *__c) __constant_range(__b, 0, 4095); #define vec_fp_test_data_class(X, Y, Z) \ ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \ __extension__ ({ \ - vector unsigned char __res; \ - vector unsigned char __x = (vector unsigned char)(X); \ + __vector unsigned char __res; \ + __vector unsigned char __x = (__vector unsigned char)(X); \ int *__z = (Z); \ switch (sizeof ((X)[0])) { \ - case 4: __res = (vector unsigned char) \ - __builtin_s390_vftcisb((vector float)__x, (Y), __z); \ + case 4: __res = (__vector unsigned char) \ + __builtin_s390_vftcisb((__vector float)__x, (Y), __z); \ break; \ - default: __res = (vector unsigned char) \ - __builtin_s390_vftcidb((vector double)__x, (Y), __z); \ + default: __res = (__vector unsigned char) \ + __builtin_s390_vftcidb((__vector double)__x, (Y), __z); \ break; \ } __res; })) #else #define vec_fp_test_data_class(X, Y, Z) \ - ((vector bool long long)__builtin_s390_vftcidb((X), (Y), (Z))) + ((__vector __bool long long)__builtin_s390_vftcidb((X), (Y), (Z))) #endif #define __VEC_CLASS_FP_ZERO_P (1 << 11) @@ -9183,1527 +9261,1585 @@ vec_fp_test_data_class(vector double __a, int __b, int *__c) /*-- vec_cp_until_zero ------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cp_until_zero(vector signed char __a) { - return (vector signed char)__builtin_s390_vistrb((vector unsigned char)__a); +static inline __ATTRS_o_ai __vector signed char +vec_cp_until_zero(__vector signed char __a) { + return ((__vector signed char) + __builtin_s390_vistrb((__vector unsigned char)__a)); } -static inline __ATTRS_o_ai vector bool char -vec_cp_until_zero(vector bool char __a) { - return (vector bool char)__builtin_s390_vistrb((vector unsigned char)__a); +static inline __ATTRS_o_ai __vector __bool char +vec_cp_until_zero(__vector __bool char __a) { + return ((__vector __bool char) + __builtin_s390_vistrb((__vector unsigned char)__a)); } -static inline __ATTRS_o_ai vector unsigned char -vec_cp_until_zero(vector unsigned char __a) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cp_until_zero(__vector unsigned char __a) { return __builtin_s390_vistrb(__a); } -static inline __ATTRS_o_ai vector signed short -vec_cp_until_zero(vector signed short __a) { - return (vector signed short)__builtin_s390_vistrh((vector unsigned short)__a); +static inline __ATTRS_o_ai __vector signed short +vec_cp_until_zero(__vector signed short __a) { + return ((__vector signed short) + __builtin_s390_vistrh((__vector unsigned short)__a)); } -static inline __ATTRS_o_ai vector bool short -vec_cp_until_zero(vector bool short __a) { - return (vector bool short)__builtin_s390_vistrh((vector unsigned short)__a); +static inline __ATTRS_o_ai __vector __bool short +vec_cp_until_zero(__vector __bool short __a) { + return ((__vector __bool short) + __builtin_s390_vistrh((__vector unsigned short)__a)); } -static inline __ATTRS_o_ai vector unsigned short -vec_cp_until_zero(vector unsigned short __a) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cp_until_zero(__vector unsigned short __a) { return __builtin_s390_vistrh(__a); } -static inline __ATTRS_o_ai vector signed int -vec_cp_until_zero(vector signed int __a) { - return (vector signed int)__builtin_s390_vistrf((vector unsigned int)__a); +static inline __ATTRS_o_ai __vector signed int +vec_cp_until_zero(__vector signed int __a) { + return ((__vector signed int) + __builtin_s390_vistrf((__vector unsigned int)__a)); } -static inline __ATTRS_o_ai vector bool int -vec_cp_until_zero(vector bool int __a) { - return (vector bool int)__builtin_s390_vistrf((vector unsigned int)__a); +static inline __ATTRS_o_ai __vector __bool int +vec_cp_until_zero(__vector __bool int __a) { + return ((__vector __bool int) + __builtin_s390_vistrf((__vector unsigned int)__a)); } -static inline __ATTRS_o_ai vector unsigned int -vec_cp_until_zero(vector unsigned int __a) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cp_until_zero(__vector unsigned int __a) { return __builtin_s390_vistrf(__a); } /*-- vec_cp_until_zero_cc ---------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cp_until_zero_cc(vector signed char __a, int *__cc) { - return (vector signed char) - __builtin_s390_vistrbs((vector unsigned char)__a, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_cp_until_zero_cc(__vector signed char __a, int *__cc) { + return (__vector signed char) + __builtin_s390_vistrbs((__vector unsigned char)__a, __cc); } -static inline __ATTRS_o_ai vector bool char -vec_cp_until_zero_cc(vector bool char __a, int *__cc) { - return (vector bool char) - __builtin_s390_vistrbs((vector unsigned char)__a, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_cp_until_zero_cc(__vector __bool char __a, int *__cc) { + return (__vector __bool char) + __builtin_s390_vistrbs((__vector unsigned char)__a, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cp_until_zero_cc(vector unsigned char __a, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cp_until_zero_cc(__vector unsigned char __a, int *__cc) { return __builtin_s390_vistrbs(__a, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_cp_until_zero_cc(vector signed short __a, int *__cc) { - return (vector signed short) - __builtin_s390_vistrhs((vector unsigned short)__a, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_cp_until_zero_cc(__vector signed short __a, int *__cc) { + return (__vector signed short) + __builtin_s390_vistrhs((__vector unsigned short)__a, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_cp_until_zero_cc(vector bool short __a, int *__cc) { - return (vector bool short) - __builtin_s390_vistrhs((vector unsigned short)__a, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_cp_until_zero_cc(__vector __bool short __a, int *__cc) { + return (__vector __bool short) + __builtin_s390_vistrhs((__vector unsigned short)__a, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cp_until_zero_cc(vector unsigned short __a, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cp_until_zero_cc(__vector unsigned short __a, int *__cc) { return __builtin_s390_vistrhs(__a, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_cp_until_zero_cc(vector signed int __a, int *__cc) { - return (vector signed int) - __builtin_s390_vistrfs((vector unsigned int)__a, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_cp_until_zero_cc(__vector signed int __a, int *__cc) { + return (__vector signed int) + __builtin_s390_vistrfs((__vector unsigned int)__a, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_cp_until_zero_cc(vector bool int __a, int *__cc) { - return (vector bool int)__builtin_s390_vistrfs((vector unsigned int)__a, - __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_cp_until_zero_cc(__vector __bool int __a, int *__cc) { + return (__vector __bool int) + __builtin_s390_vistrfs((__vector unsigned int)__a, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cp_until_zero_cc(vector unsigned int __a, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cp_until_zero_cc(__vector unsigned int __a, int *__cc) { return __builtin_s390_vistrfs(__a, __cc); } /*-- vec_cmpeq_idx ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpeq_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfeeb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_cmpeq_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfeeb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfeeb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfeeb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfeeb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_cmpeq_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfeeh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector signed short +vec_cmpeq_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfeeh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfeeh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfeeh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfeeh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_cmpeq_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfeef((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector signed int +vec_cmpeq_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfeef((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfeef((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfeef((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfeef(__a, __b); } /*-- vec_cmpeq_idx_cc -------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpeq_idx_cc(vector signed char __a, vector signed char __b, int *__cc) { - return (vector signed char) - __builtin_s390_vfeebs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_cmpeq_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfeebs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfeebs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) { + return __builtin_s390_vfeebs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_idx_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_idx_cc(__vector unsigned char __a, __vector unsigned char __b, int *__cc) { return __builtin_s390_vfeebs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_cmpeq_idx_cc(vector signed short __a, vector signed short __b, int *__cc) { - return (vector signed short) - __builtin_s390_vfeehs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_cmpeq_idx_cc(__vector signed short __a, __vector signed short __b, + int *__cc) { + return (__vector signed short) + __builtin_s390_vfeehs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_idx_cc(vector bool short __a, vector bool short __b, int *__cc) { - return __builtin_s390_vfeehs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_idx_cc(__vector __bool short __a, __vector __bool short __b, int *__cc) { + return __builtin_s390_vfeehs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_idx_cc(vector unsigned short __a, vector unsigned short __b, +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_idx_cc(__vector unsigned short __a, __vector unsigned short __b, int *__cc) { return __builtin_s390_vfeehs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_cmpeq_idx_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector signed int) - __builtin_s390_vfeefs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_cmpeq_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfeefs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfeefs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) { + return __builtin_s390_vfeefs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_idx_cc(__vector unsigned int __a, __vector unsigned int __b, + int *__cc) { return __builtin_s390_vfeefs(__a, __b, __cc); } /*-- vec_cmpeq_or_0_idx -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpeq_or_0_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfeezb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_cmpeq_or_0_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfeezb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_or_0_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfeezb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_or_0_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfeezb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_or_0_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfeezb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_cmpeq_or_0_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfeezh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector signed short +vec_cmpeq_or_0_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfeezh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_or_0_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfeezh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_or_0_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfeezh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_or_0_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfeezh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_cmpeq_or_0_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfeezf((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector signed int +vec_cmpeq_or_0_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfeezf((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_or_0_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfeezf((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_or_0_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfeezf((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_or_0_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfeezf(__a, __b); } /*-- vec_cmpeq_or_0_idx_cc --------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpeq_or_0_idx_cc(vector signed char __a, vector signed char __b, +static inline __ATTRS_o_ai __vector signed char +vec_cmpeq_or_0_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) { - return (vector signed char) - __builtin_s390_vfeezbs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); + return (__vector signed char) + __builtin_s390_vfeezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfeezbs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b, + int *__cc) { + return __builtin_s390_vfeezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpeq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpeq_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b, int *__cc) { return __builtin_s390_vfeezbs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_cmpeq_or_0_idx_cc(vector signed short __a, vector signed short __b, +static inline __ATTRS_o_ai __vector signed short +vec_cmpeq_or_0_idx_cc(__vector signed short __a, __vector signed short __b, int *__cc) { - return (vector signed short) - __builtin_s390_vfeezhs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); + return (__vector signed short) + __builtin_s390_vfeezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) { - return __builtin_s390_vfeezhs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b, + int *__cc) { + return __builtin_s390_vfeezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpeq_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b, +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpeq_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b, int *__cc) { return __builtin_s390_vfeezhs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_cmpeq_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector signed int) - __builtin_s390_vfeezfs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_cmpeq_or_0_idx_cc(__vector signed int __a, __vector signed int __b, + int *__cc) { + return (__vector signed int) + __builtin_s390_vfeezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfeezfs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b, + int *__cc) { + return __builtin_s390_vfeezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpeq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpeq_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { return __builtin_s390_vfeezfs(__a, __b, __cc); } /*-- vec_cmpne_idx ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpne_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfeneb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_cmpne_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfeneb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfeneb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfeneb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfeneb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_cmpne_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfeneh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector signed short +vec_cmpne_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfeneh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfeneh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfeneh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfeneh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_cmpne_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfenef((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector signed int +vec_cmpne_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfenef((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfenef((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfenef((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfenef(__a, __b); } /*-- vec_cmpne_idx_cc -------------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpne_idx_cc(vector signed char __a, vector signed char __b, int *__cc) { - return (vector signed char) - __builtin_s390_vfenebs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_cmpne_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfenebs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfenebs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_idx_cc(__vector __bool char __a, __vector __bool char __b, int *__cc) { + return __builtin_s390_vfenebs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_idx_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_idx_cc(__vector unsigned char __a, __vector unsigned char __b, int *__cc) { return __builtin_s390_vfenebs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_cmpne_idx_cc(vector signed short __a, vector signed short __b, int *__cc) { - return (vector signed short) - __builtin_s390_vfenehs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_cmpne_idx_cc(__vector signed short __a, __vector signed short __b, + int *__cc) { + return (__vector signed short) + __builtin_s390_vfenehs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_idx_cc(vector bool short __a, vector bool short __b, int *__cc) { - return __builtin_s390_vfenehs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_idx_cc(__vector __bool short __a, __vector __bool short __b, + int *__cc) { + return __builtin_s390_vfenehs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_idx_cc(vector unsigned short __a, vector unsigned short __b, +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_idx_cc(__vector unsigned short __a, __vector unsigned short __b, int *__cc) { return __builtin_s390_vfenehs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_cmpne_idx_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector signed int) - __builtin_s390_vfenefs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_cmpne_idx_cc(__vector signed int __a, __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfenefs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfenefs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_idx_cc(__vector __bool int __a, __vector __bool int __b, int *__cc) { + return __builtin_s390_vfenefs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_idx_cc(vector unsigned int __a, vector unsigned int __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_idx_cc(__vector unsigned int __a, __vector unsigned int __b, + int *__cc) { return __builtin_s390_vfenefs(__a, __b, __cc); } /*-- vec_cmpne_or_0_idx -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpne_or_0_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfenezb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector signed char +vec_cmpne_or_0_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfenezb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_or_0_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfenezb((vector unsigned char)__a, - (vector unsigned char)__b); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_or_0_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfenezb((__vector unsigned char)__a, + (__vector unsigned char)__b); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_or_0_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_or_0_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfenezb(__a, __b); } -static inline __ATTRS_o_ai vector signed short -vec_cmpne_or_0_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfenezh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector signed short +vec_cmpne_or_0_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfenezh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_or_0_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfenezh((vector unsigned short)__a, - (vector unsigned short)__b); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_or_0_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfenezh((__vector unsigned short)__a, + (__vector unsigned short)__b); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_or_0_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_or_0_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfenezh(__a, __b); } -static inline __ATTRS_o_ai vector signed int -vec_cmpne_or_0_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfenezf((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector signed int +vec_cmpne_or_0_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfenezf((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_or_0_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfenezf((vector unsigned int)__a, - (vector unsigned int)__b); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_or_0_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfenezf((__vector unsigned int)__a, + (__vector unsigned int)__b); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_or_0_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_or_0_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfenezf(__a, __b); } /*-- vec_cmpne_or_0_idx_cc --------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_cmpne_or_0_idx_cc(vector signed char __a, vector signed char __b, +static inline __ATTRS_o_ai __vector signed char +vec_cmpne_or_0_idx_cc(__vector signed char __a, __vector signed char __b, int *__cc) { - return (vector signed char) - __builtin_s390_vfenezbs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); + return (__vector signed char) + __builtin_s390_vfenezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_or_0_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfenezbs((vector unsigned char)__a, - (vector unsigned char)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_or_0_idx_cc(__vector __bool char __a, __vector __bool char __b, + int *__cc) { + return __builtin_s390_vfenezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_cmpne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpne_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b, int *__cc) { return __builtin_s390_vfenezbs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_cmpne_or_0_idx_cc(vector signed short __a, vector signed short __b, +static inline __ATTRS_o_ai __vector signed short +vec_cmpne_or_0_idx_cc(__vector signed short __a, __vector signed short __b, int *__cc) { - return (vector signed short) - __builtin_s390_vfenezhs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); + return (__vector signed short) + __builtin_s390_vfenezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_or_0_idx_cc(vector bool short __a, vector bool short __b, int *__cc) { - return __builtin_s390_vfenezhs((vector unsigned short)__a, - (vector unsigned short)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_or_0_idx_cc(__vector __bool short __a, __vector __bool short __b, + int *__cc) { + return __builtin_s390_vfenezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpne_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b, +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpne_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b, int *__cc) { return __builtin_s390_vfenezhs(__a, __b, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_cmpne_or_0_idx_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector signed int) - __builtin_s390_vfenezfs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_cmpne_or_0_idx_cc(__vector signed int __a, __vector signed int __b, + int *__cc) { + return (__vector signed int) + __builtin_s390_vfenezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_or_0_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfenezfs((vector unsigned int)__a, - (vector unsigned int)__b, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_or_0_idx_cc(__vector __bool int __a, __vector __bool int __b, + int *__cc) { + return __builtin_s390_vfenezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpne_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { return __builtin_s390_vfenezfs(__a, __b, __cc); } /*-- vec_cmprg --------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmprg(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { - return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 4); +static inline __ATTRS_o_ai __vector __bool char +vec_cmprg(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { + return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 4); } -static inline __ATTRS_o_ai vector bool short -vec_cmprg(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { - return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 4); +static inline __ATTRS_o_ai __vector __bool short +vec_cmprg(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { + return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 4); } -static inline __ATTRS_o_ai vector bool int -vec_cmprg(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { - return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 4); +static inline __ATTRS_o_ai __vector __bool int +vec_cmprg(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { + return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 4); } /*-- vec_cmprg_cc -----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmprg_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { - return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_cmprg_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { + return (__vector __bool char)__builtin_s390_vstrcbs(__a, __b, __c, 4, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_cmprg_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { - return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_cmprg_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { + return (__vector __bool short)__builtin_s390_vstrchs(__a, __b, __c, 4, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_cmprg_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { - return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_cmprg_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { + return (__vector __bool int)__builtin_s390_vstrcfs(__a, __b, __c, 4, __cc); } /*-- vec_cmprg_idx ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmprg_idx(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmprg_idx(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vstrcb(__a, __b, __c, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmprg_idx(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmprg_idx(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __builtin_s390_vstrch(__a, __b, __c, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmprg_idx(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmprg_idx(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __builtin_s390_vstrcf(__a, __b, __c, 0); } /*-- vec_cmprg_idx_cc -------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmprg_idx_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmprg_idx_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrcbs(__a, __b, __c, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmprg_idx_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmprg_idx_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { return __builtin_s390_vstrchs(__a, __b, __c, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmprg_idx_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmprg_idx_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { return __builtin_s390_vstrcfs(__a, __b, __c, 0, __cc); } /*-- vec_cmprg_or_0_idx -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmprg_or_0_idx(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmprg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vstrczb(__a, __b, __c, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmprg_or_0_idx(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmprg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __builtin_s390_vstrczh(__a, __b, __c, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmprg_or_0_idx(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmprg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __builtin_s390_vstrczf(__a, __b, __c, 0); } /*-- vec_cmprg_or_0_idx_cc --------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmprg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmprg_or_0_idx_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrczbs(__a, __b, __c, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmprg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmprg_or_0_idx_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { return __builtin_s390_vstrczhs(__a, __b, __c, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmprg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmprg_or_0_idx_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { return __builtin_s390_vstrczfs(__a, __b, __c, 0, __cc); } /*-- vec_cmpnrg -------------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmpnrg(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { - return (vector bool char)__builtin_s390_vstrcb(__a, __b, __c, 12); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpnrg(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { + return (__vector __bool char)__builtin_s390_vstrcb(__a, __b, __c, 12); } -static inline __ATTRS_o_ai vector bool short -vec_cmpnrg(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { - return (vector bool short)__builtin_s390_vstrch(__a, __b, __c, 12); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpnrg(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { + return (__vector __bool short)__builtin_s390_vstrch(__a, __b, __c, 12); } -static inline __ATTRS_o_ai vector bool int -vec_cmpnrg(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { - return (vector bool int)__builtin_s390_vstrcf(__a, __b, __c, 12); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpnrg(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { + return (__vector __bool int)__builtin_s390_vstrcf(__a, __b, __c, 12); } /*-- vec_cmpnrg_cc ----------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_cmpnrg_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { - return (vector bool char)__builtin_s390_vstrcbs(__a, __b, __c, 12, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_cmpnrg_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { + return (__vector __bool char) + __builtin_s390_vstrcbs(__a, __b, __c, 12, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_cmpnrg_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { - return (vector bool short)__builtin_s390_vstrchs(__a, __b, __c, 12, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_cmpnrg_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { + return (__vector __bool short) + __builtin_s390_vstrchs(__a, __b, __c, 12, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_cmpnrg_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { - return (vector bool int)__builtin_s390_vstrcfs(__a, __b, __c, 12, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_cmpnrg_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { + return (__vector __bool int) + __builtin_s390_vstrcfs(__a, __b, __c, 12, __cc); } /*-- vec_cmpnrg_idx ---------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmpnrg_idx(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpnrg_idx(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vstrcb(__a, __b, __c, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpnrg_idx(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpnrg_idx(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __builtin_s390_vstrch(__a, __b, __c, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpnrg_idx(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpnrg_idx(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __builtin_s390_vstrcf(__a, __b, __c, 8); } /*-- vec_cmpnrg_idx_cc ------------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmpnrg_idx_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpnrg_idx_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrcbs(__a, __b, __c, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpnrg_idx_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpnrg_idx_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { return __builtin_s390_vstrchs(__a, __b, __c, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpnrg_idx_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpnrg_idx_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { return __builtin_s390_vstrcfs(__a, __b, __c, 8, __cc); } /*-- vec_cmpnrg_or_0_idx ----------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmpnrg_or_0_idx(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpnrg_or_0_idx(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c) { return __builtin_s390_vstrczb(__a, __b, __c, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpnrg_or_0_idx(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpnrg_or_0_idx(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned short __c) { return __builtin_s390_vstrczh(__a, __b, __c, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpnrg_or_0_idx(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpnrg_or_0_idx(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned int __c) { return __builtin_s390_vstrczf(__a, __b, __c, 8); } /*-- vec_cmpnrg_or_0_idx_cc -------------------------------------------------*/ -static inline __ATTRS_o_ai vector unsigned char -vec_cmpnrg_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_cmpnrg_or_0_idx_cc(__vector unsigned char __a, + __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrczbs(__a, __b, __c, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_cmpnrg_or_0_idx_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned short __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_cmpnrg_or_0_idx_cc(__vector unsigned short __a, + __vector unsigned short __b, + __vector unsigned short __c, int *__cc) { return __builtin_s390_vstrczhs(__a, __b, __c, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_cmpnrg_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned int __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_cmpnrg_or_0_idx_cc(__vector unsigned int __a, + __vector unsigned int __b, + __vector unsigned int __c, int *__cc) { return __builtin_s390_vstrczfs(__a, __b, __c, 8, __cc); } /*-- vec_find_any_eq --------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq(vector signed char __a, vector signed char __b) { - return (vector bool char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 4); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 4); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq(vector bool char __a, vector bool char __b) { - return (vector bool char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 4); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq(__vector __bool char __a, __vector __bool char __b) { + return (__vector __bool char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 4); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)__builtin_s390_vfaeb(__a, __b, 4); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 4); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq(vector signed short __a, vector signed short __b) { - return (vector bool short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 4); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 4); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq(vector bool short __a, vector bool short __b) { - return (vector bool short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 4); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq(__vector __bool short __a, __vector __bool short __b) { + return (__vector __bool short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 4); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)__builtin_s390_vfaeh(__a, __b, 4); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 4); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq(vector signed int __a, vector signed int __b) { - return (vector bool int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 4); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 4); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq(vector bool int __a, vector bool int __b) { - return (vector bool int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 4); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq(__vector __bool int __a, __vector __bool int __b) { + return (__vector __bool int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 4); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)__builtin_s390_vfaef(__a, __b, 4); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 4); } /*-- vec_find_any_eq_cc -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq_cc(vector signed char __a, vector signed char __b, int *__cc) { - return (vector bool char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 4, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq_cc(__vector signed char __a, __vector signed char __b, + int *__cc) { + return (__vector __bool char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq_cc(vector bool char __a, vector bool char __b, int *__cc) { - return (vector bool char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 4, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq_cc(__vector __bool char __a, __vector __bool char __b, + int *__cc) { + return (__vector __bool char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_eq_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_eq_cc(__vector unsigned char __a, __vector unsigned char __b, int *__cc) { - return (vector bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc); + return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 4, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq_cc(vector signed short __a, vector signed short __b, +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq_cc(__vector signed short __a, __vector signed short __b, int *__cc) { - return (vector bool short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 4, __cc); + return (__vector __bool short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq_cc(vector bool short __a, vector bool short __b, int *__cc) { - return (vector bool short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 4, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq_cc(__vector __bool short __a, __vector __bool short __b, + int *__cc) { + return (__vector __bool short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_eq_cc(vector unsigned short __a, vector unsigned short __b, +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_eq_cc(__vector unsigned short __a, __vector unsigned short __b, int *__cc) { - return (vector bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc); + return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 4, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector bool int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 4, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq_cc(__vector signed int __a, __vector signed int __b, + int *__cc) { + return (__vector __bool int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq_cc(vector bool int __a, vector bool int __b, int *__cc) { - return (vector bool int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 4, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq_cc(__vector __bool int __a, __vector __bool int __b, + int *__cc) { + return (__vector __bool int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 4, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_eq_cc(vector unsigned int __a, vector unsigned int __b, +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_eq_cc(__vector unsigned int __a, __vector unsigned int __b, int *__cc) { - return (vector bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc); + return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 4, __cc); } /*-- vec_find_any_eq_idx ----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_eq_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 0); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_eq_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 0); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 0); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 0); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfaeb(__a, __b, 0); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_eq_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 0); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_eq_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 0); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfaeh(__a, __b, 0); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_eq_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 0); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_eq_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 0); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfaef(__a, __b, 0); } /*-- vec_find_any_eq_idx_cc -------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_eq_idx_cc(vector signed char __a, vector signed char __b, - int *__cc) { - return (vector signed char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_eq_idx_cc(__vector signed char __a, + __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_idx_cc(__vector __bool char __a, + __vector __bool char __b, int *__cc) { + return __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_idx_cc(vector unsigned char __a, vector unsigned char __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_idx_cc(__vector unsigned char __a, + __vector unsigned char __b, int *__cc) { return __builtin_s390_vfaebs(__a, __b, 0, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_eq_idx_cc(vector signed short __a, vector signed short __b, - int *__cc) { - return (vector signed short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_eq_idx_cc(__vector signed short __a, + __vector signed short __b, int *__cc) { + return (__vector signed short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_idx_cc(vector bool short __a, vector bool short __b, - int *__cc) { - return __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_idx_cc(__vector __bool short __a, + __vector __bool short __b, int *__cc) { + return __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_idx_cc(vector unsigned short __a, vector unsigned short __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_idx_cc(__vector unsigned short __a, + __vector unsigned short __b, int *__cc) { return __builtin_s390_vfaehs(__a, __b, 0, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_eq_idx_cc(vector signed int __a, vector signed int __b, - int *__cc) { - return (vector signed int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_eq_idx_cc(__vector signed int __a, + __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_idx_cc(__vector __bool int __a, + __vector __bool int __b, int *__cc) { + return __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_idx_cc(vector unsigned int __a, vector unsigned int __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_idx_cc(__vector unsigned int __a, + __vector unsigned int __b, int *__cc) { return __builtin_s390_vfaefs(__a, __b, 0, __cc); } /*-- vec_find_any_eq_or_0_idx -----------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_eq_or_0_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfaezb((vector unsigned char)__a, - (vector unsigned char)__b, 0); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_eq_or_0_idx(__vector signed char __a, + __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfaezb((__vector unsigned char)__a, + (__vector unsigned char)__b, 0); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_or_0_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfaezb((vector unsigned char)__a, - (vector unsigned char)__b, 0); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_or_0_idx(__vector __bool char __a, + __vector __bool char __b) { + return __builtin_s390_vfaezb((__vector unsigned char)__a, + (__vector unsigned char)__b, 0); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_or_0_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_or_0_idx(__vector unsigned char __a, + __vector unsigned char __b) { return __builtin_s390_vfaezb(__a, __b, 0); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_eq_or_0_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfaezh((vector unsigned short)__a, - (vector unsigned short)__b, 0); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_eq_or_0_idx(__vector signed short __a, + __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfaezh((__vector unsigned short)__a, + (__vector unsigned short)__b, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_or_0_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfaezh((vector unsigned short)__a, - (vector unsigned short)__b, 0); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_or_0_idx(__vector __bool short __a, + __vector __bool short __b) { + return __builtin_s390_vfaezh((__vector unsigned short)__a, + (__vector unsigned short)__b, 0); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_or_0_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_or_0_idx(__vector unsigned short __a, + __vector unsigned short __b) { return __builtin_s390_vfaezh(__a, __b, 0); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_eq_or_0_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfaezf((vector unsigned int)__a, - (vector unsigned int)__b, 0); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_eq_or_0_idx(__vector signed int __a, + __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfaezf((__vector unsigned int)__a, + (__vector unsigned int)__b, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_or_0_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfaezf((vector unsigned int)__a, - (vector unsigned int)__b, 0); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_or_0_idx(__vector __bool int __a, + __vector __bool int __b) { + return __builtin_s390_vfaezf((__vector unsigned int)__a, + (__vector unsigned int)__b, 0); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_or_0_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_or_0_idx(__vector unsigned int __a, + __vector unsigned int __b) { return __builtin_s390_vfaezf(__a, __b, 0); } /*-- vec_find_any_eq_or_0_idx_cc --------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_eq_or_0_idx_cc(vector signed char __a, vector signed char __b, - int *__cc) { - return (vector signed char) - __builtin_s390_vfaezbs((vector unsigned char)__a, - (vector unsigned char)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_eq_or_0_idx_cc(__vector signed char __a, + __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfaezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_or_0_idx_cc(vector bool char __a, vector bool char __b, - int *__cc) { - return __builtin_s390_vfaezbs((vector unsigned char)__a, - (vector unsigned char)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_or_0_idx_cc(__vector __bool char __a, + __vector __bool char __b, int *__cc) { + return __builtin_s390_vfaezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_eq_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_eq_or_0_idx_cc(__vector unsigned char __a, + __vector unsigned char __b, int *__cc) { return __builtin_s390_vfaezbs(__a, __b, 0, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_eq_or_0_idx_cc(vector signed short __a, vector signed short __b, - int *__cc) { - return (vector signed short) - __builtin_s390_vfaezhs((vector unsigned short)__a, - (vector unsigned short)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_eq_or_0_idx_cc(__vector signed short __a, + __vector signed short __b, int *__cc) { + return (__vector signed short) + __builtin_s390_vfaezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_or_0_idx_cc(vector bool short __a, vector bool short __b, - int *__cc) { - return __builtin_s390_vfaezhs((vector unsigned short)__a, - (vector unsigned short)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_or_0_idx_cc(__vector __bool short __a, + __vector __bool short __b, int *__cc) { + return __builtin_s390_vfaezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_eq_or_0_idx_cc(vector unsigned short __a, - vector unsigned short __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_eq_or_0_idx_cc(__vector unsigned short __a, + __vector unsigned short __b, int *__cc) { return __builtin_s390_vfaezhs(__a, __b, 0, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_eq_or_0_idx_cc(vector signed int __a, vector signed int __b, - int *__cc) { - return (vector signed int) - __builtin_s390_vfaezfs((vector unsigned int)__a, - (vector unsigned int)__b, 0, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_eq_or_0_idx_cc(__vector signed int __a, + __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfaezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_or_0_idx_cc(vector bool int __a, vector bool int __b, - int *__cc) { - return __builtin_s390_vfaezfs((vector unsigned int)__a, - (vector unsigned int)__b, 0, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_or_0_idx_cc(__vector __bool int __a, + __vector __bool int __b, int *__cc) { + return __builtin_s390_vfaezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, 0, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_eq_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_eq_or_0_idx_cc(__vector unsigned int __a, + __vector unsigned int __b, int *__cc) { return __builtin_s390_vfaezfs(__a, __b, 0, __cc); } /*-- vec_find_any_ne --------------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne(vector signed char __a, vector signed char __b) { - return (vector bool char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 12); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne(__vector signed char __a, __vector signed char __b) { + return (__vector __bool char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 12); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne(vector bool char __a, vector bool char __b) { - return (vector bool char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 12); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne(__vector __bool char __a, __vector __bool char __b) { + return (__vector __bool char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 12); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne(vector unsigned char __a, vector unsigned char __b) { - return (vector bool char)__builtin_s390_vfaeb(__a, __b, 12); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne(__vector unsigned char __a, __vector unsigned char __b) { + return (__vector __bool char)__builtin_s390_vfaeb(__a, __b, 12); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne(vector signed short __a, vector signed short __b) { - return (vector bool short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 12); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne(__vector signed short __a, __vector signed short __b) { + return (__vector __bool short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 12); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne(vector bool short __a, vector bool short __b) { - return (vector bool short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 12); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne(__vector __bool short __a, __vector __bool short __b) { + return (__vector __bool short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 12); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne(vector unsigned short __a, vector unsigned short __b) { - return (vector bool short)__builtin_s390_vfaeh(__a, __b, 12); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne(__vector unsigned short __a, __vector unsigned short __b) { + return (__vector __bool short)__builtin_s390_vfaeh(__a, __b, 12); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne(vector signed int __a, vector signed int __b) { - return (vector bool int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 12); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne(__vector signed int __a, __vector signed int __b) { + return (__vector __bool int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 12); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne(vector bool int __a, vector bool int __b) { - return (vector bool int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 12); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne(__vector __bool int __a, __vector __bool int __b) { + return (__vector __bool int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 12); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne(vector unsigned int __a, vector unsigned int __b) { - return (vector bool int)__builtin_s390_vfaef(__a, __b, 12); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne(__vector unsigned int __a, __vector unsigned int __b) { + return (__vector __bool int)__builtin_s390_vfaef(__a, __b, 12); } /*-- vec_find_any_ne_cc -----------------------------------------------------*/ -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne_cc(vector signed char __a, vector signed char __b, int *__cc) { - return (vector bool char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne_cc(__vector signed char __a, + __vector signed char __b, int *__cc) { + return (__vector __bool char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne_cc(vector bool char __a, vector bool char __b, int *__cc) { - return (vector bool char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne_cc(__vector __bool char __a, + __vector __bool char __b, int *__cc) { + return (__vector __bool char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool char -vec_find_any_ne_cc(vector unsigned char __a, vector unsigned char __b, - int *__cc) { - return (vector bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool char +vec_find_any_ne_cc(__vector unsigned char __a, + __vector unsigned char __b, int *__cc) { + return (__vector __bool char)__builtin_s390_vfaebs(__a, __b, 12, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne_cc(vector signed short __a, vector signed short __b, - int *__cc) { - return (vector bool short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne_cc(__vector signed short __a, + __vector signed short __b, int *__cc) { + return (__vector __bool short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne_cc(vector bool short __a, vector bool short __b, int *__cc) { - return (vector bool short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne_cc(__vector __bool short __a, + __vector __bool short __b, int *__cc) { + return (__vector __bool short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool short -vec_find_any_ne_cc(vector unsigned short __a, vector unsigned short __b, - int *__cc) { - return (vector bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool short +vec_find_any_ne_cc(__vector unsigned short __a, + __vector unsigned short __b, int *__cc) { + return (__vector __bool short)__builtin_s390_vfaehs(__a, __b, 12, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne_cc(vector signed int __a, vector signed int __b, int *__cc) { - return (vector bool int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne_cc(__vector signed int __a, + __vector signed int __b, int *__cc) { + return (__vector __bool int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne_cc(vector bool int __a, vector bool int __b, int *__cc) { - return (vector bool int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne_cc(__vector __bool int __a, + __vector __bool int __b, int *__cc) { + return (__vector __bool int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 12, __cc); } -static inline __ATTRS_o_ai vector bool int -vec_find_any_ne_cc(vector unsigned int __a, vector unsigned int __b, - int *__cc) { - return (vector bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc); +static inline __ATTRS_o_ai __vector __bool int +vec_find_any_ne_cc(__vector unsigned int __a, + __vector unsigned int __b, int *__cc) { + return (__vector __bool int)__builtin_s390_vfaefs(__a, __b, 12, __cc); } /*-- vec_find_any_ne_idx ----------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_ne_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 8); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_ne_idx(__vector signed char __a, __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 8); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfaeb((vector unsigned char)__a, - (vector unsigned char)__b, 8); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_idx(__vector __bool char __a, __vector __bool char __b) { + return __builtin_s390_vfaeb((__vector unsigned char)__a, + (__vector unsigned char)__b, 8); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_idx(__vector unsigned char __a, __vector unsigned char __b) { return __builtin_s390_vfaeb(__a, __b, 8); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_ne_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 8); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_ne_idx(__vector signed short __a, __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfaeh((vector unsigned short)__a, - (vector unsigned short)__b, 8); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_idx(__vector __bool short __a, __vector __bool short __b) { + return __builtin_s390_vfaeh((__vector unsigned short)__a, + (__vector unsigned short)__b, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_idx(__vector unsigned short __a, __vector unsigned short __b) { return __builtin_s390_vfaeh(__a, __b, 8); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_ne_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 8); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_ne_idx(__vector signed int __a, __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfaef((vector unsigned int)__a, - (vector unsigned int)__b, 8); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_idx(__vector __bool int __a, __vector __bool int __b) { + return __builtin_s390_vfaef((__vector unsigned int)__a, + (__vector unsigned int)__b, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_idx(__vector unsigned int __a, __vector unsigned int __b) { return __builtin_s390_vfaef(__a, __b, 8); } /*-- vec_find_any_ne_idx_cc -------------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_ne_idx_cc(vector signed char __a, vector signed char __b, - int *__cc) { - return (vector signed char) - __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_ne_idx_cc(__vector signed char __a, + __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_idx_cc(vector bool char __a, vector bool char __b, int *__cc) { - return __builtin_s390_vfaebs((vector unsigned char)__a, - (vector unsigned char)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_idx_cc(__vector __bool char __a, + __vector __bool char __b, int *__cc) { + return __builtin_s390_vfaebs((__vector unsigned char)__a, + (__vector unsigned char)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_idx_cc(vector unsigned char __a, vector unsigned char __b, +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_idx_cc(__vector unsigned char __a, + __vector unsigned char __b, int *__cc) { return __builtin_s390_vfaebs(__a, __b, 8, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_ne_idx_cc(vector signed short __a, vector signed short __b, - int *__cc) { - return (vector signed short) - __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_ne_idx_cc(__vector signed short __a, + __vector signed short __b, int *__cc) { + return (__vector signed short) + __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_idx_cc(vector bool short __a, vector bool short __b, - int *__cc) { - return __builtin_s390_vfaehs((vector unsigned short)__a, - (vector unsigned short)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_idx_cc(__vector __bool short __a, + __vector __bool short __b, int *__cc) { + return __builtin_s390_vfaehs((__vector unsigned short)__a, + (__vector unsigned short)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_idx_cc(vector unsigned short __a, vector unsigned short __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_idx_cc(__vector unsigned short __a, + __vector unsigned short __b, int *__cc) { return __builtin_s390_vfaehs(__a, __b, 8, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_ne_idx_cc(vector signed int __a, vector signed int __b, - int *__cc) { - return (vector signed int) - __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_ne_idx_cc(__vector signed int __a, + __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_idx_cc(vector bool int __a, vector bool int __b, int *__cc) { - return __builtin_s390_vfaefs((vector unsigned int)__a, - (vector unsigned int)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_idx_cc(__vector __bool int __a, + __vector __bool int __b, int *__cc) { + return __builtin_s390_vfaefs((__vector unsigned int)__a, + (__vector unsigned int)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_idx_cc(vector unsigned int __a, vector unsigned int __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_idx_cc(__vector unsigned int __a, + __vector unsigned int __b, int *__cc) { return __builtin_s390_vfaefs(__a, __b, 8, __cc); } /*-- vec_find_any_ne_or_0_idx -----------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_ne_or_0_idx(vector signed char __a, vector signed char __b) { - return (vector signed char) - __builtin_s390_vfaezb((vector unsigned char)__a, - (vector unsigned char)__b, 8); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_ne_or_0_idx(__vector signed char __a, + __vector signed char __b) { + return (__vector signed char) + __builtin_s390_vfaezb((__vector unsigned char)__a, + (__vector unsigned char)__b, 8); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_or_0_idx(vector bool char __a, vector bool char __b) { - return __builtin_s390_vfaezb((vector unsigned char)__a, - (vector unsigned char)__b, 8); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_or_0_idx(__vector __bool char __a, + __vector __bool char __b) { + return __builtin_s390_vfaezb((__vector unsigned char)__a, + (__vector unsigned char)__b, 8); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_or_0_idx(vector unsigned char __a, vector unsigned char __b) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_or_0_idx(__vector unsigned char __a, + __vector unsigned char __b) { return __builtin_s390_vfaezb(__a, __b, 8); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_ne_or_0_idx(vector signed short __a, vector signed short __b) { - return (vector signed short) - __builtin_s390_vfaezh((vector unsigned short)__a, - (vector unsigned short)__b, 8); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_ne_or_0_idx(__vector signed short __a, + __vector signed short __b) { + return (__vector signed short) + __builtin_s390_vfaezh((__vector unsigned short)__a, + (__vector unsigned short)__b, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_or_0_idx(vector bool short __a, vector bool short __b) { - return __builtin_s390_vfaezh((vector unsigned short)__a, - (vector unsigned short)__b, 8); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_or_0_idx(__vector __bool short __a, + __vector __bool short __b) { + return __builtin_s390_vfaezh((__vector unsigned short)__a, + (__vector unsigned short)__b, 8); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_or_0_idx(vector unsigned short __a, vector unsigned short __b) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_or_0_idx(__vector unsigned short __a, + __vector unsigned short __b) { return __builtin_s390_vfaezh(__a, __b, 8); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_ne_or_0_idx(vector signed int __a, vector signed int __b) { - return (vector signed int) - __builtin_s390_vfaezf((vector unsigned int)__a, - (vector unsigned int)__b, 8); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_ne_or_0_idx(__vector signed int __a, + __vector signed int __b) { + return (__vector signed int) + __builtin_s390_vfaezf((__vector unsigned int)__a, + (__vector unsigned int)__b, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_or_0_idx(vector bool int __a, vector bool int __b) { - return __builtin_s390_vfaezf((vector unsigned int)__a, - (vector unsigned int)__b, 8); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_or_0_idx(__vector __bool int __a, + __vector __bool int __b) { + return __builtin_s390_vfaezf((__vector unsigned int)__a, + (__vector unsigned int)__b, 8); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_or_0_idx(vector unsigned int __a, vector unsigned int __b) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_or_0_idx(__vector unsigned int __a, + __vector unsigned int __b) { return __builtin_s390_vfaezf(__a, __b, 8); } /*-- vec_find_any_ne_or_0_idx_cc --------------------------------------------*/ -static inline __ATTRS_o_ai vector signed char -vec_find_any_ne_or_0_idx_cc(vector signed char __a, vector signed char __b, - int *__cc) { - return (vector signed char) - __builtin_s390_vfaezbs((vector unsigned char)__a, - (vector unsigned char)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed char +vec_find_any_ne_or_0_idx_cc(__vector signed char __a, + __vector signed char __b, int *__cc) { + return (__vector signed char) + __builtin_s390_vfaezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_or_0_idx_cc(vector bool char __a, vector bool char __b, - int *__cc) { - return __builtin_s390_vfaezbs((vector unsigned char)__a, - (vector unsigned char)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_or_0_idx_cc(__vector __bool char __a, + __vector __bool char __b, int *__cc) { + return __builtin_s390_vfaezbs((__vector unsigned char)__a, + (__vector unsigned char)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_find_any_ne_or_0_idx_cc(vector unsigned char __a, vector unsigned char __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_find_any_ne_or_0_idx_cc(__vector unsigned char __a, + __vector unsigned char __b, int *__cc) { return __builtin_s390_vfaezbs(__a, __b, 8, __cc); } -static inline __ATTRS_o_ai vector signed short -vec_find_any_ne_or_0_idx_cc(vector signed short __a, vector signed short __b, - int *__cc) { - return (vector signed short) - __builtin_s390_vfaezhs((vector unsigned short)__a, - (vector unsigned short)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed short +vec_find_any_ne_or_0_idx_cc(__vector signed short __a, + __vector signed short __b, int *__cc) { + return (__vector signed short) + __builtin_s390_vfaezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_or_0_idx_cc(vector bool short __a, vector bool short __b, - int *__cc) { - return __builtin_s390_vfaezhs((vector unsigned short)__a, - (vector unsigned short)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_or_0_idx_cc(__vector __bool short __a, + __vector __bool short __b, int *__cc) { + return __builtin_s390_vfaezhs((__vector unsigned short)__a, + (__vector unsigned short)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned short -vec_find_any_ne_or_0_idx_cc(vector unsigned short __a, - vector unsigned short __b, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned short +vec_find_any_ne_or_0_idx_cc(__vector unsigned short __a, + __vector unsigned short __b, int *__cc) { return __builtin_s390_vfaezhs(__a, __b, 8, __cc); } -static inline __ATTRS_o_ai vector signed int -vec_find_any_ne_or_0_idx_cc(vector signed int __a, vector signed int __b, - int *__cc) { - return (vector signed int) - __builtin_s390_vfaezfs((vector unsigned int)__a, - (vector unsigned int)__b, 8, __cc); +static inline __ATTRS_o_ai __vector signed int +vec_find_any_ne_or_0_idx_cc(__vector signed int __a, + __vector signed int __b, int *__cc) { + return (__vector signed int) + __builtin_s390_vfaezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_or_0_idx_cc(vector bool int __a, vector bool int __b, - int *__cc) { - return __builtin_s390_vfaezfs((vector unsigned int)__a, - (vector unsigned int)__b, 8, __cc); +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_or_0_idx_cc(__vector __bool int __a, + __vector __bool int __b, int *__cc) { + return __builtin_s390_vfaezfs((__vector unsigned int)__a, + (__vector unsigned int)__b, 8, __cc); } -static inline __ATTRS_o_ai vector unsigned int -vec_find_any_ne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, - int *__cc) { +static inline __ATTRS_o_ai __vector unsigned int +vec_find_any_ne_or_0_idx_cc(__vector unsigned int __a, + __vector unsigned int __b, int *__cc) { return __builtin_s390_vfaezfs(__a, __b, 8, __cc); } @@ -10711,63 +10847,63 @@ vec_find_any_ne_or_0_idx_cc(vector unsigned int __a, vector unsigned int __b, #if __ARCH__ >= 13 -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector signed char __a, vector signed char __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsb((vector unsigned char)__a, - (vector unsigned char)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector signed char __a, __vector signed char __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsb((__vector unsigned char)__a, + (__vector unsigned char)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector bool char __a, vector bool char __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsb((vector unsigned char)__a, - (vector unsigned char)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector __bool char __a, __vector __bool char __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsb((__vector unsigned char)__a, + (__vector unsigned char)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector unsigned char __a, vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector unsigned char __a, __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrsb(__a, __b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector signed short __a, vector signed short __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsh((vector unsigned short)__a, - (vector unsigned short)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector signed short __a, __vector signed short __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsh((__vector unsigned short)__a, + (__vector unsigned short)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector bool short __a, vector bool short __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsh((vector unsigned short)__a, - (vector unsigned short)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector __bool short __a, __vector __bool short __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsh((__vector unsigned short)__a, + (__vector unsigned short)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector unsigned short __a, vector unsigned short __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector unsigned short __a, __vector unsigned short __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrsh(__a, __b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector signed int __a, vector signed int __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsf((vector unsigned int)__a, - (vector unsigned int)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector signed int __a, __vector signed int __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsf((__vector unsigned int)__a, + (__vector unsigned int)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector bool int __a, vector bool int __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrsf((vector unsigned int)__a, - (vector unsigned int)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector __bool int __a, __vector __bool int __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrsf((__vector unsigned int)__a, + (__vector unsigned int)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_cc(vector unsigned int __a, vector unsigned int __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_cc(__vector unsigned int __a, __vector unsigned int __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrsf(__a, __b, __c, __cc); } @@ -10777,72 +10913,72 @@ vec_search_string_cc(vector unsigned int __a, vector unsigned int __b, #if __ARCH__ >= 13 -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector signed char __a, - vector signed char __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszb((vector unsigned char)__a, - (vector unsigned char)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector signed char __a, + __vector signed char __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszb((__vector unsigned char)__a, + (__vector unsigned char)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector bool char __a, - vector bool char __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszb((vector unsigned char)__a, - (vector unsigned char)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector __bool char __a, + __vector __bool char __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszb((__vector unsigned char)__a, + (__vector unsigned char)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector unsigned char __a, - vector unsigned char __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector unsigned char __a, + __vector unsigned char __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrszb(__a, __b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector signed short __a, - vector signed short __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszh((vector unsigned short)__a, - (vector unsigned short)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector signed short __a, + __vector signed short __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszh((__vector unsigned short)__a, + (__vector unsigned short)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector bool short __a, - vector bool short __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszh((vector unsigned short)__a, - (vector unsigned short)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector __bool short __a, + __vector __bool short __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszh((__vector unsigned short)__a, + (__vector unsigned short)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector unsigned short __a, - vector unsigned short __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector unsigned short __a, + __vector unsigned short __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrszh(__a, __b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector signed int __a, - vector signed int __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszf((vector unsigned int)__a, - (vector unsigned int)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector signed int __a, + __vector signed int __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszf((__vector unsigned int)__a, + (__vector unsigned int)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector bool int __a, - vector bool int __b, - vector unsigned char __c, int *__cc) { - return __builtin_s390_vstrszf((vector unsigned int)__a, - (vector unsigned int)__b, __c, __cc); +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector __bool int __a, + __vector __bool int __b, + __vector unsigned char __c, int *__cc) { + return __builtin_s390_vstrszf((__vector unsigned int)__a, + (__vector unsigned int)__b, __c, __cc); } -static inline __ATTRS_o_ai vector unsigned char -vec_search_string_until_zero_cc(vector unsigned int __a, - vector unsigned int __b, - vector unsigned char __c, int *__cc) { +static inline __ATTRS_o_ai __vector unsigned char +vec_search_string_until_zero_cc(__vector unsigned int __a, + __vector unsigned int __b, + __vector unsigned char __c, int *__cc) { return __builtin_s390_vstrszf(__a, __b, __c, __cc); } diff --git a/clang/lib/Headers/wasm_simd128.h b/clang/lib/Headers/wasm_simd128.h new file mode 100644 index 000000000000..b78123834b64 --- /dev/null +++ b/clang/lib/Headers/wasm_simd128.h @@ -0,0 +1,1133 @@ +/*===---- wasm_simd128.h - WebAssembly portable SIMD intrinsics ------------=== + * + * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. + * See https://llvm.org/LICENSE.txt for license information. + * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + * + *===-----------------------------------------------------------------------=== + */ + +#ifndef __WASM_SIMD128_H +#define __WASM_SIMD128_H + +#include <stdbool.h> +#include <stdint.h> + +// User-facing type +typedef int32_t v128_t __attribute__((__vector_size__(16), __aligned__(16))); + +// Internal types determined by clang builtin definitions +typedef int32_t __v128_u __attribute__((__vector_size__(16), __aligned__(1))); +typedef char __i8x16 __attribute__((__vector_size__(16), __aligned__(16))); +typedef signed char __s8x16 + __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned char __u8x16 + __attribute__((__vector_size__(16), __aligned__(16))); +typedef short __i16x8 __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned short __u16x8 + __attribute__((__vector_size__(16), __aligned__(16))); +typedef int __i32x4 __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned int __u32x4 + __attribute__((__vector_size__(16), __aligned__(16))); +typedef long long __i64x2 __attribute__((__vector_size__(16), __aligned__(16))); +typedef unsigned long long __u64x2 + __attribute__((__vector_size__(16), __aligned__(16))); +typedef float __f32x4 __attribute__((__vector_size__(16), __aligned__(16))); +typedef double __f64x2 __attribute__((__vector_size__(16), __aligned__(16))); + +#define __DEFAULT_FN_ATTRS \ + __attribute__((__always_inline__, __nodebug__, __target__("simd128"), \ + __min_vector_width__(128))) + +#define __REQUIRE_CONSTANT(e) \ + _Static_assert(__builtin_constant_p(e), "Expected constant") + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_load(const void *__mem) { + // UB-free unaligned access copied from xmmintrin.h + struct __wasm_v128_load_struct { + __v128_u __v; + } __attribute__((__packed__, __may_alias__)); + return ((const struct __wasm_v128_load_struct *)__mem)->__v; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_v8x16_load_splat(const void *__mem) { + struct __wasm_v8x16_load_splat_struct { + uint8_t __v; + } __attribute__((__packed__, __may_alias__)); + uint8_t __v = ((const struct __wasm_v8x16_load_splat_struct *)__mem)->__v; + return (v128_t)(__u8x16){__v, __v, __v, __v, __v, __v, __v, __v, + __v, __v, __v, __v, __v, __v, __v, __v}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_v16x8_load_splat(const void *__mem) { + struct __wasm_v16x8_load_splat_struct { + uint16_t __v; + } __attribute__((__packed__, __may_alias__)); + uint16_t __v = ((const struct __wasm_v16x8_load_splat_struct *)__mem)->__v; + return (v128_t)(__u16x8){__v, __v, __v, __v, __v, __v, __v, __v}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_v32x4_load_splat(const void *__mem) { + struct __wasm_v32x4_load_splat_struct { + uint32_t __v; + } __attribute__((__packed__, __may_alias__)); + uint32_t __v = ((const struct __wasm_v32x4_load_splat_struct *)__mem)->__v; + return (v128_t)(__u32x4){__v, __v, __v, __v}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_v64x2_load_splat(const void *__mem) { + struct __wasm_v64x2_load_splat_struct { + uint64_t __v; + } __attribute__((__packed__, __may_alias__)); + uint64_t __v = ((const struct __wasm_v64x2_load_splat_struct *)__mem)->__v; + return (v128_t)(__u64x2){__v, __v}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_load_8x8(const void *__mem) { + typedef int8_t __i8x8 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_i16x8_load_8x8_struct { + __i8x8 __v; + } __attribute__((__packed__, __may_alias__)); + __i8x8 __v = ((const struct __wasm_i16x8_load_8x8_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __i16x8); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u16x8_load_8x8(const void *__mem) { + typedef uint8_t __u8x8 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_u16x8_load_8x8_struct { + __u8x8 __v; + } __attribute__((__packed__, __may_alias__)); + __u8x8 __v = ((const struct __wasm_u16x8_load_8x8_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __u16x8); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_load_16x4(const void *__mem) { + typedef int16_t __i16x4 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_i32x4_load_16x4_struct { + __i16x4 __v; + } __attribute__((__packed__, __may_alias__)); + __i16x4 __v = ((const struct __wasm_i32x4_load_16x4_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __i32x4); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u32x4_load_16x4(const void *__mem) { + typedef uint16_t __u16x4 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_u32x4_load_16x4_struct { + __u16x4 __v; + } __attribute__((__packed__, __may_alias__)); + __u16x4 __v = ((const struct __wasm_u32x4_load_16x4_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __u32x4); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i64x2_load_32x2(const void *__mem) { + typedef int32_t __i32x2 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_i64x2_load_32x2_struct { + __i32x2 __v; + } __attribute__((__packed__, __may_alias__)); + __i32x2 __v = ((const struct __wasm_i64x2_load_32x2_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __i64x2); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u64x2_load_32x2(const void *__mem) { + typedef uint32_t __u32x2 __attribute__((__vector_size__(8), __aligned__(8))); + struct __wasm_u64x2_load_32x2_struct { + __u32x2 __v; + } __attribute__((__packed__, __may_alias__)); + __u32x2 __v = ((const struct __wasm_u64x2_load_32x2_struct *)__mem)->__v; + return (v128_t) __builtin_convertvector(__v, __u64x2); +} + +static __inline__ void __DEFAULT_FN_ATTRS wasm_v128_store(void *__mem, + v128_t __a) { + // UB-free unaligned access copied from xmmintrin.h + struct __wasm_v128_store_struct { + __v128_u __v; + } __attribute__((__packed__, __may_alias__)); + ((struct __wasm_v128_store_struct *)__mem)->__v = __a; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i8x16_make(int8_t __c0, int8_t __c1, int8_t __c2, int8_t __c3, int8_t __c4, + int8_t __c5, int8_t __c6, int8_t __c7, int8_t __c8, int8_t __c9, + int8_t __c10, int8_t __c11, int8_t __c12, int8_t __c13, + int8_t __c14, int8_t __c15) { + return (v128_t)(__i8x16){__c0, __c1, __c2, __c3, __c4, __c5, + __c6, __c7, __c8, __c9, __c10, __c11, + __c12, __c13, __c14, __c15}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_make(int16_t __c0, int16_t __c1, int16_t __c2, int16_t __c3, + int16_t __c4, int16_t __c5, int16_t __c6, int16_t __c7) { + return (v128_t)(__i16x8){__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_make(int32_t __c0, + int32_t __c1, + int32_t __c2, + int32_t __c3) { + return (v128_t)(__i32x4){__c0, __c1, __c2, __c3}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_make(float __c0, + float __c1, + float __c2, + float __c3) { + return (v128_t)(__f32x4){__c0, __c1, __c2, __c3}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_make(int64_t __c0, + int64_t __c1) { + return (v128_t)(__i64x2){__c0, __c1}; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_make(double __c0, + double __c1) { + return (v128_t)(__f64x2){__c0, __c1}; +} + +#define wasm_i8x16_const(__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7, __c8, \ + __c9, __c10, __c11, __c12, __c13, __c14, __c15) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + __REQUIRE_CONSTANT(__c2); \ + __REQUIRE_CONSTANT(__c3); \ + __REQUIRE_CONSTANT(__c4); \ + __REQUIRE_CONSTANT(__c5); \ + __REQUIRE_CONSTANT(__c6); \ + __REQUIRE_CONSTANT(__c7); \ + __REQUIRE_CONSTANT(__c8); \ + __REQUIRE_CONSTANT(__c9); \ + __REQUIRE_CONSTANT(__c10); \ + __REQUIRE_CONSTANT(__c11); \ + __REQUIRE_CONSTANT(__c12); \ + __REQUIRE_CONSTANT(__c13); \ + __REQUIRE_CONSTANT(__c14); \ + __REQUIRE_CONSTANT(__c15); \ + (v128_t)(__i8x16){__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7, \ + __c8, __c9, __c10, __c11, __c12, __c13, __c14, __c15}; \ + }) + +#define wasm_i16x8_const(__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + __REQUIRE_CONSTANT(__c2); \ + __REQUIRE_CONSTANT(__c3); \ + __REQUIRE_CONSTANT(__c4); \ + __REQUIRE_CONSTANT(__c5); \ + __REQUIRE_CONSTANT(__c6); \ + __REQUIRE_CONSTANT(__c7); \ + (v128_t)(__i16x8){__c0, __c1, __c2, __c3, __c4, __c5, __c6, __c7}; \ + }) + +#define wasm_i32x4_const(__c0, __c1, __c2, __c3) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + __REQUIRE_CONSTANT(__c2); \ + __REQUIRE_CONSTANT(__c3); \ + (v128_t)(__i32x4){__c0, __c1, __c2, __c3}; \ + }) + +#define wasm_f32x4_const(__c0, __c1, __c2, __c3) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + __REQUIRE_CONSTANT(__c2); \ + __REQUIRE_CONSTANT(__c3); \ + (v128_t)(__f32x4){__c0, __c1, __c2, __c3}; \ + }) + +#define wasm_i64x2_const(__c0, __c1) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + (v128_t)(__i64x2){__c0, __c1}; \ + }) + +#define wasm_f64x2_const(__c0, __c1) \ + __extension__({ \ + __REQUIRE_CONSTANT(__c0); \ + __REQUIRE_CONSTANT(__c1); \ + (v128_t)(__f64x2){__c0, __c1}; \ + }) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_splat(int8_t __a) { + return (v128_t)(__i8x16){__a, __a, __a, __a, __a, __a, __a, __a, + __a, __a, __a, __a, __a, __a, __a, __a}; +} + +#define wasm_i8x16_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_s_i8x16((__i8x16)(__a), __i)) + +#define wasm_u8x16_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_u_i8x16((__i8x16)(__a), __i)) + +#define wasm_i8x16_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_i8x16((__i8x16)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_splat(int16_t __a) { + return (v128_t)(__i16x8){__a, __a, __a, __a, __a, __a, __a, __a}; +} + +#define wasm_i16x8_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_s_i16x8((__i16x8)(__a), __i)) + +#define wasm_u16x8_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_u_i16x8((__i16x8)(__a), __i)) + +#define wasm_i16x8_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_i16x8((__i16x8)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_splat(int32_t __a) { + return (v128_t)(__i32x4){__a, __a, __a, __a}; +} + +#define wasm_i32x4_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_i32x4((__i32x4)(__a), __i)) + +#define wasm_i32x4_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_i32x4((__i32x4)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_splat(int64_t __a) { + return (v128_t)(__i64x2){__a, __a}; +} + +#define wasm_i64x2_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_i64x2((__i64x2)(__a), __i)) + +#define wasm_i64x2_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_i64x2((__i64x2)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_splat(float __a) { + return (v128_t)(__f32x4){__a, __a, __a, __a}; +} + +#define wasm_f32x4_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_f32x4((__f32x4)(__a), __i)) + +#define wasm_f32x4_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_f32x4((__f32x4)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_splat(double __a) { + return (v128_t)(__f64x2){__a, __a}; +} + +#define wasm_f64x2_extract_lane(__a, __i) \ + (__builtin_wasm_extract_lane_f64x2((__f64x2)(__a), __i)) + +#define wasm_f64x2_replace_lane(__a, __i, __b) \ + ((v128_t)__builtin_wasm_replace_lane_f64x2((__f64x2)(__a), __i, __b)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_eq(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a == (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ne(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a != (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a < (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a < (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a > (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a > (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_le(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a <= (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_le(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a <= (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__s8x16)__a >= (__s8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a >= (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_eq(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a == (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_ne(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a != (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a < (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a < (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a > (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a > (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_le(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a <= (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_le(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a <= (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a >= (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a >= (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_eq(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a == (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_ne(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a != (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a < (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a < (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a > (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a > (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_le(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a <= (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_le(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a <= (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__i32x4)__a >= (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a >= (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_eq(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a == (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ne(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a != (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a < (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a > (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_le(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a <= (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a >= (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_eq(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a == (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_ne(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a != (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_lt(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a < (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_gt(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a > (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_le(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a <= (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_ge(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a >= (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_not(v128_t __a) { + return ~__a; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_and(v128_t __a, + v128_t __b) { + return __a & __b; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_or(v128_t __a, + v128_t __b) { + return __a | __b; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_xor(v128_t __a, + v128_t __b) { + return __a ^ __b; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_andnot(v128_t __a, + v128_t __b) { + return __a & ~__b; +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v128_bitselect(v128_t __a, + v128_t __b, + v128_t __mask) { + return (v128_t)__builtin_wasm_bitselect((__i32x4)__a, (__i32x4)__b, + (__i32x4)__mask); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_abs(v128_t __a) { + return (v128_t)__builtin_wasm_abs_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_neg(v128_t __a) { + return (v128_t)(-(__u8x16)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i8x16_any_true(v128_t __a) { + return __builtin_wasm_any_true_i8x16((__i8x16)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i8x16_all_true(v128_t __a) { + return __builtin_wasm_all_true_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shl(v128_t __a, + int32_t __b) { + return (v128_t)((__i8x16)__a << __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__s8x16)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__u8x16)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_add(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a + (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i8x16_add_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_add_saturate_s_i8x16((__i8x16)__a, + (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u8x16_add_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_add_saturate_u_i8x16((__i8x16)__a, + (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__u8x16)__a - (__u8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i8x16_sub_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_sub_saturate_s_i8x16((__i8x16)__a, + (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u8x16_sub_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_sub_saturate_u_i8x16((__i8x16)__a, + (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_s_i8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_u_i8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i8x16_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_s_i8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_u_i8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u8x16_avgr(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_avgr_u_i8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_abs(v128_t __a) { + return (v128_t)__builtin_wasm_abs_i16x8((__i16x8)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_neg(v128_t __a) { + return (v128_t)(-(__u16x8)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i16x8_any_true(v128_t __a) { + return __builtin_wasm_any_true_i16x8((__i16x8)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i16x8_all_true(v128_t __a) { + return __builtin_wasm_all_true_i16x8((__i16x8)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_shl(v128_t __a, + int32_t __b) { + return (v128_t)((__i16x8)__a << __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__i16x8)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__u16x8)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_add(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a + (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_add_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_add_saturate_s_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u16x8_add_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_add_saturate_u_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__i16x8)__a - (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_sub_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_sub_saturate_s_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u16x8_sub_saturate(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_sub_saturate_u_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_mul(v128_t __a, + v128_t __b) { + return (v128_t)((__u16x8)__a * (__u16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_s_i16x8((__i16x8)__a, (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_u_i16x8((__i16x8)__a, (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i16x8_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_s_i16x8((__i16x8)__a, (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_u_i16x8((__i16x8)__a, (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u16x8_avgr(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_avgr_u_i16x8((__i16x8)__a, (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_abs(v128_t __a) { + return (v128_t)__builtin_wasm_abs_i32x4((__i32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_neg(v128_t __a) { + return (v128_t)(-(__u32x4)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i32x4_any_true(v128_t __a) { + return __builtin_wasm_any_true_i32x4((__i32x4)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i32x4_all_true(v128_t __a) { + return __builtin_wasm_all_true_i32x4((__i32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_shl(v128_t __a, + int32_t __b) { + return (v128_t)((__i32x4)__a << __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__i32x4)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__u32x4)__a >> __b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_add(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a + (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a - (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_mul(v128_t __a, + v128_t __b) { + return (v128_t)((__u32x4)__a * (__u32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_s_i32x4((__i32x4)__a, (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_u_i32x4((__i32x4)__a, (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i32x4_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_s_i32x4((__i32x4)__a, (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u32x4_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_u_i32x4((__i32x4)__a, (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_neg(v128_t __a) { + return (v128_t)(-(__u64x2)__a); +} + +#ifdef __wasm_unimplemented_simd128__ + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i64x2_any_true(v128_t __a) { + return __builtin_wasm_any_true_i64x2((__i64x2)__a); +} + +static __inline__ bool __DEFAULT_FN_ATTRS wasm_i64x2_all_true(v128_t __a) { + return __builtin_wasm_all_true_i64x2((__i64x2)__a); +} + +#endif // __wasm_unimplemented_simd128__ + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_shl(v128_t __a, + int32_t __b) { + return (v128_t)((__i64x2)__a << (int64_t)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__i64x2)__a >> (int64_t)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_u64x2_shr(v128_t __a, + int32_t __b) { + return (v128_t)((__u64x2)__a >> (int64_t)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_add(v128_t __a, + v128_t __b) { + return (v128_t)((__u64x2)__a + (__u64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__u64x2)__a - (__u64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_i64x2_mul(v128_t __a, + v128_t __b) { + return (v128_t)((__u64x2)__a * (__u64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_abs(v128_t __a) { + return (v128_t)__builtin_wasm_abs_f32x4((__f32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_neg(v128_t __a) { + return (v128_t)(-(__f32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_sqrt(v128_t __a) { + return (v128_t)__builtin_wasm_sqrt_f32x4((__f32x4)__a); +} + +#ifdef __wasm_unimplemented_simd128__ + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_qfma(v128_t __a, + v128_t __b, + v128_t __c) { + return (v128_t)__builtin_wasm_qfma_f32x4((__f32x4)__a, (__f32x4)__b, + (__f32x4)__c); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_qfms(v128_t __a, + v128_t __b, + v128_t __c) { + return (v128_t)__builtin_wasm_qfms_f32x4((__f32x4)__a, (__f32x4)__b, + (__f32x4)__c); +} + +#endif // __wasm_unimplemented_simd128__ + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_add(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a + (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a - (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_mul(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a * (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_div(v128_t __a, + v128_t __b) { + return (v128_t)((__f32x4)__a / (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_f32x4((__f32x4)__a, (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_f32x4((__f32x4)__a, (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_pmin(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_pmin_f32x4((__f32x4)__a, (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f32x4_pmax(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_pmax_f32x4((__f32x4)__a, (__f32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_abs(v128_t __a) { + return (v128_t)__builtin_wasm_abs_f64x2((__f64x2)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_neg(v128_t __a) { + return (v128_t)(-(__f64x2)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_sqrt(v128_t __a) { + return (v128_t)__builtin_wasm_sqrt_f64x2((__f64x2)__a); +} + +#ifdef __wasm_unimplemented_simd128__ + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_qfma(v128_t __a, + v128_t __b, + v128_t __c) { + return (v128_t)__builtin_wasm_qfma_f64x2((__f64x2)__a, (__f64x2)__b, + (__f64x2)__c); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_qfms(v128_t __a, + v128_t __b, + v128_t __c) { + return (v128_t)__builtin_wasm_qfms_f64x2((__f64x2)__a, (__f64x2)__b, + (__f64x2)__c); +} + +#endif // __wasm_unimplemented_simd128__ + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_add(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a + (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_sub(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a - (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_mul(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a * (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_div(v128_t __a, + v128_t __b) { + return (v128_t)((__f64x2)__a / (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_min(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_min_f64x2((__f64x2)__a, (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_max(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_max_f64x2((__f64x2)__a, (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_pmin(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_pmin_f64x2((__f64x2)__a, (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_f64x2_pmax(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_pmax_f64x2((__f64x2)__a, (__f64x2)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_trunc_saturate_f32x4(v128_t __a) { + return (v128_t)__builtin_wasm_trunc_saturate_s_i32x4_f32x4((__f32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u32x4_trunc_saturate_f32x4(v128_t __a) { + return (v128_t)__builtin_wasm_trunc_saturate_u_i32x4_f32x4((__f32x4)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_f32x4_convert_i32x4(v128_t __a) { + return (v128_t) __builtin_convertvector((__i32x4)__a, __f32x4); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_f32x4_convert_u32x4(v128_t __a) { + return (v128_t) __builtin_convertvector((__u32x4)__a, __f32x4); +} + +#define wasm_v8x16_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \ + __c7, __c8, __c9, __c10, __c11, __c12, __c13, \ + __c14, __c15) \ + ((v128_t)__builtin_wasm_shuffle_v8x16( \ + (__i8x16)(__a), (__i8x16)(__b), __c0, __c1, __c2, __c3, __c4, __c5, \ + __c6, __c7, __c8, __c9, __c10, __c11, __c12, __c13, __c14, __c15)) + +#define wasm_v16x8_shuffle(__a, __b, __c0, __c1, __c2, __c3, __c4, __c5, __c6, \ + __c7) \ + ((v128_t)__builtin_wasm_shuffle_v8x16( \ + (__i8x16)(__a), (__i8x16)(__b), (__c0)*2, (__c0)*2 + 1, (__c1)*2, \ + (__c1)*2 + 1, (__c2)*2, (__c2)*2 + 1, (__c3)*2, (__c3)*2 + 1, (__c4)*2, \ + (__c4)*2 + 1, (__c5)*2, (__c5)*2 + 1, (__c6)*2, (__c6)*2 + 1, (__c7)*2, \ + (__c7)*2 + 1)) + +#define wasm_v32x4_shuffle(__a, __b, __c0, __c1, __c2, __c3) \ + ((v128_t)__builtin_wasm_shuffle_v8x16( \ + (__i8x16)(__a), (__i8x16)(__b), (__c0)*4, (__c0)*4 + 1, (__c0)*4 + 2, \ + (__c0)*4 + 3, (__c1)*4, (__c1)*4 + 1, (__c1)*4 + 2, (__c1)*4 + 3, \ + (__c2)*4, (__c2)*4 + 1, (__c2)*4 + 2, (__c2)*4 + 3, (__c3)*4, \ + (__c3)*4 + 1, (__c3)*4 + 2, (__c3)*4 + 3)) + +#define wasm_v64x2_shuffle(__a, __b, __c0, __c1) \ + ((v128_t)__builtin_wasm_shuffle_v8x16( \ + (__i8x16)(__a), (__i8x16)(__b), (__c0)*8, (__c0)*8 + 1, (__c0)*8 + 2, \ + (__c0)*8 + 3, (__c0)*8 + 4, (__c0)*8 + 5, (__c0)*8 + 6, (__c0)*8 + 7, \ + (__c1)*8, (__c1)*8 + 1, (__c1)*8 + 2, (__c1)*8 + 3, (__c1)*8 + 4, \ + (__c1)*8 + 5, (__c1)*8 + 6, (__c1)*8 + 7)) + +static __inline__ v128_t __DEFAULT_FN_ATTRS wasm_v8x16_swizzle(v128_t __a, + v128_t __b) { + return (v128_t)__builtin_wasm_swizzle_v8x16((__i8x16)__a, (__i8x16)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i8x16_narrow_i16x8(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_narrow_s_i8x16_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u8x16_narrow_i16x8(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_narrow_u_i8x16_i16x8((__i16x8)__a, + (__i16x8)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_narrow_i32x4(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_narrow_s_i16x8_i32x4((__i32x4)__a, + (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_u16x8_narrow_i32x4(v128_t __a, v128_t __b) { + return (v128_t)__builtin_wasm_narrow_u_i16x8_i32x4((__i32x4)__a, + (__i32x4)__b); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_widen_low_i8x16(v128_t __a) { + return (v128_t)__builtin_wasm_widen_low_s_i16x8_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_widen_high_i8x16(v128_t __a) { + return (v128_t)__builtin_wasm_widen_high_s_i16x8_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_widen_low_u8x16(v128_t __a) { + return (v128_t)__builtin_wasm_widen_low_u_i16x8_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i16x8_widen_high_u8x16(v128_t __a) { + return (v128_t)__builtin_wasm_widen_high_u_i16x8_i8x16((__i8x16)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_widen_low_i16x8(v128_t __a) { + return (v128_t)__builtin_wasm_widen_low_s_i32x4_i16x8((__i16x8)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_widen_high_i16x8(v128_t __a) { + return (v128_t)__builtin_wasm_widen_high_s_i32x4_i16x8((__i16x8)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_widen_low_u16x8(v128_t __a) { + return (v128_t)__builtin_wasm_widen_low_u_i32x4_i16x8((__i16x8)__a); +} + +static __inline__ v128_t __DEFAULT_FN_ATTRS +wasm_i32x4_widen_high_u16x8(v128_t __a) { + return (v128_t)__builtin_wasm_widen_high_u_i32x4_i16x8((__i16x8)__a); +} + +// Undefine helper macros +#undef __DEFAULT_FN_ATTRS + +#endif // __WASM_SIMD128_H diff --git a/clang/lib/Headers/x86intrin.h b/clang/lib/Headers/x86intrin.h index a8b36622d410..768d0e56ab05 100644 --- a/clang/lib/Headers/x86intrin.h +++ b/clang/lib/Headers/x86intrin.h @@ -14,39 +14,48 @@ #include <immintrin.h> -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__3dNOW__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__3dNOW__) #include <mm3dnow.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PRFCHW__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__PRFCHW__) #include <prfchwintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE4A__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__SSE4A__) #include <ammintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA4__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__FMA4__) #include <fma4intrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XOP__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__XOP__) #include <xopintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__TBM__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__TBM__) #include <tbmintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__LWP__) #include <lwpintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MWAITX__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__MWAITX__) #include <mwaitxintrin.h> #endif -#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__) +#if !(defined(_MSC_VER) || defined(__SCE__)) || __has_feature(modules) || \ + defined(__CLZERO__) #include <clzerointrin.h> #endif diff --git a/clang/lib/Headers/xmmintrin.h b/clang/lib/Headers/xmmintrin.h index 0e61eab44aeb..f4686691c7ed 100644 --- a/clang/lib/Headers/xmmintrin.h +++ b/clang/lib/Headers/xmmintrin.h @@ -2181,7 +2181,7 @@ void _mm_sfence(void); /// 3: Bits [63:48] are copied to the destination. /// \returns A 16-bit integer containing the extracted 16 bits of packed data. #define _mm_extract_pi16(a, n) \ - (int)__builtin_ia32_vec_ext_v4hi((__m64)a, (int)n) + (int)__builtin_ia32_vec_ext_v4hi((__v4hi)a, (int)n) /// Copies data from the 64-bit vector of [4 x i16] to the destination, /// and inserts the lower 16-bits of an integer operand at the 16-bit offset @@ -2212,7 +2212,7 @@ void _mm_sfence(void); /// \returns A 64-bit integer vector containing the copied packed data from the /// operands. #define _mm_insert_pi16(a, d, n) \ - (__m64)__builtin_ia32_vec_set_v4hi((__m64)a, (int)d, (int)n) + (__m64)__builtin_ia32_vec_set_v4hi((__v4hi)a, (int)d, (int)n) /// Compares each of the corresponding packed 16-bit integer values of /// the 64-bit integer vectors, and writes the greater value to the @@ -2931,31 +2931,31 @@ _mm_movemask_ps(__m128 __a) #define _MM_SHUFFLE(z, y, x, w) (((z) << 6) | ((y) << 4) | ((x) << 2) | (w)) -#define _MM_EXCEPT_INVALID (0x0001) -#define _MM_EXCEPT_DENORM (0x0002) -#define _MM_EXCEPT_DIV_ZERO (0x0004) -#define _MM_EXCEPT_OVERFLOW (0x0008) -#define _MM_EXCEPT_UNDERFLOW (0x0010) -#define _MM_EXCEPT_INEXACT (0x0020) -#define _MM_EXCEPT_MASK (0x003f) - -#define _MM_MASK_INVALID (0x0080) -#define _MM_MASK_DENORM (0x0100) -#define _MM_MASK_DIV_ZERO (0x0200) -#define _MM_MASK_OVERFLOW (0x0400) -#define _MM_MASK_UNDERFLOW (0x0800) -#define _MM_MASK_INEXACT (0x1000) -#define _MM_MASK_MASK (0x1f80) - -#define _MM_ROUND_NEAREST (0x0000) -#define _MM_ROUND_DOWN (0x2000) -#define _MM_ROUND_UP (0x4000) -#define _MM_ROUND_TOWARD_ZERO (0x6000) -#define _MM_ROUND_MASK (0x6000) - -#define _MM_FLUSH_ZERO_MASK (0x8000) -#define _MM_FLUSH_ZERO_ON (0x8000) -#define _MM_FLUSH_ZERO_OFF (0x0000) +#define _MM_EXCEPT_INVALID (0x0001U) +#define _MM_EXCEPT_DENORM (0x0002U) +#define _MM_EXCEPT_DIV_ZERO (0x0004U) +#define _MM_EXCEPT_OVERFLOW (0x0008U) +#define _MM_EXCEPT_UNDERFLOW (0x0010U) +#define _MM_EXCEPT_INEXACT (0x0020U) +#define _MM_EXCEPT_MASK (0x003fU) + +#define _MM_MASK_INVALID (0x0080U) +#define _MM_MASK_DENORM (0x0100U) +#define _MM_MASK_DIV_ZERO (0x0200U) +#define _MM_MASK_OVERFLOW (0x0400U) +#define _MM_MASK_UNDERFLOW (0x0800U) +#define _MM_MASK_INEXACT (0x1000U) +#define _MM_MASK_MASK (0x1f80U) + +#define _MM_ROUND_NEAREST (0x0000U) +#define _MM_ROUND_DOWN (0x2000U) +#define _MM_ROUND_UP (0x4000U) +#define _MM_ROUND_TOWARD_ZERO (0x6000U) +#define _MM_ROUND_MASK (0x6000U) + +#define _MM_FLUSH_ZERO_MASK (0x8000U) +#define _MM_FLUSH_ZERO_ON (0x8000U) +#define _MM_FLUSH_ZERO_OFF (0x0000U) #define _MM_GET_EXCEPTION_MASK() (_mm_getcsr() & _MM_MASK_MASK) #define _MM_GET_EXCEPTION_STATE() (_mm_getcsr() & _MM_EXCEPT_MASK) |