authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-30 18:20:12-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-09-30 18:20:55-04:00
logcd58b400110586bb0d0632dce0f667efbc3dbd88
treefa0b6571c6c8fbfb8337e1fce54e63fad93f25b3
parentba3d21ca67af0ce47841bc2d0258903ccaf89a75

update C headers to clang 5.0.0


37 files changed, 5707 insertions(+), 1837 deletions(-)

CMakeLists.txt+3
...@@ -410,10 +410,12 @@ install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlbwintrin.h" DESTINATION "${...@@ -410,10 +410,12 @@ install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlbwintrin.h" DESTINATION "${
410install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlcdintrin.h" DESTINATION "${C_HEADERS_DEST}")410install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlcdintrin.h" DESTINATION "${C_HEADERS_DEST}")
411install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vldqintrin.h" DESTINATION "${C_HEADERS_DEST}")411install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vldqintrin.h" DESTINATION "${C_HEADERS_DEST}")
412install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlintrin.h" DESTINATION "${C_HEADERS_DEST}")412install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vlintrin.h" DESTINATION "${C_HEADERS_DEST}")
413install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avx512vpopcntdqintrin.h" DESTINATION "${C_HEADERS_DEST}")
413install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avxintrin.h" DESTINATION "${C_HEADERS_DEST}")414install(FILES "${CMAKE_SOURCE_DIR}/c_headers/avxintrin.h" DESTINATION "${C_HEADERS_DEST}")
414install(FILES "${CMAKE_SOURCE_DIR}/c_headers/bmi2intrin.h" DESTINATION "${C_HEADERS_DEST}")415install(FILES "${CMAKE_SOURCE_DIR}/c_headers/bmi2intrin.h" DESTINATION "${C_HEADERS_DEST}")
415install(FILES "${CMAKE_SOURCE_DIR}/c_headers/bmiintrin.h" DESTINATION "${C_HEADERS_DEST}")416install(FILES "${CMAKE_SOURCE_DIR}/c_headers/bmiintrin.h" DESTINATION "${C_HEADERS_DEST}")
416install(FILES "${CMAKE_SOURCE_DIR}/c_headers/clflushoptintrin.h" DESTINATION "${C_HEADERS_DEST}")417install(FILES "${CMAKE_SOURCE_DIR}/c_headers/clflushoptintrin.h" DESTINATION "${C_HEADERS_DEST}")
418install(FILES "${CMAKE_SOURCE_DIR}/c_headers/clzerointrin.h" DESTINATION "${C_HEADERS_DEST}")
417install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cpuid.h" DESTINATION "${C_HEADERS_DEST}")419install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cpuid.h" DESTINATION "${C_HEADERS_DEST}")
418install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cuda_wrappers/algorithm" DESTINATION "${C_HEADERS_DEST}/cuda_wrappers")420install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cuda_wrappers/algorithm" DESTINATION "${C_HEADERS_DEST}/cuda_wrappers")
419install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cuda_wrappers/complex" DESTINATION "${C_HEADERS_DEST}/cuda_wrappers")421install(FILES "${CMAKE_SOURCE_DIR}/c_headers/cuda_wrappers/complex" DESTINATION "${C_HEADERS_DEST}/cuda_wrappers")
...@@ -432,6 +434,7 @@ install(FILES "${CMAKE_SOURCE_DIR}/c_headers/intrin.h" DESTINATION "${C_HEADERS_...@@ -432,6 +434,7 @@ install(FILES "${CMAKE_SOURCE_DIR}/c_headers/intrin.h" DESTINATION "${C_HEADERS_
432install(FILES "${CMAKE_SOURCE_DIR}/c_headers/inttypes.h" DESTINATION "${C_HEADERS_DEST}")434install(FILES "${CMAKE_SOURCE_DIR}/c_headers/inttypes.h" DESTINATION "${C_HEADERS_DEST}")
433install(FILES "${CMAKE_SOURCE_DIR}/c_headers/iso646.h" DESTINATION "${C_HEADERS_DEST}")435install(FILES "${CMAKE_SOURCE_DIR}/c_headers/iso646.h" DESTINATION "${C_HEADERS_DEST}")
434install(FILES "${CMAKE_SOURCE_DIR}/c_headers/limits.h" DESTINATION "${C_HEADERS_DEST}")436install(FILES "${CMAKE_SOURCE_DIR}/c_headers/limits.h" DESTINATION "${C_HEADERS_DEST}")
437install(FILES "${CMAKE_SOURCE_DIR}/c_headers/lwpintrin.h" DESTINATION "${C_HEADERS_DEST}")
435install(FILES "${CMAKE_SOURCE_DIR}/c_headers/lzcntintrin.h" DESTINATION "${C_HEADERS_DEST}")438install(FILES "${CMAKE_SOURCE_DIR}/c_headers/lzcntintrin.h" DESTINATION "${C_HEADERS_DEST}")
436install(FILES "${CMAKE_SOURCE_DIR}/c_headers/mm3dnow.h" DESTINATION "${C_HEADERS_DEST}")439install(FILES "${CMAKE_SOURCE_DIR}/c_headers/mm3dnow.h" DESTINATION "${C_HEADERS_DEST}")
437install(FILES "${CMAKE_SOURCE_DIR}/c_headers/mm_malloc.h" DESTINATION "${C_HEADERS_DEST}")440install(FILES "${CMAKE_SOURCE_DIR}/c_headers/mm_malloc.h" DESTINATION "${C_HEADERS_DEST}")
c_headers/altivec.h+79-76
...@@ -2887,87 +2887,79 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,...@@ -2887,87 +2887,79 @@ static __inline__ vector double __ATTRS_o_ai vec_cpsgn(vector double __a,
28872887
2888/* vec_ctf */2888/* vec_ctf */
28892889
2890static __inline__ vector float __ATTRS_o_ai vec_ctf(vector int __a, int __b) {
2891 return __builtin_altivec_vcfsx(__a, __b);
2892}
2893
2894static __inline__ vector float __ATTRS_o_ai vec_ctf(vector unsigned int __a,
2895 int __b) {
2896 return __builtin_altivec_vcfux((vector int)__a, __b);
2897}
2898
2899#ifdef __VSX__2890#ifdef __VSX__
2900static __inline__ vector double __ATTRS_o_ai2891#define vec_ctf(__a, __b) \
2901vec_ctf(vector unsigned long long __a, int __b) {2892 _Generic((__a), vector int \
2902 vector double __ret = __builtin_convertvector(__a, vector double);2893 : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \
2903 __ret *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);2894 vector unsigned int \
2904 return __ret;2895 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b)), \
2905}2896 vector unsigned long long \
29062897 : (__builtin_convertvector((vector unsigned long long)(__a), \
2907static __inline__ vector double __ATTRS_o_ai2898 vector double) * \
2908vec_ctf(vector signed long long __a, int __b) {2899 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
2909 vector double __ret = __builtin_convertvector(__a, vector double);2900 << 52)), \
2910 __ret *= (vector double)(vector unsigned long long)((0x3ffULL - __b) << 52);2901 vector signed long long \
2911 return __ret;2902 : (__builtin_convertvector((vector signed long long)(__a), \
2912}2903 vector double) * \
2904 (vector double)(vector unsigned long long)((0x3ffULL - (__b)) \
2905 << 52)))
2906#else
2907#define vec_ctf(__a, __b) \
2908 _Generic((__a), vector int \
2909 : (vector float)__builtin_altivec_vcfsx((__a), (__b)), \
2910 vector unsigned int \
2911 : (vector float)__builtin_altivec_vcfux((vector int)(__a), (__b)))
2913#endif2912#endif
29142913
2915/* vec_vcfsx */2914/* vec_vcfsx */
29162915
2917static __inline__ vector float __attribute__((__always_inline__))2916#define vec_vcfux __builtin_altivec_vcfux
2918vec_vcfsx(vector int __a, int __b) {
2919 return __builtin_altivec_vcfsx(__a, __b);
2920}
29212917
2922/* vec_vcfux */2918/* vec_vcfux */
29232919
2924static __inline__ vector float __attribute__((__always_inline__))2920#define vec_vcfsx(__a, __b) __builtin_altivec_vcfsx((vector int)(__a), (__b))
2925vec_vcfux(vector unsigned int __a, int __b) {
2926 return __builtin_altivec_vcfux((vector int)__a, __b);
2927}
29282921
2929/* vec_cts */2922/* vec_cts */
29302923
2931static __inline__ vector int __ATTRS_o_ai vec_cts(vector float __a, int __b) {
2932 return __builtin_altivec_vctsxs(__a, __b);
2933}
2934
2935#ifdef __VSX__2924#ifdef __VSX__
2936static __inline__ vector signed long long __ATTRS_o_ai2925#define vec_cts(__a, __b) \
2937vec_cts(vector double __a, int __b) {2926 _Generic((__a), vector float \
2938 __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);2927 : __builtin_altivec_vctsxs((__a), (__b)), vector double \
2939 return __builtin_convertvector(__a, vector signed long long);2928 : __extension__({ \
2940}2929 vector double __ret = \
2930 (__a) * \
2931 (vector double)(vector unsigned long long)((0x3ffULL + (__b)) \
2932 << 52); \
2933 __builtin_convertvector(__ret, vector signed long long); \
2934 }))
2935#else
2936#define vec_cts __builtin_altivec_vctsxs
2941#endif2937#endif
29422938
2943/* vec_vctsxs */2939/* vec_vctsxs */
29442940
2945static __inline__ vector int __attribute__((__always_inline__))2941#define vec_vctsxs __builtin_altivec_vctsxs
2946vec_vctsxs(vector float __a, int __b) {
2947 return __builtin_altivec_vctsxs(__a, __b);
2948}
29492942
2950/* vec_ctu */2943/* vec_ctu */
29512944
2952static __inline__ vector unsigned int __ATTRS_o_ai vec_ctu(vector float __a,
2953 int __b) {
2954 return __builtin_altivec_vctuxs(__a, __b);
2955}
2956
2957#ifdef __VSX__2945#ifdef __VSX__
2958static __inline__ vector unsigned long long __ATTRS_o_ai2946#define vec_ctu(__a, __b) \
2959vec_ctu(vector double __a, int __b) {2947 _Generic((__a), vector float \
2960 __a *= (vector double)(vector unsigned long long)((0x3ffULL + __b) << 52);2948 : __builtin_altivec_vctuxs((__a), (__b)), vector double \
2961 return __builtin_convertvector(__a, vector unsigned long long);2949 : __extension__({ \
2962}2950 vector double __ret = \
2951 (__a) * \
2952 (vector double)(vector unsigned long long)((0x3ffULL + __b) \
2953 << 52); \
2954 __builtin_convertvector(__ret, vector unsigned long long); \
2955 }))
2956#else
2957#define vec_ctu __builtin_altivec_vctuxs
2963#endif2958#endif
29642959
2965/* vec_vctuxs */2960/* vec_vctuxs */
29662961
2967static __inline__ vector unsigned int __attribute__((__always_inline__))2962#define vec_vctuxs __builtin_altivec_vctuxs
2968vec_vctuxs(vector float __a, int __b) {
2969 return __builtin_altivec_vctuxs(__a, __b);
2970}
29712963
2972/* vec_signed */2964/* vec_signed */
29732965
...@@ -8045,45 +8037,51 @@ static __inline__ vector float __ATTRS_o_ai vec_vsel(vector float __a,...@@ -8045,45 +8037,51 @@ static __inline__ vector float __ATTRS_o_ai vec_vsel(vector float __a,
80458037
8046/* vec_sl */8038/* vec_sl */
80478039
8048static __inline__ vector signed char __ATTRS_o_ai8040// vec_sl does modulo arithmetic on __b first, so __b is allowed to be more
8049vec_sl(vector signed char __a, vector unsigned char __b) {8041// than the length of __a.
8050 return __a << (vector signed char)__b;
8051}
8052
8053static __inline__ vector unsigned char __ATTRS_o_ai8042static __inline__ vector unsigned char __ATTRS_o_ai
8054vec_sl(vector unsigned char __a, vector unsigned char __b) {8043vec_sl(vector unsigned char __a, vector unsigned char __b) {
8055 return __a << __b;8044 return __a << (__b %
8045 (vector unsigned char)(sizeof(unsigned char) * __CHAR_BIT__));
8056}8046}
80578047
8058static __inline__ vector short __ATTRS_o_ai vec_sl(vector short __a,8048static __inline__ vector signed char __ATTRS_o_ai
8059 vector unsigned short __b) {8049vec_sl(vector signed char __a, vector unsigned char __b) {
8060 return __a << (vector short)__b;8050 return (vector signed char)vec_sl((vector unsigned char)__a, __b);
8061}8051}
80628052
8063static __inline__ vector unsigned short __ATTRS_o_ai8053static __inline__ vector unsigned short __ATTRS_o_ai
8064vec_sl(vector unsigned short __a, vector unsigned short __b) {8054vec_sl(vector unsigned short __a, vector unsigned short __b) {
8065 return __a << __b;8055 return __a << (__b % (vector unsigned short)(sizeof(unsigned short) *
8056 __CHAR_BIT__));
8066}8057}
80678058
8068static __inline__ vector int __ATTRS_o_ai vec_sl(vector int __a,8059static __inline__ vector short __ATTRS_o_ai vec_sl(vector short __a,
8069 vector unsigned int __b) {8060 vector unsigned short __b) {
8070 return __a << (vector int)__b;8061 return (vector short)vec_sl((vector unsigned short)__a, __b);
8071}8062}
80728063
8073static __inline__ vector unsigned int __ATTRS_o_ai8064static __inline__ vector unsigned int __ATTRS_o_ai
8074vec_sl(vector unsigned int __a, vector unsigned int __b) {8065vec_sl(vector unsigned int __a, vector unsigned int __b) {
8075 return __a << __b;8066 return __a << (__b %
8067 (vector unsigned int)(sizeof(unsigned int) * __CHAR_BIT__));
8076}8068}
80778069
8078#ifdef __POWER8_VECTOR__8070static __inline__ vector int __ATTRS_o_ai vec_sl(vector int __a,
8079static __inline__ vector signed long long __ATTRS_o_ai8071 vector unsigned int __b) {
8080vec_sl(vector signed long long __a, vector unsigned long long __b) {8072 return (vector int)vec_sl((vector unsigned int)__a, __b);
8081 return __a << (vector long long)__b;
8082}8073}
80838074
8075#ifdef __POWER8_VECTOR__
8084static __inline__ vector unsigned long long __ATTRS_o_ai8076static __inline__ vector unsigned long long __ATTRS_o_ai
8085vec_sl(vector unsigned long long __a, vector unsigned long long __b) {8077vec_sl(vector unsigned long long __a, vector unsigned long long __b) {
8086 return __a << __b;8078 return __a << (__b % (vector unsigned long long)(sizeof(unsigned long long) *
8079 __CHAR_BIT__));
8080}
8081
8082static __inline__ vector long long __ATTRS_o_ai
8083vec_sl(vector long long __a, vector unsigned long long __b) {
8084 return (vector long long)vec_sl((vector unsigned long long)__a, __b);
8087}8085}
8088#endif8086#endif
80898087
...@@ -12150,6 +12148,11 @@ static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned char __a,...@@ -12150,6 +12148,11 @@ static __inline__ void __ATTRS_o_ai vec_vsx_st(vector unsigned char __a,
1215012148
12151#endif12149#endif
1215212150
12151#ifdef __VSX__
12152#define vec_xxpermdi __builtin_vsx_xxpermdi
12153#define vec_xxsldwi __builtin_vsx_xxsldwi
12154#endif
12155
12153/* vec_xor */12156/* vec_xor */
1215412157
12155#define __builtin_altivec_vxor vec_xor12158#define __builtin_altivec_vxor vec_xor
c_headers/arm_acle.h+316-2
...@@ -224,6 +224,36 @@ __rbitl(unsigned long __t) {...@@ -224,6 +224,36 @@ __rbitl(unsigned long __t) {
224#endif224#endif
225}225}
226226
227/*
228 * 9.3 16-bit multiplications
229 */
230#if __ARM_FEATURE_DSP
231static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
232__smulbb(int32_t __a, int32_t __b) {
233 return __builtin_arm_smulbb(__a, __b);
234}
235static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
236__smulbt(int32_t __a, int32_t __b) {
237 return __builtin_arm_smulbt(__a, __b);
238}
239static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
240__smultb(int32_t __a, int32_t __b) {
241 return __builtin_arm_smultb(__a, __b);
242}
243static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
244__smultt(int32_t __a, int32_t __b) {
245 return __builtin_arm_smultt(__a, __b);
246}
247static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
248__smulwb(int32_t __a, int32_t __b) {
249 return __builtin_arm_smulwb(__a, __b);
250}
251static __inline__ int32_t __attribute__((__always_inline__,__nodebug__))
252__smulwt(int32_t __a, int32_t __b) {
253 return __builtin_arm_smulwt(__a, __b);
254}
255#endif
256
227/*257/*
228 * 9.4 Saturating intrinsics258 * 9.4 Saturating intrinsics
229 *259 *
...@@ -231,13 +261,13 @@ __rbitl(unsigned long __t) {...@@ -231,13 +261,13 @@ __rbitl(unsigned long __t) {
231 * intrinsics are implemented and the flag is enabled.261 * intrinsics are implemented and the flag is enabled.
232 */262 */
233/* 9.4.1 Width-specified saturation intrinsics */263/* 9.4.1 Width-specified saturation intrinsics */
234#if __ARM_32BIT_STATE264#if __ARM_FEATURE_SAT
235#define __ssat(x, y) __builtin_arm_ssat(x, y)265#define __ssat(x, y) __builtin_arm_ssat(x, y)
236#define __usat(x, y) __builtin_arm_usat(x, y)266#define __usat(x, y) __builtin_arm_usat(x, y)
237#endif267#endif
238268
239/* 9.4.2 Saturating addition and subtraction intrinsics */269/* 9.4.2 Saturating addition and subtraction intrinsics */
240#if __ARM_32BIT_STATE270#if __ARM_FEATURE_DSP
241static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))271static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
242__qadd(int32_t __t, int32_t __v) {272__qadd(int32_t __t, int32_t __v) {
243 return __builtin_arm_qadd(__t, __v);273 return __builtin_arm_qadd(__t, __v);
...@@ -254,6 +284,290 @@ __qdbl(int32_t __t) {...@@ -254,6 +284,290 @@ __qdbl(int32_t __t) {
254}284}
255#endif285#endif
256286
287/* 9.4.3 Accumultating multiplications */
288#if __ARM_FEATURE_DSP
289static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
290__smlabb(int32_t __a, int32_t __b, int32_t __c) {
291 return __builtin_arm_smlabb(__a, __b, __c);
292}
293static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
294__smlabt(int32_t __a, int32_t __b, int32_t __c) {
295 return __builtin_arm_smlabt(__a, __b, __c);
296}
297static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
298__smlatb(int32_t __a, int32_t __b, int32_t __c) {
299 return __builtin_arm_smlatb(__a, __b, __c);
300}
301static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
302__smlatt(int32_t __a, int32_t __b, int32_t __c) {
303 return __builtin_arm_smlatt(__a, __b, __c);
304}
305static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
306__smlawb(int32_t __a, int32_t __b, int32_t __c) {
307 return __builtin_arm_smlawb(__a, __b, __c);
308}
309static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
310__smlawt(int32_t __a, int32_t __b, int32_t __c) {
311 return __builtin_arm_smlawt(__a, __b, __c);
312}
313#endif
314
315
316/* 9.5.4 Parallel 16-bit saturation */
317#if __ARM_FEATURE_SIMD32
318#define __ssat16(x, y) __builtin_arm_ssat16(x, y)
319#define __usat16(x, y) __builtin_arm_usat16(x, y)
320#endif
321
322/* 9.5.5 Packing and unpacking */
323#if __ARM_FEATURE_SIMD32
324typedef int32_t int8x4_t;
325typedef int32_t int16x2_t;
326typedef uint32_t uint8x4_t;
327typedef uint32_t uint16x2_t;
328
329static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
330__sxtab16(int16x2_t __a, int8x4_t __b) {
331 return __builtin_arm_sxtab16(__a, __b);
332}
333static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
334__sxtb16(int8x4_t __a) {
335 return __builtin_arm_sxtb16(__a);
336}
337static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
338__uxtab16(int16x2_t __a, int8x4_t __b) {
339 return __builtin_arm_uxtab16(__a, __b);
340}
341static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
342__uxtb16(int8x4_t __a) {
343 return __builtin_arm_uxtb16(__a);
344}
345#endif
346
347/* 9.5.6 Parallel selection */
348#if __ARM_FEATURE_SIMD32
349static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
350__sel(uint8x4_t __a, uint8x4_t __b) {
351 return __builtin_arm_sel(__a, __b);
352}
353#endif
354
355/* 9.5.7 Parallel 8-bit addition and subtraction */
356#if __ARM_FEATURE_SIMD32
357static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
358__qadd8(int8x4_t __a, int8x4_t __b) {
359 return __builtin_arm_qadd8(__a, __b);
360}
361static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
362__qsub8(int8x4_t __a, int8x4_t __b) {
363 return __builtin_arm_qsub8(__a, __b);
364}
365static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
366__sadd8(int8x4_t __a, int8x4_t __b) {
367 return __builtin_arm_sadd8(__a, __b);
368}
369static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
370__shadd8(int8x4_t __a, int8x4_t __b) {
371 return __builtin_arm_shadd8(__a, __b);
372}
373static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
374__shsub8(int8x4_t __a, int8x4_t __b) {
375 return __builtin_arm_shsub8(__a, __b);
376}
377static __inline__ int8x4_t __attribute__((__always_inline__, __nodebug__))
378__ssub8(int8x4_t __a, int8x4_t __b) {
379 return __builtin_arm_ssub8(__a, __b);
380}
381static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
382__uadd8(uint8x4_t __a, uint8x4_t __b) {
383 return __builtin_arm_uadd8(__a, __b);
384}
385static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
386__uhadd8(uint8x4_t __a, uint8x4_t __b) {
387 return __builtin_arm_uhadd8(__a, __b);
388}
389static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
390__uhsub8(uint8x4_t __a, uint8x4_t __b) {
391 return __builtin_arm_uhsub8(__a, __b);
392}
393static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
394__uqadd8(uint8x4_t __a, uint8x4_t __b) {
395 return __builtin_arm_uqadd8(__a, __b);
396}
397static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
398__uqsub8(uint8x4_t __a, uint8x4_t __b) {
399 return __builtin_arm_uqsub8(__a, __b);
400}
401static __inline__ uint8x4_t __attribute__((__always_inline__, __nodebug__))
402__usub8(uint8x4_t __a, uint8x4_t __b) {
403 return __builtin_arm_usub8(__a, __b);
404}
405#endif
406
407/* 9.5.8 Sum of 8-bit absolute differences */
408#if __ARM_FEATURE_SIMD32
409static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
410__usad8(uint8x4_t __a, uint8x4_t __b) {
411 return __builtin_arm_usad8(__a, __b);
412}
413static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
414__usada8(uint8x4_t __a, uint8x4_t __b, uint32_t __c) {
415 return __builtin_arm_usada8(__a, __b, __c);
416}
417#endif
418
419/* 9.5.9 Parallel 16-bit addition and subtraction */
420#if __ARM_FEATURE_SIMD32
421static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
422__qadd16(int16x2_t __a, int16x2_t __b) {
423 return __builtin_arm_qadd16(__a, __b);
424}
425static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
426__qasx(int16x2_t __a, int16x2_t __b) {
427 return __builtin_arm_qasx(__a, __b);
428}
429static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
430__qsax(int16x2_t __a, int16x2_t __b) {
431 return __builtin_arm_qsax(__a, __b);
432}
433static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
434__qsub16(int16x2_t __a, int16x2_t __b) {
435 return __builtin_arm_qsub16(__a, __b);
436}
437static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
438__sadd16(int16x2_t __a, int16x2_t __b) {
439 return __builtin_arm_sadd16(__a, __b);
440}
441static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
442__sasx(int16x2_t __a, int16x2_t __b) {
443 return __builtin_arm_sasx(__a, __b);
444}
445static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
446__shadd16(int16x2_t __a, int16x2_t __b) {
447 return __builtin_arm_shadd16(__a, __b);
448}
449static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
450__shasx(int16x2_t __a, int16x2_t __b) {
451 return __builtin_arm_shasx(__a, __b);
452}
453static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
454__shsax(int16x2_t __a, int16x2_t __b) {
455 return __builtin_arm_shsax(__a, __b);
456}
457static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
458__shsub16(int16x2_t __a, int16x2_t __b) {
459 return __builtin_arm_shsub16(__a, __b);
460}
461static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
462__ssax(int16x2_t __a, int16x2_t __b) {
463 return __builtin_arm_ssax(__a, __b);
464}
465static __inline__ int16x2_t __attribute__((__always_inline__, __nodebug__))
466__ssub16(int16x2_t __a, int16x2_t __b) {
467 return __builtin_arm_ssub16(__a, __b);
468}
469static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
470__uadd16(uint16x2_t __a, uint16x2_t __b) {
471 return __builtin_arm_uadd16(__a, __b);
472}
473static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
474__uasx(uint16x2_t __a, uint16x2_t __b) {
475 return __builtin_arm_uasx(__a, __b);
476}
477static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
478__uhadd16(uint16x2_t __a, uint16x2_t __b) {
479 return __builtin_arm_uhadd16(__a, __b);
480}
481static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
482__uhasx(uint16x2_t __a, uint16x2_t __b) {
483 return __builtin_arm_uhasx(__a, __b);
484}
485static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
486__uhsax(uint16x2_t __a, uint16x2_t __b) {
487 return __builtin_arm_uhsax(__a, __b);
488}
489static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
490__uhsub16(uint16x2_t __a, uint16x2_t __b) {
491 return __builtin_arm_uhsub16(__a, __b);
492}
493static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
494__uqadd16(uint16x2_t __a, uint16x2_t __b) {
495 return __builtin_arm_uqadd16(__a, __b);
496}
497static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
498__uqasx(uint16x2_t __a, uint16x2_t __b) {
499 return __builtin_arm_uqasx(__a, __b);
500}
501static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
502__uqsax(uint16x2_t __a, uint16x2_t __b) {
503 return __builtin_arm_uqsax(__a, __b);
504}
505static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
506__uqsub16(uint16x2_t __a, uint16x2_t __b) {
507 return __builtin_arm_uqsub16(__a, __b);
508}
509static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
510__usax(uint16x2_t __a, uint16x2_t __b) {
511 return __builtin_arm_usax(__a, __b);
512}
513static __inline__ uint16x2_t __attribute__((__always_inline__, __nodebug__))
514__usub16(uint16x2_t __a, uint16x2_t __b) {
515 return __builtin_arm_usub16(__a, __b);
516}
517#endif
518
519/* 9.5.10 Parallel 16-bit multiplications */
520#if __ARM_FEATURE_SIMD32
521static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
522__smlad(int16x2_t __a, int16x2_t __b, int32_t __c) {
523 return __builtin_arm_smlad(__a, __b, __c);
524}
525static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
526__smladx(int16x2_t __a, int16x2_t __b, int32_t __c) {
527 return __builtin_arm_smladx(__a, __b, __c);
528}
529static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
530__smlald(int16x2_t __a, int16x2_t __b, int64_t __c) {
531 return __builtin_arm_smlald(__a, __b, __c);
532}
533static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
534__smlaldx(int16x2_t __a, int16x2_t __b, int64_t __c) {
535 return __builtin_arm_smlaldx(__a, __b, __c);
536}
537static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
538__smlsd(int16x2_t __a, int16x2_t __b, int32_t __c) {
539 return __builtin_arm_smlsd(__a, __b, __c);
540}
541static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
542__smlsdx(int16x2_t __a, int16x2_t __b, int32_t __c) {
543 return __builtin_arm_smlsdx(__a, __b, __c);
544}
545static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
546__smlsld(int16x2_t __a, int16x2_t __b, int64_t __c) {
547 return __builtin_arm_smlsld(__a, __b, __c);
548}
549static __inline__ int64_t __attribute__((__always_inline__, __nodebug__))
550__smlsldx(int16x2_t __a, int16x2_t __b, int64_t __c) {
551 return __builtin_arm_smlsldx(__a, __b, __c);
552}
553static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
554__smuad(int16x2_t __a, int16x2_t __b) {
555 return __builtin_arm_smuad(__a, __b);
556}
557static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
558__smuadx(int16x2_t __a, int16x2_t __b) {
559 return __builtin_arm_smuadx(__a, __b);
560}
561static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
562__smusd(int16x2_t __a, int16x2_t __b) {
563 return __builtin_arm_smusd(__a, __b);
564}
565static __inline__ int32_t __attribute__((__always_inline__, __nodebug__))
566__smusdx(int16x2_t __a, int16x2_t __b) {
567 return __builtin_arm_smusdx(__a, __b);
568}
569#endif
570
257/* 9.7 CRC32 intrinsics */571/* 9.7 CRC32 intrinsics */
258#if __ARM_FEATURE_CRC32572#if __ARM_FEATURE_CRC32
259static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))573static __inline__ uint32_t __attribute__((__always_inline__, __nodebug__))
c_headers/avx2intrin.h+2-1
...@@ -832,7 +832,8 @@ _mm256_xor_si256(__m256i __a, __m256i __b)...@@ -832,7 +832,8 @@ _mm256_xor_si256(__m256i __a, __m256i __b)
832static __inline__ __m256i __DEFAULT_FN_ATTRS832static __inline__ __m256i __DEFAULT_FN_ATTRS
833_mm256_stream_load_si256(__m256i const *__V)833_mm256_stream_load_si256(__m256i const *__V)
834{834{
835 return (__m256i)__builtin_ia32_movntdqa256((const __v4di *)__V);835 typedef __v4di __v4di_aligned __attribute__((aligned(32)));
836 return (__m256i)__builtin_nontemporal_load((const __v4di_aligned *)__V);
836}837}
837838
838static __inline__ __m128 __DEFAULT_FN_ATTRS839static __inline__ __m128 __DEFAULT_FN_ATTRS
c_headers/avx512bwintrin.h+40-64
...@@ -504,115 +504,91 @@ _mm512_maskz_abs_epi16 (__mmask32 __U, __m512i __A)...@@ -504,115 +504,91 @@ _mm512_maskz_abs_epi16 (__mmask32 __U, __m512i __A)
504}504}
505505
506static __inline__ __m512i __DEFAULT_FN_ATTRS506static __inline__ __m512i __DEFAULT_FN_ATTRS
507_mm512_packs_epi32 (__m512i __A, __m512i __B)507_mm512_packs_epi32(__m512i __A, __m512i __B)
508{508{
509 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,509 return (__m512i)__builtin_ia32_packssdw512((__v16si)__A, (__v16si)__B);
510 (__v16si) __B,
511 (__v32hi) _mm512_setzero_hi(),
512 (__mmask32) -1);
513}510}
514511
515static __inline__ __m512i __DEFAULT_FN_ATTRS512static __inline__ __m512i __DEFAULT_FN_ATTRS
516_mm512_maskz_packs_epi32 (__mmask32 __M, __m512i __A, __m512i __B)513_mm512_maskz_packs_epi32(__mmask32 __M, __m512i __A, __m512i __B)
517{514{
518 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,515 return (__m512i)__builtin_ia32_selectw_512((__mmask32)__M,
519 (__v16si) __B,516 (__v32hi)_mm512_packs_epi32(__A, __B),
520 (__v32hi) _mm512_setzero_hi(),517 (__v32hi)_mm512_setzero_hi());
521 __M);
522}518}
523519
524static __inline__ __m512i __DEFAULT_FN_ATTRS520static __inline__ __m512i __DEFAULT_FN_ATTRS
525_mm512_mask_packs_epi32 (__m512i __W, __mmask32 __M, __m512i __A,521_mm512_mask_packs_epi32(__m512i __W, __mmask32 __M, __m512i __A, __m512i __B)
526 __m512i __B)
527{522{
528 return (__m512i) __builtin_ia32_packssdw512_mask ((__v16si) __A,523 return (__m512i)__builtin_ia32_selectw_512((__mmask32)__M,
529 (__v16si) __B,524 (__v32hi)_mm512_packs_epi32(__A, __B),
530 (__v32hi) __W,525 (__v32hi)__W);
531 __M);
532}526}
533527
534static __inline__ __m512i __DEFAULT_FN_ATTRS528static __inline__ __m512i __DEFAULT_FN_ATTRS
535_mm512_packs_epi16 (__m512i __A, __m512i __B)529_mm512_packs_epi16(__m512i __A, __m512i __B)
536{530{
537 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,531 return (__m512i)__builtin_ia32_packsswb512((__v32hi)__A, (__v32hi) __B);
538 (__v32hi) __B,
539 (__v64qi) _mm512_setzero_qi(),
540 (__mmask64) -1);
541}532}
542533
543static __inline__ __m512i __DEFAULT_FN_ATTRS534static __inline__ __m512i __DEFAULT_FN_ATTRS
544_mm512_mask_packs_epi16 (__m512i __W, __mmask64 __M, __m512i __A,535_mm512_mask_packs_epi16(__m512i __W, __mmask64 __M, __m512i __A, __m512i __B)
545 __m512i __B)
546{536{
547 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,537 return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
548 (__v32hi) __B,538 (__v64qi)_mm512_packs_epi16(__A, __B),
549 (__v64qi) __W,539 (__v64qi)__W);
550 (__mmask64) __M);
551}540}
552541
553static __inline__ __m512i __DEFAULT_FN_ATTRS542static __inline__ __m512i __DEFAULT_FN_ATTRS
554_mm512_maskz_packs_epi16 (__mmask64 __M, __m512i __A, __m512i __B)543_mm512_maskz_packs_epi16(__mmask64 __M, __m512i __A, __m512i __B)
555{544{
556 return (__m512i) __builtin_ia32_packsswb512_mask ((__v32hi) __A,545 return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
557 (__v32hi) __B,546 (__v64qi)_mm512_packs_epi16(__A, __B),
558 (__v64qi) _mm512_setzero_qi(),547 (__v64qi)_mm512_setzero_qi());
559 __M);
560}548}
561549
562static __inline__ __m512i __DEFAULT_FN_ATTRS550static __inline__ __m512i __DEFAULT_FN_ATTRS
563_mm512_packus_epi32 (__m512i __A, __m512i __B)551_mm512_packus_epi32(__m512i __A, __m512i __B)
564{552{
565 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,553 return (__m512i)__builtin_ia32_packusdw512((__v16si) __A, (__v16si) __B);
566 (__v16si) __B,
567 (__v32hi) _mm512_setzero_hi(),
568 (__mmask32) -1);
569}554}
570555
571static __inline__ __m512i __DEFAULT_FN_ATTRS556static __inline__ __m512i __DEFAULT_FN_ATTRS
572_mm512_maskz_packus_epi32 (__mmask32 __M, __m512i __A, __m512i __B)557_mm512_maskz_packus_epi32(__mmask32 __M, __m512i __A, __m512i __B)
573{558{
574 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,559 return (__m512i)__builtin_ia32_selectw_512((__mmask32)__M,
575 (__v16si) __B,560 (__v32hi)_mm512_packus_epi32(__A, __B),
576 (__v32hi) _mm512_setzero_hi(),561 (__v32hi)_mm512_setzero_hi());
577 __M);
578}562}
579563
580static __inline__ __m512i __DEFAULT_FN_ATTRS564static __inline__ __m512i __DEFAULT_FN_ATTRS
581_mm512_mask_packus_epi32 (__m512i __W, __mmask32 __M, __m512i __A,565_mm512_mask_packus_epi32(__m512i __W, __mmask32 __M, __m512i __A, __m512i __B)
582 __m512i __B)
583{566{
584 return (__m512i) __builtin_ia32_packusdw512_mask ((__v16si) __A,567 return (__m512i)__builtin_ia32_selectw_512((__mmask32)__M,
585 (__v16si) __B,568 (__v32hi)_mm512_packus_epi32(__A, __B),
586 (__v32hi) __W,569 (__v32hi)__W);
587 __M);
588}570}
589571
590static __inline__ __m512i __DEFAULT_FN_ATTRS572static __inline__ __m512i __DEFAULT_FN_ATTRS
591_mm512_packus_epi16 (__m512i __A, __m512i __B)573_mm512_packus_epi16(__m512i __A, __m512i __B)
592{574{
593 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,575 return (__m512i)__builtin_ia32_packuswb512((__v32hi) __A, (__v32hi) __B);
594 (__v32hi) __B,
595 (__v64qi) _mm512_setzero_qi(),
596 (__mmask64) -1);
597}576}
598577
599static __inline__ __m512i __DEFAULT_FN_ATTRS578static __inline__ __m512i __DEFAULT_FN_ATTRS
600_mm512_mask_packus_epi16 (__m512i __W, __mmask64 __M, __m512i __A,579_mm512_mask_packus_epi16(__m512i __W, __mmask64 __M, __m512i __A, __m512i __B)
601 __m512i __B)
602{580{
603 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,581 return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
604 (__v32hi) __B,582 (__v64qi)_mm512_packus_epi16(__A, __B),
605 (__v64qi) __W,583 (__v64qi)__W);
606 (__mmask64) __M);
607}584}
608585
609static __inline__ __m512i __DEFAULT_FN_ATTRS586static __inline__ __m512i __DEFAULT_FN_ATTRS
610_mm512_maskz_packus_epi16 (__mmask64 __M, __m512i __A, __m512i __B)587_mm512_maskz_packus_epi16(__mmask64 __M, __m512i __A, __m512i __B)
611{588{
612 return (__m512i) __builtin_ia32_packuswb512_mask ((__v32hi) __A,589 return (__m512i)__builtin_ia32_selectb_512((__mmask64)__M,
613 (__v32hi) __B,590 (__v64qi)_mm512_packus_epi16(__A, __B),
614 (__v64qi) _mm512_setzero_qi(),591 (__v64qi)_mm512_setzero_qi());
615 (__mmask64) __M);
616}592}
617593
618static __inline__ __m512i __DEFAULT_FN_ATTRS594static __inline__ __m512i __DEFAULT_FN_ATTRS
c_headers/avx512dqintrin.h+46-49
...@@ -995,51 +995,50 @@ _mm512_maskz_broadcast_f32x2 (__mmask16 __M, __m128 __A)...@@ -995,51 +995,50 @@ _mm512_maskz_broadcast_f32x2 (__mmask16 __M, __m128 __A)
995}995}
996996
997static __inline__ __m512 __DEFAULT_FN_ATTRS997static __inline__ __m512 __DEFAULT_FN_ATTRS
998_mm512_broadcast_f32x8 (__m256 __A)998_mm512_broadcast_f32x8(__m256 __A)
999{999{
1000 return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,1000 return (__m512)__builtin_shufflevector((__v8sf)__A, (__v8sf)__A,
1001 _mm512_undefined_ps(),1001 0, 1, 2, 3, 4, 5, 6, 7,
1002 (__mmask16) -1);1002 0, 1, 2, 3, 4, 5, 6, 7);
1003}1003}
10041004
1005static __inline__ __m512 __DEFAULT_FN_ATTRS1005static __inline__ __m512 __DEFAULT_FN_ATTRS
1006_mm512_mask_broadcast_f32x8 (__m512 __O, __mmask16 __M, __m256 __A)1006_mm512_mask_broadcast_f32x8(__m512 __O, __mmask16 __M, __m256 __A)
1007{1007{
1008 return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,1008 return (__m512)__builtin_ia32_selectps_512((__mmask8)__M,
1009 (__v16sf)__O,1009 (__v16sf)_mm512_broadcast_f32x8(__A),
1010 __M);1010 (__v16sf)__O);
1011}1011}
10121012
1013static __inline__ __m512 __DEFAULT_FN_ATTRS1013static __inline__ __m512 __DEFAULT_FN_ATTRS
1014_mm512_maskz_broadcast_f32x8 (__mmask16 __M, __m256 __A)1014_mm512_maskz_broadcast_f32x8(__mmask16 __M, __m256 __A)
1015{1015{
1016 return (__m512) __builtin_ia32_broadcastf32x8_512_mask ((__v8sf) __A,1016 return (__m512)__builtin_ia32_selectps_512((__mmask8)__M,
1017 (__v16sf)_mm512_setzero_ps (),1017 (__v16sf)_mm512_broadcast_f32x8(__A),
1018 __M);1018 (__v16sf)_mm512_setzero_ps());
1019}1019}
10201020
1021static __inline__ __m512d __DEFAULT_FN_ATTRS1021static __inline__ __m512d __DEFAULT_FN_ATTRS
1022_mm512_broadcast_f64x2 (__m128d __A)1022_mm512_broadcast_f64x2(__m128d __A)
1023{1023{
1024 return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,1024 return (__m512d)__builtin_shufflevector((__v2df)__A, (__v2df)__A,
1025 (__v8df)_mm512_undefined_pd(),1025 0, 1, 0, 1, 0, 1, 0, 1);
1026 (__mmask8) -1);
1027}1026}
10281027
1029static __inline__ __m512d __DEFAULT_FN_ATTRS1028static __inline__ __m512d __DEFAULT_FN_ATTRS
1030_mm512_mask_broadcast_f64x2 (__m512d __O, __mmask8 __M, __m128d __A)1029_mm512_mask_broadcast_f64x2(__m512d __O, __mmask8 __M, __m128d __A)
1031{1030{
1032 return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,1031 return (__m512d)__builtin_ia32_selectpd_512((__mmask8)__M,
1033 (__v8df)1032 (__v8df)_mm512_broadcast_f64x2(__A),
1034 __O, __M);1033 (__v8df)__O);
1035}1034}
10361035
1037static __inline__ __m512d __DEFAULT_FN_ATTRS1036static __inline__ __m512d __DEFAULT_FN_ATTRS
1038_mm512_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)1037_mm512_maskz_broadcast_f64x2(__mmask8 __M, __m128d __A)
1039{1038{
1040 return (__m512d) __builtin_ia32_broadcastf64x2_512_mask ((__v2df) __A,1039 return (__m512d)__builtin_ia32_selectpd_512((__mmask8)__M,
1041 (__v8df)_mm512_setzero_ps (),1040 (__v8df)_mm512_broadcast_f64x2(__A),
1042 __M);1041 (__v8df)_mm512_setzero_pd());
1043}1042}
10441043
1045static __inline__ __m512i __DEFAULT_FN_ATTRS1044static __inline__ __m512i __DEFAULT_FN_ATTRS
...@@ -1067,52 +1066,50 @@ _mm512_maskz_broadcast_i32x2 (__mmask16 __M, __m128i __A)...@@ -1067,52 +1066,50 @@ _mm512_maskz_broadcast_i32x2 (__mmask16 __M, __m128i __A)
1067}1066}
10681067
1069static __inline__ __m512i __DEFAULT_FN_ATTRS1068static __inline__ __m512i __DEFAULT_FN_ATTRS
1070_mm512_broadcast_i32x8 (__m256i __A)1069_mm512_broadcast_i32x8(__m256i __A)
1071{1070{
1072 return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,1071 return (__m512i)__builtin_shufflevector((__v8si)__A, (__v8si)__A,
1073 (__v16si)_mm512_setzero_si512(),1072 0, 1, 2, 3, 4, 5, 6, 7,
1074 (__mmask16) -1);1073 0, 1, 2, 3, 4, 5, 6, 7);
1075}1074}
10761075
1077static __inline__ __m512i __DEFAULT_FN_ATTRS1076static __inline__ __m512i __DEFAULT_FN_ATTRS
1078_mm512_mask_broadcast_i32x8 (__m512i __O, __mmask16 __M, __m256i __A)1077_mm512_mask_broadcast_i32x8(__m512i __O, __mmask16 __M, __m256i __A)
1079{1078{
1080 return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,1079 return (__m512i)__builtin_ia32_selectd_512((__mmask8)__M,
1081 (__v16si)__O,1080 (__v16si)_mm512_broadcast_i32x8(__A),
1082 __M);1081 (__v16si)__O);
1083}1082}
10841083
1085static __inline__ __m512i __DEFAULT_FN_ATTRS1084static __inline__ __m512i __DEFAULT_FN_ATTRS
1086_mm512_maskz_broadcast_i32x8 (__mmask16 __M, __m256i __A)1085_mm512_maskz_broadcast_i32x8(__mmask16 __M, __m256i __A)
1087{1086{
1088 return (__m512i) __builtin_ia32_broadcasti32x8_512_mask ((__v8si) __A,1087 return (__m512i)__builtin_ia32_selectd_512((__mmask8)__M,
1089 (__v16si)1088 (__v16si)_mm512_broadcast_i32x8(__A),
1090 _mm512_setzero_si512 (),1089 (__v16si)_mm512_setzero_si512());
1091 __M);
1092}1090}
10931091
1094static __inline__ __m512i __DEFAULT_FN_ATTRS1092static __inline__ __m512i __DEFAULT_FN_ATTRS
1095_mm512_broadcast_i64x2 (__m128i __A)1093_mm512_broadcast_i64x2(__m128i __A)
1096{1094{
1097 return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,1095 return (__m512i)__builtin_shufflevector((__v2di)__A, (__v2di)__A,
1098 (__v8di)_mm512_setzero_si512(),1096 0, 1, 0, 1, 0, 1, 0, 1);
1099 (__mmask8) -1);
1100}1097}
11011098
1102static __inline__ __m512i __DEFAULT_FN_ATTRS1099static __inline__ __m512i __DEFAULT_FN_ATTRS
1103_mm512_mask_broadcast_i64x2 (__m512i __O, __mmask8 __M, __m128i __A)1100_mm512_mask_broadcast_i64x2(__m512i __O, __mmask8 __M, __m128i __A)
1104{1101{
1105 return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,1102 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
1106 (__v8di)1103 (__v8di)_mm512_broadcast_i64x2(__A),
1107 __O, __M);1104 (__v8di)__O);
1108}1105}
11091106
1110static __inline__ __m512i __DEFAULT_FN_ATTRS1107static __inline__ __m512i __DEFAULT_FN_ATTRS
1111_mm512_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)1108_mm512_maskz_broadcast_i64x2(__mmask8 __M, __m128i __A)
1112{1109{
1113 return (__m512i) __builtin_ia32_broadcasti64x2_512_mask ((__v2di) __A,1110 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
1114 (__v8di)_mm512_setzero_si512 (),1111 (__v8di)_mm512_broadcast_i64x2(__A),
1115 __M);1112 (__v8di)_mm512_setzero_si512());
1116}1113}
11171114
1118#define _mm512_extractf32x8_ps(A, imm) __extension__ ({ \1115#define _mm512_extractf32x8_ps(A, imm) __extension__ ({ \
c_headers/avx512fintrin.h+264-105
...@@ -528,6 +528,116 @@ _mm512_mask2int(__mmask16 __a)...@@ -528,6 +528,116 @@ _mm512_mask2int(__mmask16 __a)
528 return (int)__a;528 return (int)__a;
529}529}
530530
531/// \brief Constructs a 512-bit floating-point vector of [8 x double] from a
532/// 128-bit floating-point vector of [2 x double]. The lower 128 bits
533/// contain the value of the source vector. The upper 384 bits are set
534/// to zero.
535///
536/// \headerfile <x86intrin.h>
537///
538/// This intrinsic has no corresponding instruction.
539///
540/// \param __a
541/// A 128-bit vector of [2 x double].
542/// \returns A 512-bit floating-point vector of [8 x double]. The lower 128 bits
543/// contain the value of the parameter. The upper 384 bits are set to zero.
544static __inline __m512d __DEFAULT_FN_ATTRS
545_mm512_zextpd128_pd512(__m128d __a)
546{
547 return __builtin_shufflevector((__v2df)__a, (__v2df)_mm_setzero_pd(), 0, 1, 2, 3, 2, 3, 2, 3);
548}
549
550/// \brief Constructs a 512-bit floating-point vector of [8 x double] from a
551/// 256-bit floating-point vector of [4 x double]. The lower 256 bits
552/// contain the value of the source vector. The upper 256 bits are set
553/// to zero.
554///
555/// \headerfile <x86intrin.h>
556///
557/// This intrinsic has no corresponding instruction.
558///
559/// \param __a
560/// A 256-bit vector of [4 x double].
561/// \returns A 512-bit floating-point vector of [8 x double]. The lower 256 bits
562/// contain the value of the parameter. The upper 256 bits are set to zero.
563static __inline __m512d __DEFAULT_FN_ATTRS
564_mm512_zextpd256_pd512(__m256d __a)
565{
566 return __builtin_shufflevector((__v4df)__a, (__v4df)_mm256_setzero_pd(), 0, 1, 2, 3, 4, 5, 6, 7);
567}
568
569/// \brief Constructs a 512-bit floating-point vector of [16 x float] from a
570/// 128-bit floating-point vector of [4 x float]. The lower 128 bits contain
571/// the value of the source vector. The upper 384 bits are set to zero.
572///
573/// \headerfile <x86intrin.h>
574///
575/// This intrinsic has no corresponding instruction.
576///
577/// \param __a
578/// A 128-bit vector of [4 x float].
579/// \returns A 512-bit floating-point vector of [16 x float]. The lower 128 bits
580/// contain the value of the parameter. The upper 384 bits are set to zero.
581static __inline __m512 __DEFAULT_FN_ATTRS
582_mm512_zextps128_ps512(__m128 __a)
583{
584 return __builtin_shufflevector((__v4sf)__a, (__v4sf)_mm_setzero_ps(), 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 4, 5, 6, 7);
585}
586
587/// \brief Constructs a 512-bit floating-point vector of [16 x float] from a
588/// 256-bit floating-point vector of [8 x float]. The lower 256 bits contain
589/// the value of the source vector. The upper 256 bits are set to zero.
590///
591/// \headerfile <x86intrin.h>
592///
593/// This intrinsic has no corresponding instruction.
594///
595/// \param __a
596/// A 256-bit vector of [8 x float].
597/// \returns A 512-bit floating-point vector of [16 x float]. The lower 256 bits
598/// contain the value of the parameter. The upper 256 bits are set to zero.
599static __inline __m512 __DEFAULT_FN_ATTRS
600_mm512_zextps256_ps512(__m256 __a)
601{
602 return __builtin_shufflevector((__v8sf)__a, (__v8sf)_mm256_setzero_ps(), 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15);
603}
604
605/// \brief Constructs a 512-bit integer vector from a 128-bit integer vector.
606/// The lower 128 bits contain the value of the source vector. The upper
607/// 384 bits are set to zero.
608///
609/// \headerfile <x86intrin.h>
610///
611/// This intrinsic has no corresponding instruction.
612///
613/// \param __a
614/// A 128-bit integer vector.
615/// \returns A 512-bit integer vector. The lower 128 bits contain the value of
616/// the parameter. The upper 384 bits are set to zero.
617static __inline __m512i __DEFAULT_FN_ATTRS
618_mm512_zextsi128_si512(__m128i __a)
619{
620 return __builtin_shufflevector((__v2di)__a, (__v2di)_mm_setzero_si128(), 0, 1, 2, 3, 2, 3, 2, 3);
621}
622
623/// \brief Constructs a 512-bit integer vector from a 256-bit integer vector.
624/// The lower 256 bits contain the value of the source vector. The upper
625/// 256 bits are set to zero.
626///
627/// \headerfile <x86intrin.h>
628///
629/// This intrinsic has no corresponding instruction.
630///
631/// \param __a
632/// A 256-bit integer vector.
633/// \returns A 512-bit integer vector. The lower 256 bits contain the value of
634/// the parameter. The upper 256 bits are set to zero.
635static __inline __m512i __DEFAULT_FN_ATTRS
636_mm512_zextsi256_si512(__m256i __a)
637{
638 return __builtin_shufflevector((__v4di)__a, (__v4di)_mm256_setzero_si256(), 0, 1, 2, 3, 4, 5, 6, 7);
639}
640
531/* Bitwise operators */641/* Bitwise operators */
532static __inline__ __m512i __DEFAULT_FN_ATTRS642static __inline__ __m512i __DEFAULT_FN_ATTRS
533_mm512_and_epi32(__m512i __a, __m512i __b)643_mm512_and_epi32(__m512i __a, __m512i __b)
...@@ -4179,7 +4289,7 @@ static __inline__ __m512i __DEFAULT_FN_ATTRS...@@ -4179,7 +4289,7 @@ static __inline__ __m512i __DEFAULT_FN_ATTRS
4179_mm512_maskz_cvtps_epu32 ( __mmask16 __U, __m512 __A)4289_mm512_maskz_cvtps_epu32 ( __mmask16 __U, __m512 __A)
4180{4290{
4181 return (__m512i) __builtin_ia32_cvtps2udq512_mask ((__v16sf) __A,4291 return (__m512i) __builtin_ia32_cvtps2udq512_mask ((__v16sf) __A,
4182 (__v16si) 4292 (__v16si)
4183 _mm512_setzero_si512 (),4293 _mm512_setzero_si512 (),
4184 (__mmask16) __U ,4294 (__mmask16) __U ,
4185 _MM_FROUND_CUR_DIRECTION);4295 _MM_FROUND_CUR_DIRECTION);
...@@ -4229,6 +4339,18 @@ _mm512_maskz_cvtpd_epu32 (__mmask8 __U, __m512d __A)...@@ -4229,6 +4339,18 @@ _mm512_maskz_cvtpd_epu32 (__mmask8 __U, __m512d __A)
4229 _MM_FROUND_CUR_DIRECTION);4339 _MM_FROUND_CUR_DIRECTION);
4230}4340}
42314341
4342static __inline__ double __DEFAULT_FN_ATTRS
4343_mm512_cvtsd_f64(__m512d __a)
4344{
4345 return __a[0];
4346}
4347
4348static __inline__ float __DEFAULT_FN_ATTRS
4349_mm512_cvtss_f32(__m512 __a)
4350{
4351 return __a[0];
4352}
4353
4232/* Unpack and Interleave */4354/* Unpack and Interleave */
42334355
4234static __inline __m512d __DEFAULT_FN_ATTRS4356static __inline __m512d __DEFAULT_FN_ATTRS
...@@ -4540,7 +4662,7 @@ _mm512_maskz_loadu_pd(__mmask8 __U, void const *__P)...@@ -4540,7 +4662,7 @@ _mm512_maskz_loadu_pd(__mmask8 __U, void const *__P)
4540}4662}
45414663
4542static __inline __m512d __DEFAULT_FN_ATTRS4664static __inline __m512d __DEFAULT_FN_ATTRS
4543_mm512_loadu_pd(double const *__p)4665_mm512_loadu_pd(void const *__p)
4544{4666{
4545 struct __loadu_pd {4667 struct __loadu_pd {
4546 __m512d __v;4668 __m512d __v;
...@@ -4549,7 +4671,7 @@ _mm512_loadu_pd(double const *__p)...@@ -4549,7 +4671,7 @@ _mm512_loadu_pd(double const *__p)
4549}4671}
45504672
4551static __inline __m512 __DEFAULT_FN_ATTRS4673static __inline __m512 __DEFAULT_FN_ATTRS
4552_mm512_loadu_ps(float const *__p)4674_mm512_loadu_ps(void const *__p)
4553{4675{
4554 struct __loadu_ps {4676 struct __loadu_ps {
4555 __m512 __v;4677 __m512 __v;
...@@ -4558,7 +4680,7 @@ _mm512_loadu_ps(float const *__p)...@@ -4558,7 +4680,7 @@ _mm512_loadu_ps(float const *__p)
4558}4680}
45594681
4560static __inline __m512 __DEFAULT_FN_ATTRS4682static __inline __m512 __DEFAULT_FN_ATTRS
4561_mm512_load_ps(float const *__p)4683_mm512_load_ps(void const *__p)
4562{4684{
4563 return (__m512) __builtin_ia32_loadaps512_mask ((const __v16sf *)__p,4685 return (__m512) __builtin_ia32_loadaps512_mask ((const __v16sf *)__p,
4564 (__v16sf)4686 (__v16sf)
...@@ -4584,7 +4706,7 @@ _mm512_maskz_load_ps(__mmask16 __U, void const *__P)...@@ -4584,7 +4706,7 @@ _mm512_maskz_load_ps(__mmask16 __U, void const *__P)
4584}4706}
45854707
4586static __inline __m512d __DEFAULT_FN_ATTRS4708static __inline __m512d __DEFAULT_FN_ATTRS
4587_mm512_load_pd(double const *__p)4709_mm512_load_pd(void const *__p)
4588{4710{
4589 return (__m512d) __builtin_ia32_loadapd512_mask ((const __v8df *)__p,4711 return (__m512d) __builtin_ia32_loadapd512_mask ((const __v8df *)__p,
4590 (__v8df)4712 (__v8df)
...@@ -7278,107 +7400,97 @@ _mm_maskz_sqrt_ss (__mmask8 __U, __m128 __A, __m128 __B)...@@ -7278,107 +7400,97 @@ _mm_maskz_sqrt_ss (__mmask8 __U, __m128 __A, __m128 __B)
7278 (__mmask8)(U), (int)(R)); })7400 (__mmask8)(U), (int)(R)); })
72797401
7280static __inline__ __m512 __DEFAULT_FN_ATTRS7402static __inline__ __m512 __DEFAULT_FN_ATTRS
7281_mm512_broadcast_f32x4 (__m128 __A)7403_mm512_broadcast_f32x4(__m128 __A)
7282{7404{
7283 return (__m512) __builtin_ia32_broadcastf32x4_512 ((__v4sf) __A,7405 return (__m512)__builtin_shufflevector((__v4sf)__A, (__v4sf)__A,
7284 (__v16sf)7406 0, 1, 2, 3, 0, 1, 2, 3,
7285 _mm512_undefined_ps (),7407 0, 1, 2, 3, 0, 1, 2, 3);
7286 (__mmask16) -1);
7287}7408}
72887409
7289static __inline__ __m512 __DEFAULT_FN_ATTRS7410static __inline__ __m512 __DEFAULT_FN_ATTRS
7290_mm512_mask_broadcast_f32x4 (__m512 __O, __mmask16 __M, __m128 __A)7411_mm512_mask_broadcast_f32x4(__m512 __O, __mmask16 __M, __m128 __A)
7291{7412{
7292 return (__m512) __builtin_ia32_broadcastf32x4_512 ((__v4sf) __A,7413 return (__m512)__builtin_ia32_selectps_512((__mmask16)__M,
7293 (__v16sf) __O,7414 (__v16sf)_mm512_broadcast_f32x4(__A),
7294 __M);7415 (__v16sf)__O);
7295}7416}
72967417
7297static __inline__ __m512 __DEFAULT_FN_ATTRS7418static __inline__ __m512 __DEFAULT_FN_ATTRS
7298_mm512_maskz_broadcast_f32x4 (__mmask16 __M, __m128 __A)7419_mm512_maskz_broadcast_f32x4(__mmask16 __M, __m128 __A)
7299{7420{
7300 return (__m512) __builtin_ia32_broadcastf32x4_512 ((__v4sf) __A,7421 return (__m512)__builtin_ia32_selectps_512((__mmask16)__M,
7301 (__v16sf)7422 (__v16sf)_mm512_broadcast_f32x4(__A),
7302 _mm512_setzero_ps (),7423 (__v16sf)_mm512_setzero_ps());
7303 __M);
7304}7424}
73057425
7306static __inline__ __m512d __DEFAULT_FN_ATTRS7426static __inline__ __m512d __DEFAULT_FN_ATTRS
7307_mm512_broadcast_f64x4 (__m256d __A)7427_mm512_broadcast_f64x4(__m256d __A)
7308{7428{
7309 return (__m512d) __builtin_ia32_broadcastf64x4_512 ((__v4df) __A,7429 return (__m512d)__builtin_shufflevector((__v4df)__A, (__v4df)__A,
7310 (__v8df)7430 0, 1, 2, 3, 0, 1, 2, 3);
7311 _mm512_undefined_pd (),
7312 (__mmask8) -1);
7313}7431}
73147432
7315static __inline__ __m512d __DEFAULT_FN_ATTRS7433static __inline__ __m512d __DEFAULT_FN_ATTRS
7316_mm512_mask_broadcast_f64x4 (__m512d __O, __mmask8 __M, __m256d __A)7434_mm512_mask_broadcast_f64x4(__m512d __O, __mmask8 __M, __m256d __A)
7317{7435{
7318 return (__m512d) __builtin_ia32_broadcastf64x4_512 ((__v4df) __A,7436 return (__m512d)__builtin_ia32_selectpd_512((__mmask8)__M,
7319 (__v8df) __O,7437 (__v8df)_mm512_broadcast_f64x4(__A),
7320 __M);7438 (__v8df)__O);
7321}7439}
73227440
7323static __inline__ __m512d __DEFAULT_FN_ATTRS7441static __inline__ __m512d __DEFAULT_FN_ATTRS
7324_mm512_maskz_broadcast_f64x4 (__mmask8 __M, __m256d __A)7442_mm512_maskz_broadcast_f64x4(__mmask8 __M, __m256d __A)
7325{7443{
7326 return (__m512d) __builtin_ia32_broadcastf64x4_512 ((__v4df) __A,7444 return (__m512d)__builtin_ia32_selectpd_512((__mmask8)__M,
7327 (__v8df)7445 (__v8df)_mm512_broadcast_f64x4(__A),
7328 _mm512_setzero_pd (),7446 (__v8df)_mm512_setzero_pd());
7329 __M);
7330}7447}
73317448
7332static __inline__ __m512i __DEFAULT_FN_ATTRS7449static __inline__ __m512i __DEFAULT_FN_ATTRS
7333_mm512_broadcast_i32x4 (__m128i __A)7450_mm512_broadcast_i32x4(__m128i __A)
7334{7451{
7335 return (__m512i) __builtin_ia32_broadcasti32x4_512 ((__v4si) __A,7452 return (__m512i)__builtin_shufflevector((__v4si)__A, (__v4si)__A,
7336 (__v16si)7453 0, 1, 2, 3, 0, 1, 2, 3,
7337 _mm512_undefined_epi32 (),7454 0, 1, 2, 3, 0, 1, 2, 3);
7338 (__mmask16) -1);
7339}7455}
73407456
7341static __inline__ __m512i __DEFAULT_FN_ATTRS7457static __inline__ __m512i __DEFAULT_FN_ATTRS
7342_mm512_mask_broadcast_i32x4 (__m512i __O, __mmask16 __M, __m128i __A)7458_mm512_mask_broadcast_i32x4(__m512i __O, __mmask16 __M, __m128i __A)
7343{7459{
7344 return (__m512i) __builtin_ia32_broadcasti32x4_512 ((__v4si) __A,7460 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__M,
7345 (__v16si) __O,7461 (__v16si)_mm512_broadcast_i32x4(__A),
7346 __M);7462 (__v16si)__O);
7347}7463}
73487464
7349static __inline__ __m512i __DEFAULT_FN_ATTRS7465static __inline__ __m512i __DEFAULT_FN_ATTRS
7350_mm512_maskz_broadcast_i32x4 (__mmask16 __M, __m128i __A)7466_mm512_maskz_broadcast_i32x4(__mmask16 __M, __m128i __A)
7351{7467{
7352 return (__m512i) __builtin_ia32_broadcasti32x4_512 ((__v4si) __A,7468 return (__m512i)__builtin_ia32_selectd_512((__mmask16)__M,
7353 (__v16si)7469 (__v16si)_mm512_broadcast_i32x4(__A),
7354 _mm512_setzero_si512 (),7470 (__v16si)_mm512_setzero_si512());
7355 __M);
7356}7471}
73577472
7358static __inline__ __m512i __DEFAULT_FN_ATTRS7473static __inline__ __m512i __DEFAULT_FN_ATTRS
7359_mm512_broadcast_i64x4 (__m256i __A)7474_mm512_broadcast_i64x4(__m256i __A)
7360{7475{
7361 return (__m512i) __builtin_ia32_broadcasti64x4_512 ((__v4di) __A,7476 return (__m512i)__builtin_shufflevector((__v4di)__A, (__v4di)__A,
7362 (__v8di)7477 0, 1, 2, 3, 0, 1, 2, 3);
7363 _mm512_undefined_epi32 (),
7364 (__mmask8) -1);
7365}7478}
73667479
7367static __inline__ __m512i __DEFAULT_FN_ATTRS7480static __inline__ __m512i __DEFAULT_FN_ATTRS
7368_mm512_mask_broadcast_i64x4 (__m512i __O, __mmask8 __M, __m256i __A)7481_mm512_mask_broadcast_i64x4(__m512i __O, __mmask8 __M, __m256i __A)
7369{7482{
7370 return (__m512i) __builtin_ia32_broadcasti64x4_512 ((__v4di) __A,7483 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
7371 (__v8di) __O,7484 (__v8di)_mm512_broadcast_i64x4(__A),
7372 __M);7485 (__v8di)__O);
7373}7486}
73747487
7375static __inline__ __m512i __DEFAULT_FN_ATTRS7488static __inline__ __m512i __DEFAULT_FN_ATTRS
7376_mm512_maskz_broadcast_i64x4 (__mmask8 __M, __m256i __A)7489_mm512_maskz_broadcast_i64x4(__mmask8 __M, __m256i __A)
7377{7490{
7378 return (__m512i) __builtin_ia32_broadcasti64x4_512 ((__v4di) __A,7491 return (__m512i)__builtin_ia32_selectq_512((__mmask8)__M,
7379 (__v8di)7492 (__v8di)_mm512_broadcast_i64x4(__A),
7380 _mm512_setzero_si512 (),7493 (__v8di)_mm512_setzero_si512());
7381 __M);
7382}7494}
73837495
7384static __inline__ __m512d __DEFAULT_FN_ATTRS7496static __inline__ __m512d __DEFAULT_FN_ATTRS
...@@ -7860,12 +7972,12 @@ _mm512_mask_cvtepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)...@@ -7860,12 +7972,12 @@ _mm512_mask_cvtepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)
7860 3 + ((imm) & 0x3) * 4); })7972 3 + ((imm) & 0x3) * 4); })
78617973
7862#define _mm512_mask_extracti32x4_epi32(W, U, A, imm) __extension__ ({ \7974#define _mm512_mask_extracti32x4_epi32(W, U, A, imm) __extension__ ({ \
7863 (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, \7975 (__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
7864 (__v4si)_mm512_extracti32x4_epi32((A), (imm)), \7976 (__v4si)_mm512_extracti32x4_epi32((A), (imm)), \
7865 (__v4si)__W); })7977 (__v4si)(W)); })
78667978
7867#define _mm512_maskz_extracti32x4_epi32(U, A, imm) __extension__ ({ \7979#define _mm512_maskz_extracti32x4_epi32(U, A, imm) __extension__ ({ \
7868 (__m128i)__builtin_ia32_selectd_128((__mmask8)__U, \7980 (__m128i)__builtin_ia32_selectd_128((__mmask8)(U), \
7869 (__v4si)_mm512_extracti32x4_epi32((A), (imm)), \7981 (__v4si)_mm512_extracti32x4_epi32((A), (imm)), \
7870 (__v4si)_mm_setzero_si128()); })7982 (__v4si)_mm_setzero_si128()); })
78717983
...@@ -7878,12 +7990,12 @@ _mm512_mask_cvtepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)...@@ -7878,12 +7990,12 @@ _mm512_mask_cvtepi64_storeu_epi16 (void *__P, __mmask8 __M, __m512i __A)
7878 ((imm) & 1) ? 7 : 3); })7990 ((imm) & 1) ? 7 : 3); })
78797991
7880#define _mm512_mask_extracti64x4_epi64(W, U, A, imm) __extension__ ({ \7992#define _mm512_mask_extracti64x4_epi64(W, U, A, imm) __extension__ ({ \
7881 (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, \7993 (__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
7882 (__v4di)_mm512_extracti64x4_epi64((A), (imm)), \7994 (__v4di)_mm512_extracti64x4_epi64((A), (imm)), \
7883 (__v4di)__W); })7995 (__v4di)(W)); })
78847996
7885#define _mm512_maskz_extracti64x4_epi64(U, A, imm) __extension__ ({ \7997#define _mm512_maskz_extracti64x4_epi64(U, A, imm) __extension__ ({ \
7886 (__m256i)__builtin_ia32_selectq_256((__mmask8)__U, \7998 (__m256i)__builtin_ia32_selectq_256((__mmask8)(U), \
7887 (__v4di)_mm512_extracti64x4_epi64((A), (imm)), \7999 (__v4di)_mm512_extracti64x4_epi64((A), (imm)), \
7888 (__v4di)_mm256_setzero_si256()); })8000 (__v4di)_mm256_setzero_si256()); })
78898001
...@@ -8159,11 +8271,11 @@ _mm512_maskz_getexp_ps (__mmask16 __U, __m512 __A)...@@ -8159,11 +8271,11 @@ _mm512_maskz_getexp_ps (__mmask16 __U, __m512 __A)
8159 (__v8di)(__m512i)(index), (__mmask8)-1, \8271 (__v8di)(__m512i)(index), (__mmask8)-1, \
8160 (int)(scale)); })8272 (int)(scale)); })
81618273
8162#define _mm512_mask_i64gather_ps( __v1_old, __mask, __index,\8274#define _mm512_mask_i64gather_ps(v1_old, mask, index, addr, scale) __extension__({\
8163 __addr, __scale) __extension__({\8275 (__m256)__builtin_ia32_gatherdiv16sf((__v8sf)(__m256)(v1_old),\
8164__builtin_ia32_gatherdiv16sf ((__v8sf) __v1_old,\8276 (float const *)(addr), \
8165 __addr,(__v8di) __index, __mask, __scale);\8277 (__v8di)(__m512i)(index), \
8166})8278 (__mmask8)(mask), (int)(scale)); })
81678279
8168#define _mm512_i64gather_epi32(index, addr, scale) __extension__ ({\8280#define _mm512_i64gather_epi32(index, addr, scale) __extension__ ({\
8169 (__m256i)__builtin_ia32_gatherdiv16si((__v8si)_mm256_undefined_ps(), \8281 (__m256i)__builtin_ia32_gatherdiv16si((__v8si)_mm256_undefined_ps(), \
...@@ -8858,6 +8970,8 @@ _mm512_permutexvar_epi32 (__m512i __X, __m512i __Y)...@@ -8858,6 +8970,8 @@ _mm512_permutexvar_epi32 (__m512i __X, __m512i __Y)
8858 (__mmask16) -1);8970 (__mmask16) -1);
8859}8971}
88608972
8973#define _mm512_permutevar_epi32 _mm512_permutexvar_epi32
8974
8861static __inline__ __m512i __DEFAULT_FN_ATTRS8975static __inline__ __m512i __DEFAULT_FN_ATTRS
8862_mm512_mask_permutexvar_epi32 (__m512i __W, __mmask16 __M, __m512i __X,8976_mm512_mask_permutexvar_epi32 (__m512i __W, __mmask16 __M, __m512i __X,
8863 __m512i __Y)8977 __m512i __Y)
...@@ -8868,6 +8982,8 @@ _mm512_mask_permutexvar_epi32 (__m512i __W, __mmask16 __M, __m512i __X,...@@ -8868,6 +8982,8 @@ _mm512_mask_permutexvar_epi32 (__m512i __W, __mmask16 __M, __m512i __X,
8868 __M);8982 __M);
8869}8983}
88708984
8985#define _mm512_mask_permutevar_epi32 _mm512_mask_permutexvar_epi32
8986
8871static __inline__ __mmask16 __DEFAULT_FN_ATTRS8987static __inline__ __mmask16 __DEFAULT_FN_ATTRS
8872_mm512_kand (__mmask16 __A, __mmask16 __B)8988_mm512_kand (__mmask16 __A, __mmask16 __B)
8873{8989{
...@@ -8919,25 +9035,29 @@ _mm512_kxor (__mmask16 __A, __mmask16 __B)...@@ -8919,25 +9035,29 @@ _mm512_kxor (__mmask16 __A, __mmask16 __B)
8919static __inline__ void __DEFAULT_FN_ATTRS9035static __inline__ void __DEFAULT_FN_ATTRS
8920_mm512_stream_si512 (__m512i * __P, __m512i __A)9036_mm512_stream_si512 (__m512i * __P, __m512i __A)
8921{9037{
8922 __builtin_nontemporal_store((__v8di)__A, (__v8di*)__P);9038 typedef __v8di __v8di_aligned __attribute__((aligned(64)));
9039 __builtin_nontemporal_store((__v8di_aligned)__A, (__v8di_aligned*)__P);
8923}9040}
89249041
8925static __inline__ __m512i __DEFAULT_FN_ATTRS9042static __inline__ __m512i __DEFAULT_FN_ATTRS
8926_mm512_stream_load_si512 (void *__P)9043_mm512_stream_load_si512 (void *__P)
8927{9044{
8928 return __builtin_ia32_movntdqa512 ((__v8di *)__P);9045 typedef __v8di __v8di_aligned __attribute__((aligned(64)));
9046 return (__m512i) __builtin_nontemporal_load((const __v8di_aligned *)__P);
8929}9047}
89309048
8931static __inline__ void __DEFAULT_FN_ATTRS9049static __inline__ void __DEFAULT_FN_ATTRS
8932_mm512_stream_pd (double *__P, __m512d __A)9050_mm512_stream_pd (double *__P, __m512d __A)
8933{9051{
8934 __builtin_nontemporal_store((__v8df)__A, (__v8df*)__P);9052 typedef __v8df __v8df_aligned __attribute__((aligned(64)));
9053 __builtin_nontemporal_store((__v8df_aligned)__A, (__v8df_aligned*)__P);
8935}9054}
89369055
8937static __inline__ void __DEFAULT_FN_ATTRS9056static __inline__ void __DEFAULT_FN_ATTRS
8938_mm512_stream_ps (float *__P, __m512 __A)9057_mm512_stream_ps (float *__P, __m512 __A)
8939{9058{
8940 __builtin_nontemporal_store((__v16sf)__A, (__v16sf*)__P);9059 typedef __v16sf __v16sf_aligned __attribute__((aligned(64)));
9060 __builtin_nontemporal_store((__v16sf_aligned)__A, (__v16sf_aligned*)__P);
8941}9061}
89429062
8943static __inline__ __m512d __DEFAULT_FN_ATTRS9063static __inline__ __m512d __DEFAULT_FN_ATTRS
...@@ -9101,39 +9221,39 @@ _mm512_maskz_moveldup_ps (__mmask16 __U, __m512 __A)...@@ -9101,39 +9221,39 @@ _mm512_maskz_moveldup_ps (__mmask16 __U, __m512 __A)
9101static __inline__ __m128 __DEFAULT_FN_ATTRS9221static __inline__ __m128 __DEFAULT_FN_ATTRS
9102_mm_mask_move_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B)9222_mm_mask_move_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B)
9103{9223{
9104 __m128 res = __A; 9224 __m128 res = __A;
9105 res[0] = (__U & 1) ? __B[0] : __W[0];9225 res[0] = (__U & 1) ? __B[0] : __W[0];
9106 return res; 9226 return res;
9107}9227}
91089228
9109static __inline__ __m128 __DEFAULT_FN_ATTRS9229static __inline__ __m128 __DEFAULT_FN_ATTRS
9110_mm_maskz_move_ss (__mmask8 __U, __m128 __A, __m128 __B)9230_mm_maskz_move_ss (__mmask8 __U, __m128 __A, __m128 __B)
9111{9231{
9112 __m128 res = __A; 9232 __m128 res = __A;
9113 res[0] = (__U & 1) ? __B[0] : 0; 9233 res[0] = (__U & 1) ? __B[0] : 0;
9114 return res; 9234 return res;
9115}9235}
91169236
9117static __inline__ __m128d __DEFAULT_FN_ATTRS9237static __inline__ __m128d __DEFAULT_FN_ATTRS
9118_mm_mask_move_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B)9238_mm_mask_move_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B)
9119{9239{
9120 __m128d res = __A; 9240 __m128d res = __A;
9121 res[0] = (__U & 1) ? __B[0] : __W[0];9241 res[0] = (__U & 1) ? __B[0] : __W[0];
9122 return res; 9242 return res;
9123}9243}
91249244
9125static __inline__ __m128d __DEFAULT_FN_ATTRS9245static __inline__ __m128d __DEFAULT_FN_ATTRS
9126_mm_maskz_move_sd (__mmask8 __U, __m128d __A, __m128d __B)9246_mm_maskz_move_sd (__mmask8 __U, __m128d __A, __m128d __B)
9127{9247{
9128 __m128d res = __A; 9248 __m128d res = __A;
9129 res[0] = (__U & 1) ? __B[0] : 0; 9249 res[0] = (__U & 1) ? __B[0] : 0;
9130 return res; 9250 return res;
9131}9251}
91329252
9133static __inline__ void __DEFAULT_FN_ATTRS9253static __inline__ void __DEFAULT_FN_ATTRS
9134_mm_mask_store_ss (float * __W, __mmask8 __U, __m128 __A)9254_mm_mask_store_ss (float * __W, __mmask8 __U, __m128 __A)
9135{9255{
9136 __builtin_ia32_storess128_mask ((__v16sf *)__W, 9256 __builtin_ia32_storess128_mask ((__v16sf *)__W,
9137 (__v16sf) _mm512_castps128_ps512(__A),9257 (__v16sf) _mm512_castps128_ps512(__A),
9138 (__mmask16) __U & (__mmask16)1);9258 (__mmask16) __U & (__mmask16)1);
9139}9259}
...@@ -9141,7 +9261,7 @@ _mm_mask_store_ss (float * __W, __mmask8 __U, __m128 __A)...@@ -9141,7 +9261,7 @@ _mm_mask_store_ss (float * __W, __mmask8 __U, __m128 __A)
9141static __inline__ void __DEFAULT_FN_ATTRS9261static __inline__ void __DEFAULT_FN_ATTRS
9142_mm_mask_store_sd (double * __W, __mmask8 __U, __m128d __A)9262_mm_mask_store_sd (double * __W, __mmask8 __U, __m128d __A)
9143{9263{
9144 __builtin_ia32_storesd128_mask ((__v8df *)__W, 9264 __builtin_ia32_storesd128_mask ((__v8df *)__W,
9145 (__v8df) _mm512_castpd128_pd512(__A),9265 (__v8df) _mm512_castpd128_pd512(__A),
9146 (__mmask8) __U & 1);9266 (__mmask8) __U & 1);
9147}9267}
...@@ -9490,7 +9610,7 @@ _mm_mask_cvtsd_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128d __B)...@@ -9490,7 +9610,7 @@ _mm_mask_cvtsd_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128d __B)
9490{9610{
9491 return __builtin_ia32_cvtsd2ss_round_mask ((__v4sf)(__A),9611 return __builtin_ia32_cvtsd2ss_round_mask ((__v4sf)(__A),
9492 (__v2df)(__B),9612 (__v2df)(__B),
9493 (__v4sf)(__W), 9613 (__v4sf)(__W),
9494 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);9614 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);
9495}9615}
94969616
...@@ -9499,7 +9619,7 @@ _mm_maskz_cvtsd_ss (__mmask8 __U, __m128 __A, __m128d __B)...@@ -9499,7 +9619,7 @@ _mm_maskz_cvtsd_ss (__mmask8 __U, __m128 __A, __m128d __B)
9499{9619{
9500 return __builtin_ia32_cvtsd2ss_round_mask ((__v4sf)(__A),9620 return __builtin_ia32_cvtsd2ss_round_mask ((__v4sf)(__A),
9501 (__v2df)(__B),9621 (__v2df)(__B),
9502 (__v4sf)_mm_setzero_ps(), 9622 (__v4sf)_mm_setzero_ps(),
9503 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);9623 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);
9504}9624}
95059625
...@@ -9564,7 +9684,7 @@ _mm_mask_cvtss_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128 __B)...@@ -9564,7 +9684,7 @@ _mm_mask_cvtss_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128 __B)
9564 return __builtin_ia32_cvtss2sd_round_mask((__v2df)(__A),9684 return __builtin_ia32_cvtss2sd_round_mask((__v2df)(__A),
9565 (__v4sf)(__B),9685 (__v4sf)(__B),
9566 (__v2df)(__W),9686 (__v2df)(__W),
9567 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION); 9687 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);
9568}9688}
95699689
9570static __inline__ __m128d __DEFAULT_FN_ATTRS9690static __inline__ __m128d __DEFAULT_FN_ATTRS
...@@ -9572,8 +9692,8 @@ _mm_maskz_cvtss_sd (__mmask8 __U, __m128d __A, __m128 __B)...@@ -9572,8 +9692,8 @@ _mm_maskz_cvtss_sd (__mmask8 __U, __m128d __A, __m128 __B)
9572{9692{
9573 return __builtin_ia32_cvtss2sd_round_mask((__v2df)(__A),9693 return __builtin_ia32_cvtss2sd_round_mask((__v2df)(__A),
9574 (__v4sf)(__B),9694 (__v4sf)(__B),
9575 (__v2df)_mm_setzero_pd(), 9695 (__v2df)_mm_setzero_pd(),
9576 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION); 9696 (__mmask8)(__U), _MM_FROUND_CUR_DIRECTION);
9577}9697}
95789698
9579static __inline__ __m128d __DEFAULT_FN_ATTRS9699static __inline__ __m128d __DEFAULT_FN_ATTRS
...@@ -9635,6 +9755,45 @@ _mm512_mask_set1_epi64 (__m512i __O, __mmask8 __M, long long __A)...@@ -9635,6 +9755,45 @@ _mm512_mask_set1_epi64 (__m512i __O, __mmask8 __M, long long __A)
9635}9755}
9636#endif9756#endif
96379757
9758static __inline __m512i __DEFAULT_FN_ATTRS
9759_mm512_set_epi8 (char __e63, char __e62, char __e61, char __e60, char __e59,
9760 char __e58, char __e57, char __e56, char __e55, char __e54, char __e53,
9761 char __e52, char __e51, char __e50, char __e49, char __e48, char __e47,
9762 char __e46, char __e45, char __e44, char __e43, char __e42, char __e41,
9763 char __e40, char __e39, char __e38, char __e37, char __e36, char __e35,
9764 char __e34, char __e33, char __e32, char __e31, char __e30, char __e29,
9765 char __e28, char __e27, char __e26, char __e25, char __e24, char __e23,
9766 char __e22, char __e21, char __e20, char __e19, char __e18, char __e17,
9767 char __e16, char __e15, char __e14, char __e13, char __e12, char __e11,
9768 char __e10, char __e9, char __e8, char __e7, char __e6, char __e5,
9769 char __e4, char __e3, char __e2, char __e1, char __e0) {
9770
9771 return __extension__ (__m512i)(__v64qi)
9772 {__e0, __e1, __e2, __e3, __e4, __e5, __e6, __e7,
9773 __e8, __e9, __e10, __e11, __e12, __e13, __e14, __e15,
9774 __e16, __e17, __e18, __e19, __e20, __e21, __e22, __e23,
9775 __e24, __e25, __e26, __e27, __e28, __e29, __e30, __e31,
9776 __e32, __e33, __e34, __e35, __e36, __e37, __e38, __e39,
9777 __e40, __e41, __e42, __e43, __e44, __e45, __e46, __e47,
9778 __e48, __e49, __e50, __e51, __e52, __e53, __e54, __e55,
9779 __e56, __e57, __e58, __e59, __e60, __e61, __e62, __e63};
9780}
9781
9782static __inline __m512i __DEFAULT_FN_ATTRS
9783_mm512_set_epi16(short __e31, short __e30, short __e29, short __e28,
9784 short __e27, short __e26, short __e25, short __e24, short __e23,
9785 short __e22, short __e21, short __e20, short __e19, short __e18,
9786 short __e17, short __e16, short __e15, short __e14, short __e13,
9787 short __e12, short __e11, short __e10, short __e9, short __e8,
9788 short __e7, short __e6, short __e5, short __e4, short __e3,
9789 short __e2, short __e1, short __e0) {
9790 return __extension__ (__m512i)(__v32hi)
9791 {__e0, __e1, __e2, __e3, __e4, __e5, __e6, __e7,
9792 __e8, __e9, __e10, __e11, __e12, __e13, __e14, __e15,
9793 __e16, __e17, __e18, __e19, __e20, __e21, __e22, __e23,
9794 __e24, __e25, __e26, __e27, __e28, __e29, __e30, __e31 };
9795}
9796
9638static __inline __m512i __DEFAULT_FN_ATTRS9797static __inline __m512i __DEFAULT_FN_ATTRS
9639_mm512_set_epi32 (int __A, int __B, int __C, int __D,9798_mm512_set_epi32 (int __A, int __B, int __C, int __D,
9640 int __E, int __F, int __G, int __H,9799 int __E, int __F, int __G, int __H,
...@@ -9780,7 +9939,7 @@ static __inline__ double __DEFAULT_FN_ATTRS _mm512_reduce_mul_pd(__m512d __W) {...@@ -9780,7 +9939,7 @@ static __inline__ double __DEFAULT_FN_ATTRS _mm512_reduce_mul_pd(__m512d __W) {
9780}9939}
97819940
9782// Vec512 - Vector with size 512.9941// Vec512 - Vector with size 512.
9783// Vec512Neutral - All vector elements set to the identity element. 9942// Vec512Neutral - All vector elements set to the identity element.
9784// Identity element: {+,0},{*,1},{&,0xFFFFFFFFFFFFFFFF},{|,0}9943// Identity element: {+,0},{*,1},{&,0xFFFFFFFFFFFFFFFF},{|,0}
9785// Operator - Can be one of following: +,*,&,|9944// Operator - Can be one of following: +,*,&,|
9786// Mask - Intrinsic Mask9945// Mask - Intrinsic Mask
...@@ -9810,19 +9969,19 @@ _mm512_mask_reduce_mul_epi64(__mmask8 __M, __m512i __W) {...@@ -9810,19 +9969,19 @@ _mm512_mask_reduce_mul_epi64(__mmask8 __M, __m512i __W) {
98109969
9811static __inline__ long long __DEFAULT_FN_ATTRS9970static __inline__ long long __DEFAULT_FN_ATTRS
9812_mm512_mask_reduce_and_epi64(__mmask8 __M, __m512i __W) {9971_mm512_mask_reduce_and_epi64(__mmask8 __M, __m512i __W) {
9813 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_epi64(0xFFFFFFFFFFFFFFFF), 9972 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_epi64(0xFFFFFFFFFFFFFFFF),
9814 &, __M, i, i, q);9973 &, __M, i, i, q);
9815}9974}
98169975
9817static __inline__ long long __DEFAULT_FN_ATTRS9976static __inline__ long long __DEFAULT_FN_ATTRS
9818_mm512_mask_reduce_or_epi64(__mmask8 __M, __m512i __W) {9977_mm512_mask_reduce_or_epi64(__mmask8 __M, __m512i __W) {
9819 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_epi64(0), |, __M, 9978 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_epi64(0), |, __M,
9820 i, i, q);9979 i, i, q);
9821}9980}
98229981
9823static __inline__ double __DEFAULT_FN_ATTRS9982static __inline__ double __DEFAULT_FN_ATTRS
9824_mm512_mask_reduce_add_pd(__mmask8 __M, __m512d __W) {9983_mm512_mask_reduce_add_pd(__mmask8 __M, __m512d __W) {
9825 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_pd(0), +, __M, 9984 _mm512_mask_reduce_operator_64bit(__W, _mm512_set1_pd(0), +, __M,
9826 f, d, pd);9985 f, d, pd);
9827}9986}
98289987
...@@ -9884,17 +10043,17 @@ _mm512_reduce_add_epi32(__m512i __W) {...@@ -9884,17 +10043,17 @@ _mm512_reduce_add_epi32(__m512i __W) {
9884 _mm512_reduce_operator_32bit(__W, +, i, i);10043 _mm512_reduce_operator_32bit(__W, +, i, i);
9885}10044}
988610045
9887static __inline__ int __DEFAULT_FN_ATTRS 10046static __inline__ int __DEFAULT_FN_ATTRS
9888_mm512_reduce_mul_epi32(__m512i __W) {10047_mm512_reduce_mul_epi32(__m512i __W) {
9889 _mm512_reduce_operator_32bit(__W, *, i, i);10048 _mm512_reduce_operator_32bit(__W, *, i, i);
9890}10049}
989110050
9892static __inline__ int __DEFAULT_FN_ATTRS 10051static __inline__ int __DEFAULT_FN_ATTRS
9893_mm512_reduce_and_epi32(__m512i __W) {10052_mm512_reduce_and_epi32(__m512i __W) {
9894 _mm512_reduce_operator_32bit(__W, &, i, i);10053 _mm512_reduce_operator_32bit(__W, &, i, i);
9895}10054}
989610055
9897static __inline__ int __DEFAULT_FN_ATTRS 10056static __inline__ int __DEFAULT_FN_ATTRS
9898_mm512_reduce_or_epi32(__m512i __W) {10057_mm512_reduce_or_epi32(__m512i __W) {
9899 _mm512_reduce_operator_32bit(__W, |, i, i);10058 _mm512_reduce_operator_32bit(__W, |, i, i);
9900}10059}
...@@ -9910,7 +10069,7 @@ _mm512_reduce_mul_ps(__m512 __W) {...@@ -9910,7 +10069,7 @@ _mm512_reduce_mul_ps(__m512 __W) {
9910}10069}
991110070
9912// Vec512 - Vector with size 512.10071// Vec512 - Vector with size 512.
9913// Vec512Neutral - All vector elements set to the identity element. 10072// Vec512Neutral - All vector elements set to the identity element.
9914// Identity element: {+,0},{*,1},{&,0xFFFFFFFF},{|,0}10073// Identity element: {+,0},{*,1},{&,0xFFFFFFFF},{|,0}
9915// Operator - Can be one of following: +,*,&,|10074// Operator - Can be one of following: +,*,&,|
9916// Mask - Intrinsic Mask10075// Mask - Intrinsic Mask
...@@ -9940,7 +10099,7 @@ _mm512_mask_reduce_mul_epi32( __mmask16 __M, __m512i __W) {...@@ -9940,7 +10099,7 @@ _mm512_mask_reduce_mul_epi32( __mmask16 __M, __m512i __W) {
994010099
9941static __inline__ int __DEFAULT_FN_ATTRS10100static __inline__ int __DEFAULT_FN_ATTRS
9942_mm512_mask_reduce_and_epi32( __mmask16 __M, __m512i __W) {10101_mm512_mask_reduce_and_epi32( __mmask16 __M, __m512i __W) {
9943 _mm512_mask_reduce_operator_32bit(__W, _mm512_set1_epi32(0xFFFFFFFF), &, __M, 10102 _mm512_mask_reduce_operator_32bit(__W, _mm512_set1_epi32(0xFFFFFFFF), &, __M,
9944 i, i, d);10103 i, i, d);
9945}10104}
994610105
...@@ -10003,7 +10162,7 @@ _mm512_mask_reduce_mul_ps(__mmask16 __M, __m512 __W) {...@@ -10003,7 +10162,7 @@ _mm512_mask_reduce_mul_ps(__mmask16 __M, __m512 __W) {
10003 return Vec512[0]; \10162 return Vec512[0]; \
10004 })10163 })
1000510164
10006static __inline__ long long __DEFAULT_FN_ATTRS 10165static __inline__ long long __DEFAULT_FN_ATTRS
10007_mm512_reduce_max_epi64(__m512i __V) {10166_mm512_reduce_max_epi64(__m512i __V) {
10008 _mm512_reduce_maxMin_64bit(__V, max_epi64, i, i);10167 _mm512_reduce_maxMin_64bit(__V, max_epi64, i, i);
10009}10168}
...@@ -10013,7 +10172,7 @@ _mm512_reduce_max_epu64(__m512i __V) {...@@ -10013,7 +10172,7 @@ _mm512_reduce_max_epu64(__m512i __V) {
10013 _mm512_reduce_maxMin_64bit(__V, max_epu64, i, i);10172 _mm512_reduce_maxMin_64bit(__V, max_epu64, i, i);
10014}10173}
1001510174
10016static __inline__ double __DEFAULT_FN_ATTRS 10175static __inline__ double __DEFAULT_FN_ATTRS
10017_mm512_reduce_max_pd(__m512d __V) {10176_mm512_reduce_max_pd(__m512d __V) {
10018 _mm512_reduce_maxMin_64bit(__V, max_pd, d, f);10177 _mm512_reduce_maxMin_64bit(__V, max_pd, d, f);
10019}10178}
...@@ -10028,7 +10187,7 @@ _mm512_reduce_min_epu64(__m512i __V) {...@@ -10028,7 +10187,7 @@ _mm512_reduce_min_epu64(__m512i __V) {
10028 _mm512_reduce_maxMin_64bit(__V, min_epu64, i, i);10187 _mm512_reduce_maxMin_64bit(__V, min_epu64, i, i);
10029}10188}
1003010189
10031static __inline__ double __DEFAULT_FN_ATTRS 10190static __inline__ double __DEFAULT_FN_ATTRS
10032_mm512_reduce_min_pd(__m512d __V) {10191_mm512_reduce_min_pd(__m512d __V) {
10033 _mm512_reduce_maxMin_64bit(__V, min_pd, d, f);10192 _mm512_reduce_maxMin_64bit(__V, min_pd, d, f);
10034}10193}
c_headers/avx512vldqintrin.h+20-22
...@@ -1000,27 +1000,26 @@ _mm256_maskz_broadcast_f32x2 (__mmask8 __M, __m128 __A)...@@ -1000,27 +1000,26 @@ _mm256_maskz_broadcast_f32x2 (__mmask8 __M, __m128 __A)
1000}1000}
10011001
1002static __inline__ __m256d __DEFAULT_FN_ATTRS1002static __inline__ __m256d __DEFAULT_FN_ATTRS
1003_mm256_broadcast_f64x2 (__m128d __A)1003_mm256_broadcast_f64x2(__m128d __A)
1004{1004{
1005 return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,1005 return (__m256d)__builtin_shufflevector((__v2df)__A, (__v2df)__A,
1006 (__v4df)_mm256_undefined_pd(),1006 0, 1, 0, 1);
1007 (__mmask8) -1);
1008}1007}
10091008
1010static __inline__ __m256d __DEFAULT_FN_ATTRS1009static __inline__ __m256d __DEFAULT_FN_ATTRS
1011_mm256_mask_broadcast_f64x2 (__m256d __O, __mmask8 __M, __m128d __A)1010_mm256_mask_broadcast_f64x2(__m256d __O, __mmask8 __M, __m128d __A)
1012{1011{
1013 return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,1012 return (__m256d)__builtin_ia32_selectpd_256((__mmask8)__M,
1014 (__v4df) __O,1013 (__v4df)_mm256_broadcast_f64x2(__A),
1015 __M);1014 (__v4df)__O);
1016}1015}
10171016
1018static __inline__ __m256d __DEFAULT_FN_ATTRS1017static __inline__ __m256d __DEFAULT_FN_ATTRS
1019_mm256_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)1018_mm256_maskz_broadcast_f64x2 (__mmask8 __M, __m128d __A)
1020{1019{
1021 return (__m256d) __builtin_ia32_broadcastf64x2_256_mask ((__v2df) __A,1020 return (__m256d)__builtin_ia32_selectpd_256((__mmask8)__M,
1022 (__v4df) _mm256_setzero_ps (),1021 (__v4df)_mm256_broadcast_f64x2(__A),
1023 __M);1022 (__v4df)_mm256_setzero_pd());
1024}1023}
10251024
1026static __inline__ __m128i __DEFAULT_FN_ATTRS1025static __inline__ __m128i __DEFAULT_FN_ATTRS
...@@ -1072,27 +1071,26 @@ _mm256_maskz_broadcast_i32x2 (__mmask8 __M, __m128i __A)...@@ -1072,27 +1071,26 @@ _mm256_maskz_broadcast_i32x2 (__mmask8 __M, __m128i __A)
1072}1071}
10731072
1074static __inline__ __m256i __DEFAULT_FN_ATTRS1073static __inline__ __m256i __DEFAULT_FN_ATTRS
1075_mm256_broadcast_i64x2 (__m128i __A)1074_mm256_broadcast_i64x2(__m128i __A)
1076{1075{
1077 return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,1076 return (__m256i)__builtin_shufflevector((__v2di)__A, (__v2di)__A,
1078 (__v4di)_mm256_undefined_si256(),1077 0, 1, 0, 1);
1079 (__mmask8) -1);
1080}1078}
10811079
1082static __inline__ __m256i __DEFAULT_FN_ATTRS1080static __inline__ __m256i __DEFAULT_FN_ATTRS
1083_mm256_mask_broadcast_i64x2 (__m256i __O, __mmask8 __M, __m128i __A)1081_mm256_mask_broadcast_i64x2(__m256i __O, __mmask8 __M, __m128i __A)
1084{1082{
1085 return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,1083 return (__m256i)__builtin_ia32_selectq_256((__mmask8)__M,
1086 (__v4di) __O,1084 (__v4di)_mm256_broadcast_i64x2(__A),
1087 __M);1085 (__v4di)__O);
1088}1086}
10891087
1090static __inline__ __m256i __DEFAULT_FN_ATTRS1088static __inline__ __m256i __DEFAULT_FN_ATTRS
1091_mm256_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)1089_mm256_maskz_broadcast_i64x2 (__mmask8 __M, __m128i __A)
1092{1090{
1093 return (__m256i) __builtin_ia32_broadcasti64x2_256_mask ((__v2di) __A,1091 return (__m256i)__builtin_ia32_selectq_256((__mmask8)__M,
1094 (__v4di) _mm256_setzero_si256 (),1092 (__v4di)_mm256_broadcast_i64x2(__A),
1095 __M);1093 (__v4di)_mm256_setzero_si256());
1096}1094}
10971095
1098#define _mm256_extractf64x2_pd(A, imm) __extension__ ({ \1096#define _mm256_extractf64x2_pd(A, imm) __extension__ ({ \
c_headers/avx512vlintrin.h+21-24
...@@ -7189,52 +7189,49 @@ _mm256_maskz_rsqrt14_ps (__mmask8 __U, __m256 __A)...@@ -7189,52 +7189,49 @@ _mm256_maskz_rsqrt14_ps (__mmask8 __U, __m256 __A)
7189}7189}
71907190
7191static __inline__ __m256 __DEFAULT_FN_ATTRS7191static __inline__ __m256 __DEFAULT_FN_ATTRS
7192_mm256_broadcast_f32x4 (__m128 __A)7192_mm256_broadcast_f32x4(__m128 __A)
7193{7193{
7194 return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,7194 return (__m256)__builtin_shufflevector((__v4sf)__A, (__v4sf)__A,
7195 (__v8sf)_mm256_undefined_pd (),7195 0, 1, 2, 3, 0, 1, 2, 3);
7196 (__mmask8) -1);
7197}7196}
71987197
7199static __inline__ __m256 __DEFAULT_FN_ATTRS7198static __inline__ __m256 __DEFAULT_FN_ATTRS
7200_mm256_mask_broadcast_f32x4 (__m256 __O, __mmask8 __M, __m128 __A)7199_mm256_mask_broadcast_f32x4(__m256 __O, __mmask8 __M, __m128 __A)
7201{7200{
7202 return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,7201 return (__m256)__builtin_ia32_selectps_256((__mmask8)__M,
7203 (__v8sf) __O,7202 (__v8sf)_mm256_broadcast_f32x4(__A),
7204 __M);7203 (__v8sf)__O);
7205}7204}
72067205
7207static __inline__ __m256 __DEFAULT_FN_ATTRS7206static __inline__ __m256 __DEFAULT_FN_ATTRS
7208_mm256_maskz_broadcast_f32x4 (__mmask8 __M, __m128 __A)7207_mm256_maskz_broadcast_f32x4 (__mmask8 __M, __m128 __A)
7209{7208{
7210 return (__m256) __builtin_ia32_broadcastf32x4_256_mask ((__v4sf) __A,7209 return (__m256)__builtin_ia32_selectps_256((__mmask8)__M,
7211 (__v8sf) _mm256_setzero_ps (),7210 (__v8sf)_mm256_broadcast_f32x4(__A),
7212 __M);7211 (__v8sf)_mm256_setzero_ps());
7213}7212}
72147213
7215static __inline__ __m256i __DEFAULT_FN_ATTRS7214static __inline__ __m256i __DEFAULT_FN_ATTRS
7216_mm256_broadcast_i32x4 (__m128i __A)7215_mm256_broadcast_i32x4(__m128i __A)
7217{7216{
7218 return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si) __A,7217 return (__m256i)__builtin_shufflevector((__v4si)__A, (__v4si)__A,
7219 (__v8si)_mm256_undefined_si256 (),7218 0, 1, 2, 3, 0, 1, 2, 3);
7220 (__mmask8) -1);
7221}7219}
72227220
7223static __inline__ __m256i __DEFAULT_FN_ATTRS7221static __inline__ __m256i __DEFAULT_FN_ATTRS
7224_mm256_mask_broadcast_i32x4 (__m256i __O, __mmask8 __M, __m128i __A)7222_mm256_mask_broadcast_i32x4(__m256i __O, __mmask8 __M, __m128i __A)
7225{7223{
7226 return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si) __A,7224 return (__m256i)__builtin_ia32_selectd_256((__mmask8)__M,
7227 (__v8si)7225 (__v8si)_mm256_broadcast_i32x4(__A),
7228 __O, __M);7226 (__v8si)__O);
7229}7227}
72307228
7231static __inline__ __m256i __DEFAULT_FN_ATTRS7229static __inline__ __m256i __DEFAULT_FN_ATTRS
7232_mm256_maskz_broadcast_i32x4 (__mmask8 __M, __m128i __A)7230_mm256_maskz_broadcast_i32x4(__mmask8 __M, __m128i __A)
7233{7231{
7234 return (__m256i) __builtin_ia32_broadcasti32x4_256_mask ((__v4si)7232 return (__m256i)__builtin_ia32_selectd_256((__mmask8)__M,
7235 __A,7233 (__v8si)_mm256_broadcast_i32x4(__A),
7236 (__v8si) _mm256_setzero_si256 (),7234 (__v8si)_mm256_setzero_si256());
7237 __M);
7238}7235}
72397236
7240static __inline__ __m256d __DEFAULT_FN_ATTRS7237static __inline__ __m256d __DEFAULT_FN_ATTRS
c_headers/avx512vpopcntdqintrin.h created+70
...@@ -0,0 +1,70 @@
1/*===------------- avx512vpopcntdqintrin.h - AVX512VPOPCNTDQ intrinsics
2 *------------------===
3 *
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the "Software"), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 * THE SOFTWARE.
22 *
23 *===-----------------------------------------------------------------------===
24 */
25#ifndef __IMMINTRIN_H
26#error \
27 "Never use <avx512vpopcntdqintrin.h> directly; include <immintrin.h> instead."
28#endif
29
30#ifndef __AVX512VPOPCNTDQINTRIN_H
31#define __AVX512VPOPCNTDQINTRIN_H
32
33/* Define the default attributes for the functions in this file. */
34#define __DEFAULT_FN_ATTRS \
35 __attribute__((__always_inline__, __nodebug__, __target__("avx512vpopcntd" \
36 "q")))
37
38static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi64(__m512i __A) {
39 return (__m512i)__builtin_ia32_vpopcntq_512((__v8di)__A);
40}
41
42static __inline__ __m512i __DEFAULT_FN_ATTRS
43_mm512_mask_popcnt_epi64(__m512i __W, __mmask8 __U, __m512i __A) {
44 return (__m512i)__builtin_ia32_selectq_512(
45 (__mmask8)__U, (__v8di)_mm512_popcnt_epi64(__A), (__v8di)__W);
46}
47
48static __inline__ __m512i __DEFAULT_FN_ATTRS
49_mm512_maskz_popcnt_epi64(__mmask8 __U, __m512i __A) {
50 return _mm512_mask_popcnt_epi64((__m512i)_mm512_setzero_si512(), __U, __A);
51}
52
53static __inline__ __m512i __DEFAULT_FN_ATTRS _mm512_popcnt_epi32(__m512i __A) {
54 return (__m512i)__builtin_ia32_vpopcntd_512((__v16si)__A);
55}
56
57static __inline__ __m512i __DEFAULT_FN_ATTRS
58_mm512_mask_popcnt_epi32(__m512i __W, __mmask16 __U, __m512i __A) {
59 return (__m512i)__builtin_ia32_selectd_512(
60 (__mmask16)__U, (__v16si)_mm512_popcnt_epi32(__A), (__v16si)__W);
61}
62
63static __inline__ __m512i __DEFAULT_FN_ATTRS
64_mm512_maskz_popcnt_epi32(__mmask16 __U, __m512i __A) {
65 return _mm512_mask_popcnt_epi32((__m512i)_mm512_setzero_si512(), __U, __A);
66}
67
68#undef __DEFAULT_FN_ATTRS
69
70#endif
c_headers/avxintrin.h+407-139
...@@ -1458,12 +1458,13 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1458,12 +1458,13 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1458/// \brief Computes two dot products in parallel, using the lower and upper1458/// \brief Computes two dot products in parallel, using the lower and upper
1459/// halves of two [8 x float] vectors as input to the two computations, and1459/// halves of two [8 x float] vectors as input to the two computations, and
1460/// returning the two dot products in the lower and upper halves of the1460/// returning the two dot products in the lower and upper halves of the
1461/// [8 x float] result. The immediate integer operand controls which input1461/// [8 x float] result.
1462/// elements will contribute to the dot product, and where the final results1462///
1463/// are returned. In general, for each dot product, the four corresponding1463/// The immediate integer operand controls which input elements will
1464/// elements of the input vectors are multiplied; the first two and second1464/// contribute to the dot product, and where the final results are returned.
1465/// two products are summed, then the two sums are added to form the final1465/// In general, for each dot product, the four corresponding elements of the
1466/// result.1466/// input vectors are multiplied; the first two and second two products are
1467/// summed, then the two sums are added to form the final result.
1467///1468///
1468/// \headerfile <x86intrin.h>1469/// \headerfile <x86intrin.h>
1469///1470///
...@@ -1497,15 +1498,16 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1497,15 +1498,16 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
14971498
1498/* Vector shuffle */1499/* Vector shuffle */
1499/// \brief Selects 8 float values from the 256-bit operands of [8 x float], as1500/// \brief Selects 8 float values from the 256-bit operands of [8 x float], as
1500/// specified by the immediate value operand. The four selected elements in1501/// specified by the immediate value operand.
1501/// each operand are copied to the destination according to the bits1502///
1502/// specified in the immediate operand. The selected elements from the first1503/// The four selected elements in each operand are copied to the destination
1503/// 256-bit operand are copied to bits [63:0] and bits [191:128] of the1504/// according to the bits specified in the immediate operand. The selected
1504/// destination, and the selected elements from the second 256-bit operand1505/// elements from the first 256-bit operand are copied to bits [63:0] and
1505/// are copied to bits [127:64] and bits [255:192] of the destination. For1506/// bits [191:128] of the destination, and the selected elements from the
1506/// example, if bits [7:0] of the immediate operand contain a value of 0xFF,1507/// second 256-bit operand are copied to bits [127:64] and bits [255:192] of
1507/// the 256-bit destination vector would contain the following values: b[7],1508/// the destination. For example, if bits [7:0] of the immediate operand
1508/// b[7], a[7], a[7], b[3], b[3], a[3], a[3].1509/// contain a value of 0xFF, the 256-bit destination vector would contain the
1510/// following values: b[7], b[7], a[7], a[7], b[3], b[3], a[3], a[3].
1509///1511///
1510/// \headerfile <x86intrin.h>1512/// \headerfile <x86intrin.h>
1511///1513///
...@@ -1557,13 +1559,14 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1557,13 +1559,14 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1557 12 + (((mask) >> 6) & 0x3)); })1559 12 + (((mask) >> 6) & 0x3)); })
15581560
1559/// \brief Selects four double-precision values from the 256-bit operands of1561/// \brief Selects four double-precision values from the 256-bit operands of
1560/// [4 x double], as specified by the immediate value operand. The selected1562/// [4 x double], as specified by the immediate value operand.
1561/// elements from the first 256-bit operand are copied to bits [63:0] and1563///
1562/// bits [191:128] in the destination, and the selected elements from the1564/// The selected elements from the first 256-bit operand are copied to bits
1563/// second 256-bit operand are copied to bits [127:64] and bits [255:192] in1565/// [63:0] and bits [191:128] in the destination, and the selected elements
1564/// the destination. For example, if bits [3:0] of the immediate operand1566/// from the second 256-bit operand are copied to bits [127:64] and bits
1565/// contain a value of 0xF, the 256-bit destination vector would contain the1567/// [255:192] in the destination. For example, if bits [3:0] of the immediate
1566/// following values: b[3], a[3], b[1], a[1].1568/// operand contain a value of 0xF, the 256-bit destination vector would
1569/// contain the following values: b[3], a[3], b[1], a[1].
1567///1570///
1568/// \headerfile <x86intrin.h>1571/// \headerfile <x86intrin.h>
1569///1572///
...@@ -1613,9 +1616,9 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1613,9 +1616,9 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1613#define _CMP_NEQ_UQ 0x04 /* Not-equal (unordered, non-signaling) */1616#define _CMP_NEQ_UQ 0x04 /* Not-equal (unordered, non-signaling) */
1614#define _CMP_NLT_US 0x05 /* Not-less-than (unordered, signaling) */1617#define _CMP_NLT_US 0x05 /* Not-less-than (unordered, signaling) */
1615#define _CMP_NLE_US 0x06 /* Not-less-than-or-equal (unordered, signaling) */1618#define _CMP_NLE_US 0x06 /* Not-less-than-or-equal (unordered, signaling) */
1616#define _CMP_ORD_Q 0x07 /* Ordered (nonsignaling) */1619#define _CMP_ORD_Q 0x07 /* Ordered (non-signaling) */
1617#define _CMP_EQ_UQ 0x08 /* Equal (unordered, non-signaling) */1620#define _CMP_EQ_UQ 0x08 /* Equal (unordered, non-signaling) */
1618#define _CMP_NGE_US 0x09 /* Not-greater-than-or-equal (unord, signaling) */1621#define _CMP_NGE_US 0x09 /* Not-greater-than-or-equal (unordered, signaling) */
1619#define _CMP_NGT_US 0x0a /* Not-greater-than (unordered, signaling) */1622#define _CMP_NGT_US 0x0a /* Not-greater-than (unordered, signaling) */
1620#define _CMP_FALSE_OQ 0x0b /* False (ordered, non-signaling) */1623#define _CMP_FALSE_OQ 0x0b /* False (ordered, non-signaling) */
1621#define _CMP_NEQ_OQ 0x0c /* Not-equal (ordered, non-signaling) */1624#define _CMP_NEQ_OQ 0x0c /* Not-equal (ordered, non-signaling) */
...@@ -1628,10 +1631,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1628,10 +1631,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1628#define _CMP_UNORD_S 0x13 /* Unordered (signaling) */1631#define _CMP_UNORD_S 0x13 /* Unordered (signaling) */
1629#define _CMP_NEQ_US 0x14 /* Not-equal (unordered, signaling) */1632#define _CMP_NEQ_US 0x14 /* Not-equal (unordered, signaling) */
1630#define _CMP_NLT_UQ 0x15 /* Not-less-than (unordered, non-signaling) */1633#define _CMP_NLT_UQ 0x15 /* Not-less-than (unordered, non-signaling) */
1631#define _CMP_NLE_UQ 0x16 /* Not-less-than-or-equal (unord, non-signaling) */1634#define _CMP_NLE_UQ 0x16 /* Not-less-than-or-equal (unordered, non-signaling) */
1632#define _CMP_ORD_S 0x17 /* Ordered (signaling) */1635#define _CMP_ORD_S 0x17 /* Ordered (signaling) */
1633#define _CMP_EQ_US 0x18 /* Equal (unordered, signaling) */1636#define _CMP_EQ_US 0x18 /* Equal (unordered, signaling) */
1634#define _CMP_NGE_UQ 0x19 /* Not-greater-than-or-equal (unord, non-sign) */1637#define _CMP_NGE_UQ 0x19 /* Not-greater-than-or-equal (unordered, non-signaling) */
1635#define _CMP_NGT_UQ 0x1a /* Not-greater-than (unordered, non-signaling) */1638#define _CMP_NGT_UQ 0x1a /* Not-greater-than (unordered, non-signaling) */
1636#define _CMP_FALSE_OS 0x1b /* False (ordered, signaling) */1639#define _CMP_FALSE_OS 0x1b /* False (ordered, signaling) */
1637#define _CMP_NEQ_OS 0x1c /* Not-equal (ordered, signaling) */1640#define _CMP_NEQ_OS 0x1c /* Not-equal (ordered, signaling) */
...@@ -1641,9 +1644,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1641,9 +1644,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
16411644
1642/// \brief Compares each of the corresponding double-precision values of two1645/// \brief Compares each of the corresponding double-precision values of two
1643/// 128-bit vectors of [2 x double], using the operation specified by the1646/// 128-bit vectors of [2 x double], using the operation specified by the
1644/// immediate integer operand. Returns a [2 x double] vector consisting of1647/// immediate integer operand.
1645/// two doubles corresponding to the two comparison results: zero if the1648///
1646/// comparison is false, and all 1's if the comparison is true.1649/// Returns a [2 x double] vector consisting of two doubles corresponding to
1650/// the two comparison results: zero if the comparison is false, and all 1's
1651/// if the comparison is true.
1647///1652///
1648/// \headerfile <x86intrin.h>1653/// \headerfile <x86intrin.h>
1649///1654///
...@@ -1660,17 +1665,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1660,17 +1665,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1660/// \param c1665/// \param c
1661/// An immediate integer operand, with bits [4:0] specifying which comparison1666/// An immediate integer operand, with bits [4:0] specifying which comparison
1662/// operation to use: \n1667/// operation to use: \n
1663/// 00h, 08h, 10h, 18h: Equal \n1668/// 0x00 : Equal (ordered, non-signaling)
1664/// 01h, 09h, 11h, 19h: Less than \n1669/// 0x01 : Less-than (ordered, signaling)
1665/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1670/// 0x02 : Less-than-or-equal (ordered, signaling)
1666/// (swapped operands) \n1671/// 0x03 : Unordered (non-signaling)
1667/// 03h, 0Bh, 13h, 1Bh: Unordered \n1672/// 0x04 : Not-equal (unordered, non-signaling)
1668/// 04h, 0Ch, 14h, 1Ch: Not equal \n1673/// 0x05 : Not-less-than (unordered, signaling)
1669/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1674/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1670/// (swapped operands) \n1675/// 0x07 : Ordered (non-signaling)
1671/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1676/// 0x08 : Equal (unordered, non-signaling)
1672/// (swapped operands) \n1677/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1673/// 07h, 0Fh, 17h, 1Fh: Ordered1678/// 0x0a : Not-greater-than (unordered, signaling)
1679/// 0x0b : False (ordered, non-signaling)
1680/// 0x0c : Not-equal (ordered, non-signaling)
1681/// 0x0d : Greater-than-or-equal (ordered, signaling)
1682/// 0x0e : Greater-than (ordered, signaling)
1683/// 0x0f : True (unordered, non-signaling)
1684/// 0x10 : Equal (ordered, signaling)
1685/// 0x11 : Less-than (ordered, non-signaling)
1686/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1687/// 0x13 : Unordered (signaling)
1688/// 0x14 : Not-equal (unordered, signaling)
1689/// 0x15 : Not-less-than (unordered, non-signaling)
1690/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1691/// 0x17 : Ordered (signaling)
1692/// 0x18 : Equal (unordered, signaling)
1693/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1694/// 0x1a : Not-greater-than (unordered, non-signaling)
1695/// 0x1b : False (ordered, signaling)
1696/// 0x1c : Not-equal (ordered, signaling)
1697/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1698/// 0x1e : Greater-than (ordered, non-signaling)
1699/// 0x1f : True (unordered, signaling)
1674/// \returns A 128-bit vector of [2 x double] containing the comparison results.1700/// \returns A 128-bit vector of [2 x double] containing the comparison results.
1675#define _mm_cmp_pd(a, b, c) __extension__ ({ \1701#define _mm_cmp_pd(a, b, c) __extension__ ({ \
1676 (__m128d)__builtin_ia32_cmppd((__v2df)(__m128d)(a), \1702 (__m128d)__builtin_ia32_cmppd((__v2df)(__m128d)(a), \
...@@ -1678,9 +1704,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1678,9 +1704,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
16781704
1679/// \brief Compares each of the corresponding values of two 128-bit vectors of1705/// \brief Compares each of the corresponding values of two 128-bit vectors of
1680/// [4 x float], using the operation specified by the immediate integer1706/// [4 x float], using the operation specified by the immediate integer
1681/// operand. Returns a [4 x float] vector consisting of four floats1707/// operand.
1682/// corresponding to the four comparison results: zero if the comparison is1708///
1683/// false, and all 1's if the comparison is true.1709/// Returns a [4 x float] vector consisting of four floats corresponding to
1710/// the four comparison results: zero if the comparison is false, and all 1's
1711/// if the comparison is true.
1684///1712///
1685/// \headerfile <x86intrin.h>1713/// \headerfile <x86intrin.h>
1686///1714///
...@@ -1697,17 +1725,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1697,17 +1725,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1697/// \param c1725/// \param c
1698/// An immediate integer operand, with bits [4:0] specifying which comparison1726/// An immediate integer operand, with bits [4:0] specifying which comparison
1699/// operation to use: \n1727/// operation to use: \n
1700/// 00h, 08h, 10h, 18h: Equal \n1728/// 0x00 : Equal (ordered, non-signaling)
1701/// 01h, 09h, 11h, 19h: Less than \n1729/// 0x01 : Less-than (ordered, signaling)
1702/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1730/// 0x02 : Less-than-or-equal (ordered, signaling)
1703/// (swapped operands) \n1731/// 0x03 : Unordered (non-signaling)
1704/// 03h, 0Bh, 13h, 1Bh: Unordered \n1732/// 0x04 : Not-equal (unordered, non-signaling)
1705/// 04h, 0Ch, 14h, 1Ch: Not equal \n1733/// 0x05 : Not-less-than (unordered, signaling)
1706/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1734/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1707/// (swapped operands) \n1735/// 0x07 : Ordered (non-signaling)
1708/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1736/// 0x08 : Equal (unordered, non-signaling)
1709/// (swapped operands) \n1737/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1710/// 07h, 0Fh, 17h, 1Fh: Ordered1738/// 0x0a : Not-greater-than (unordered, signaling)
1739/// 0x0b : False (ordered, non-signaling)
1740/// 0x0c : Not-equal (ordered, non-signaling)
1741/// 0x0d : Greater-than-or-equal (ordered, signaling)
1742/// 0x0e : Greater-than (ordered, signaling)
1743/// 0x0f : True (unordered, non-signaling)
1744/// 0x10 : Equal (ordered, signaling)
1745/// 0x11 : Less-than (ordered, non-signaling)
1746/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1747/// 0x13 : Unordered (signaling)
1748/// 0x14 : Not-equal (unordered, signaling)
1749/// 0x15 : Not-less-than (unordered, non-signaling)
1750/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1751/// 0x17 : Ordered (signaling)
1752/// 0x18 : Equal (unordered, signaling)
1753/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1754/// 0x1a : Not-greater-than (unordered, non-signaling)
1755/// 0x1b : False (ordered, signaling)
1756/// 0x1c : Not-equal (ordered, signaling)
1757/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1758/// 0x1e : Greater-than (ordered, non-signaling)
1759/// 0x1f : True (unordered, signaling)
1711/// \returns A 128-bit vector of [4 x float] containing the comparison results.1760/// \returns A 128-bit vector of [4 x float] containing the comparison results.
1712#define _mm_cmp_ps(a, b, c) __extension__ ({ \1761#define _mm_cmp_ps(a, b, c) __extension__ ({ \
1713 (__m128)__builtin_ia32_cmpps((__v4sf)(__m128)(a), \1762 (__m128)__builtin_ia32_cmpps((__v4sf)(__m128)(a), \
...@@ -1715,9 +1764,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1715,9 +1764,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
17151764
1716/// \brief Compares each of the corresponding double-precision values of two1765/// \brief Compares each of the corresponding double-precision values of two
1717/// 256-bit vectors of [4 x double], using the operation specified by the1766/// 256-bit vectors of [4 x double], using the operation specified by the
1718/// immediate integer operand. Returns a [4 x double] vector consisting of1767/// immediate integer operand.
1719/// four doubles corresponding to the four comparison results: zero if the1768///
1720/// comparison is false, and all 1's if the comparison is true.1769/// Returns a [4 x double] vector consisting of four doubles corresponding to
1770/// the four comparison results: zero if the comparison is false, and all 1's
1771/// if the comparison is true.
1721///1772///
1722/// \headerfile <x86intrin.h>1773/// \headerfile <x86intrin.h>
1723///1774///
...@@ -1734,17 +1785,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1734,17 +1785,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1734/// \param c1785/// \param c
1735/// An immediate integer operand, with bits [4:0] specifying which comparison1786/// An immediate integer operand, with bits [4:0] specifying which comparison
1736/// operation to use: \n1787/// operation to use: \n
1737/// 00h, 08h, 10h, 18h: Equal \n1788/// 0x00 : Equal (ordered, non-signaling)
1738/// 01h, 09h, 11h, 19h: Less than \n1789/// 0x01 : Less-than (ordered, signaling)
1739/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1790/// 0x02 : Less-than-or-equal (ordered, signaling)
1740/// (swapped operands) \n1791/// 0x03 : Unordered (non-signaling)
1741/// 03h, 0Bh, 13h, 1Bh: Unordered \n1792/// 0x04 : Not-equal (unordered, non-signaling)
1742/// 04h, 0Ch, 14h, 1Ch: Not equal \n1793/// 0x05 : Not-less-than (unordered, signaling)
1743/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1794/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1744/// (swapped operands) \n1795/// 0x07 : Ordered (non-signaling)
1745/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1796/// 0x08 : Equal (unordered, non-signaling)
1746/// (swapped operands) \n1797/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1747/// 07h, 0Fh, 17h, 1Fh: Ordered1798/// 0x0a : Not-greater-than (unordered, signaling)
1799/// 0x0b : False (ordered, non-signaling)
1800/// 0x0c : Not-equal (ordered, non-signaling)
1801/// 0x0d : Greater-than-or-equal (ordered, signaling)
1802/// 0x0e : Greater-than (ordered, signaling)
1803/// 0x0f : True (unordered, non-signaling)
1804/// 0x10 : Equal (ordered, signaling)
1805/// 0x11 : Less-than (ordered, non-signaling)
1806/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1807/// 0x13 : Unordered (signaling)
1808/// 0x14 : Not-equal (unordered, signaling)
1809/// 0x15 : Not-less-than (unordered, non-signaling)
1810/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1811/// 0x17 : Ordered (signaling)
1812/// 0x18 : Equal (unordered, signaling)
1813/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1814/// 0x1a : Not-greater-than (unordered, non-signaling)
1815/// 0x1b : False (ordered, signaling)
1816/// 0x1c : Not-equal (ordered, signaling)
1817/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1818/// 0x1e : Greater-than (ordered, non-signaling)
1819/// 0x1f : True (unordered, signaling)
1748/// \returns A 256-bit vector of [4 x double] containing the comparison results.1820/// \returns A 256-bit vector of [4 x double] containing the comparison results.
1749#define _mm256_cmp_pd(a, b, c) __extension__ ({ \1821#define _mm256_cmp_pd(a, b, c) __extension__ ({ \
1750 (__m256d)__builtin_ia32_cmppd256((__v4df)(__m256d)(a), \1822 (__m256d)__builtin_ia32_cmppd256((__v4df)(__m256d)(a), \
...@@ -1752,9 +1824,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1752,9 +1824,11 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
17521824
1753/// \brief Compares each of the corresponding values of two 256-bit vectors of1825/// \brief Compares each of the corresponding values of two 256-bit vectors of
1754/// [8 x float], using the operation specified by the immediate integer1826/// [8 x float], using the operation specified by the immediate integer
1755/// operand. Returns a [8 x float] vector consisting of eight floats1827/// operand.
1756/// corresponding to the eight comparison results: zero if the comparison is1828///
1757/// false, and all 1's if the comparison is true.1829/// Returns a [8 x float] vector consisting of eight floats corresponding to
1830/// the eight comparison results: zero if the comparison is false, and all
1831/// 1's if the comparison is true.
1758///1832///
1759/// \headerfile <x86intrin.h>1833/// \headerfile <x86intrin.h>
1760///1834///
...@@ -1771,17 +1845,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1771,17 +1845,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1771/// \param c1845/// \param c
1772/// An immediate integer operand, with bits [4:0] specifying which comparison1846/// An immediate integer operand, with bits [4:0] specifying which comparison
1773/// operation to use: \n1847/// operation to use: \n
1774/// 00h, 08h, 10h, 18h: Equal \n1848/// 0x00 : Equal (ordered, non-signaling)
1775/// 01h, 09h, 11h, 19h: Less than \n1849/// 0x01 : Less-than (ordered, signaling)
1776/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1850/// 0x02 : Less-than-or-equal (ordered, signaling)
1777/// (swapped operands) \n1851/// 0x03 : Unordered (non-signaling)
1778/// 03h, 0Bh, 13h, 1Bh: Unordered \n1852/// 0x04 : Not-equal (unordered, non-signaling)
1779/// 04h, 0Ch, 14h, 1Ch: Not equal \n1853/// 0x05 : Not-less-than (unordered, signaling)
1780/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1854/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1781/// (swapped operands) \n1855/// 0x07 : Ordered (non-signaling)
1782/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1856/// 0x08 : Equal (unordered, non-signaling)
1783/// (swapped operands) \n1857/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1784/// 07h, 0Fh, 17h, 1Fh: Ordered1858/// 0x0a : Not-greater-than (unordered, signaling)
1859/// 0x0b : False (ordered, non-signaling)
1860/// 0x0c : Not-equal (ordered, non-signaling)
1861/// 0x0d : Greater-than-or-equal (ordered, signaling)
1862/// 0x0e : Greater-than (ordered, signaling)
1863/// 0x0f : True (unordered, non-signaling)
1864/// 0x10 : Equal (ordered, signaling)
1865/// 0x11 : Less-than (ordered, non-signaling)
1866/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1867/// 0x13 : Unordered (signaling)
1868/// 0x14 : Not-equal (unordered, signaling)
1869/// 0x15 : Not-less-than (unordered, non-signaling)
1870/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1871/// 0x17 : Ordered (signaling)
1872/// 0x18 : Equal (unordered, signaling)
1873/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1874/// 0x1a : Not-greater-than (unordered, non-signaling)
1875/// 0x1b : False (ordered, signaling)
1876/// 0x1c : Not-equal (ordered, signaling)
1877/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1878/// 0x1e : Greater-than (ordered, non-signaling)
1879/// 0x1f : True (unordered, signaling)
1785/// \returns A 256-bit vector of [8 x float] containing the comparison results.1880/// \returns A 256-bit vector of [8 x float] containing the comparison results.
1786#define _mm256_cmp_ps(a, b, c) __extension__ ({ \1881#define _mm256_cmp_ps(a, b, c) __extension__ ({ \
1787 (__m256)__builtin_ia32_cmpps256((__v8sf)(__m256)(a), \1882 (__m256)__builtin_ia32_cmpps256((__v8sf)(__m256)(a), \
...@@ -1789,8 +1884,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1789,8 +1884,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
17891884
1790/// \brief Compares each of the corresponding scalar double-precision values of1885/// \brief Compares each of the corresponding scalar double-precision values of
1791/// two 128-bit vectors of [2 x double], using the operation specified by the1886/// two 128-bit vectors of [2 x double], using the operation specified by the
1792/// immediate integer operand. If the result is true, all 64 bits of the1887/// immediate integer operand.
1793/// destination vector are set; otherwise they are cleared.1888///
1889/// If the result is true, all 64 bits of the destination vector are set;
1890/// otherwise they are cleared.
1794///1891///
1795/// \headerfile <x86intrin.h>1892/// \headerfile <x86intrin.h>
1796///1893///
...@@ -1807,17 +1904,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1807,17 +1904,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1807/// \param c1904/// \param c
1808/// An immediate integer operand, with bits [4:0] specifying which comparison1905/// An immediate integer operand, with bits [4:0] specifying which comparison
1809/// operation to use: \n1906/// operation to use: \n
1810/// 00h, 08h, 10h, 18h: Equal \n1907/// 0x00 : Equal (ordered, non-signaling)
1811/// 01h, 09h, 11h, 19h: Less than \n1908/// 0x01 : Less-than (ordered, signaling)
1812/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1909/// 0x02 : Less-than-or-equal (ordered, signaling)
1813/// (swapped operands) \n1910/// 0x03 : Unordered (non-signaling)
1814/// 03h, 0Bh, 13h, 1Bh: Unordered \n1911/// 0x04 : Not-equal (unordered, non-signaling)
1815/// 04h, 0Ch, 14h, 1Ch: Not equal \n1912/// 0x05 : Not-less-than (unordered, signaling)
1816/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1913/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1817/// (swapped operands) \n1914/// 0x07 : Ordered (non-signaling)
1818/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1915/// 0x08 : Equal (unordered, non-signaling)
1819/// (swapped operands) \n1916/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1820/// 07h, 0Fh, 17h, 1Fh: Ordered1917/// 0x0a : Not-greater-than (unordered, signaling)
1918/// 0x0b : False (ordered, non-signaling)
1919/// 0x0c : Not-equal (ordered, non-signaling)
1920/// 0x0d : Greater-than-or-equal (ordered, signaling)
1921/// 0x0e : Greater-than (ordered, signaling)
1922/// 0x0f : True (unordered, non-signaling)
1923/// 0x10 : Equal (ordered, signaling)
1924/// 0x11 : Less-than (ordered, non-signaling)
1925/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1926/// 0x13 : Unordered (signaling)
1927/// 0x14 : Not-equal (unordered, signaling)
1928/// 0x15 : Not-less-than (unordered, non-signaling)
1929/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1930/// 0x17 : Ordered (signaling)
1931/// 0x18 : Equal (unordered, signaling)
1932/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1933/// 0x1a : Not-greater-than (unordered, non-signaling)
1934/// 0x1b : False (ordered, signaling)
1935/// 0x1c : Not-equal (ordered, signaling)
1936/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1937/// 0x1e : Greater-than (ordered, non-signaling)
1938/// 0x1f : True (unordered, signaling)
1821/// \returns A 128-bit vector of [2 x double] containing the comparison results.1939/// \returns A 128-bit vector of [2 x double] containing the comparison results.
1822#define _mm_cmp_sd(a, b, c) __extension__ ({ \1940#define _mm_cmp_sd(a, b, c) __extension__ ({ \
1823 (__m128d)__builtin_ia32_cmpsd((__v2df)(__m128d)(a), \1941 (__m128d)__builtin_ia32_cmpsd((__v2df)(__m128d)(a), \
...@@ -1825,8 +1943,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1825,8 +1943,10 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
18251943
1826/// \brief Compares each of the corresponding scalar values of two 128-bit1944/// \brief Compares each of the corresponding scalar values of two 128-bit
1827/// vectors of [4 x float], using the operation specified by the immediate1945/// vectors of [4 x float], using the operation specified by the immediate
1828/// integer operand. If the result is true, all 32 bits of the destination1946/// integer operand.
1829/// vector are set; otherwise they are cleared.1947///
1948/// If the result is true, all 32 bits of the destination vector are set;
1949/// otherwise they are cleared.
1830///1950///
1831/// \headerfile <x86intrin.h>1951/// \headerfile <x86intrin.h>
1832///1952///
...@@ -1843,17 +1963,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)...@@ -1843,17 +1963,38 @@ _mm256_blendv_ps(__m256 __a, __m256 __b, __m256 __c)
1843/// \param c1963/// \param c
1844/// An immediate integer operand, with bits [4:0] specifying which comparison1964/// An immediate integer operand, with bits [4:0] specifying which comparison
1845/// operation to use: \n1965/// operation to use: \n
1846/// 00h, 08h, 10h, 18h: Equal \n1966/// 0x00 : Equal (ordered, non-signaling)
1847/// 01h, 09h, 11h, 19h: Less than \n1967/// 0x01 : Less-than (ordered, signaling)
1848/// 02h, 0Ah, 12h, 1Ah: Less than or equal / Greater than or equal1968/// 0x02 : Less-than-or-equal (ordered, signaling)
1849/// (swapped operands) \n1969/// 0x03 : Unordered (non-signaling)
1850/// 03h, 0Bh, 13h, 1Bh: Unordered \n1970/// 0x04 : Not-equal (unordered, non-signaling)
1851/// 04h, 0Ch, 14h, 1Ch: Not equal \n1971/// 0x05 : Not-less-than (unordered, signaling)
1852/// 05h, 0Dh, 15h, 1Dh: Not less than / Not greater than1972/// 0x06 : Not-less-than-or-equal (unordered, signaling)
1853/// (swapped operands) \n1973/// 0x07 : Ordered (non-signaling)
1854/// 06h, 0Eh, 16h, 1Eh: Not less than or equal / Not greater than or equal1974/// 0x08 : Equal (unordered, non-signaling)
1855/// (swapped operands) \n1975/// 0x09 : Not-greater-than-or-equal (unordered, signaling)
1856/// 07h, 0Fh, 17h, 1Fh: Ordered1976/// 0x0a : Not-greater-than (unordered, signaling)
1977/// 0x0b : False (ordered, non-signaling)
1978/// 0x0c : Not-equal (ordered, non-signaling)
1979/// 0x0d : Greater-than-or-equal (ordered, signaling)
1980/// 0x0e : Greater-than (ordered, signaling)
1981/// 0x0f : True (unordered, non-signaling)
1982/// 0x10 : Equal (ordered, signaling)
1983/// 0x11 : Less-than (ordered, non-signaling)
1984/// 0x12 : Less-than-or-equal (ordered, non-signaling)
1985/// 0x13 : Unordered (signaling)
1986/// 0x14 : Not-equal (unordered, signaling)
1987/// 0x15 : Not-less-than (unordered, non-signaling)
1988/// 0x16 : Not-less-than-or-equal (unordered, non-signaling)
1989/// 0x17 : Ordered (signaling)
1990/// 0x18 : Equal (unordered, signaling)
1991/// 0x19 : Not-greater-than-or-equal (unordered, non-signaling)
1992/// 0x1a : Not-greater-than (unordered, non-signaling)
1993/// 0x1b : False (ordered, signaling)
1994/// 0x1c : Not-equal (ordered, signaling)
1995/// 0x1d : Greater-than-or-equal (ordered, non-signaling)
1996/// 0x1e : Greater-than (ordered, non-signaling)
1997/// 0x1f : True (unordered, signaling)
1857/// \returns A 128-bit vector of [4 x float] containing the comparison results.1998/// \returns A 128-bit vector of [4 x float] containing the comparison results.
1858#define _mm_cmp_ss(a, b, c) __extension__ ({ \1999#define _mm_cmp_ss(a, b, c) __extension__ ({ \
1859 (__m128)__builtin_ia32_cmpss((__v4sf)(__m128)(a), \2000 (__m128)__builtin_ia32_cmpss((__v4sf)(__m128)(a), \
...@@ -2184,12 +2325,32 @@ _mm256_cvttps_epi32(__m256 __a)...@@ -2184,12 +2325,32 @@ _mm256_cvttps_epi32(__m256 __a)
2184 return (__m256i)__builtin_ia32_cvttps2dq256((__v8sf) __a);2325 return (__m256i)__builtin_ia32_cvttps2dq256((__v8sf) __a);
2185}2326}
21862327
2328/// \brief Returns the first element of the input vector of [4 x double].
2329///
2330/// \headerfile <avxintrin.h>
2331///
2332/// This intrinsic is a utility function and does not correspond to a specific
2333/// instruction.
2334///
2335/// \param __a
2336/// A 256-bit vector of [4 x double].
2337/// \returns A 64 bit double containing the first element of the input vector.
2187static __inline double __DEFAULT_FN_ATTRS2338static __inline double __DEFAULT_FN_ATTRS
2188_mm256_cvtsd_f64(__m256d __a)2339_mm256_cvtsd_f64(__m256d __a)
2189{2340{
2190 return __a[0];2341 return __a[0];
2191}2342}
21922343
2344/// \brief Returns the first element of the input vector of [8 x i32].
2345///
2346/// \headerfile <avxintrin.h>
2347///
2348/// This intrinsic is a utility function and does not correspond to a specific
2349/// instruction.
2350///
2351/// \param __a
2352/// A 256-bit vector of [8 x i32].
2353/// \returns A 32 bit integer containing the first element of the input vector.
2193static __inline int __DEFAULT_FN_ATTRS2354static __inline int __DEFAULT_FN_ATTRS
2194_mm256_cvtsi256_si32(__m256i __a)2355_mm256_cvtsi256_si32(__m256i __a)
2195{2356{
...@@ -2197,6 +2358,16 @@ _mm256_cvtsi256_si32(__m256i __a)...@@ -2197,6 +2358,16 @@ _mm256_cvtsi256_si32(__m256i __a)
2197 return __b[0];2358 return __b[0];
2198}2359}
21992360
2361/// \brief Returns the first element of the input vector of [8 x float].
2362///
2363/// \headerfile <avxintrin.h>
2364///
2365/// This intrinsic is a utility function and does not correspond to a specific
2366/// instruction.
2367///
2368/// \param __a
2369/// A 256-bit vector of [8 x float].
2370/// \returns A 32 bit float containing the first element of the input vector.
2200static __inline float __DEFAULT_FN_ATTRS2371static __inline float __DEFAULT_FN_ATTRS
2201_mm256_cvtss_f32(__m256 __a)2372_mm256_cvtss_f32(__m256 __a)
2202{2373{
...@@ -2380,7 +2551,9 @@ _mm256_unpacklo_ps(__m256 __a, __m256 __b)...@@ -2380,7 +2551,9 @@ _mm256_unpacklo_ps(__m256 __a, __m256 __b)
2380/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an2551/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an
2381/// element-by-element comparison of the double-precision element in the2552/// element-by-element comparison of the double-precision element in the
2382/// first source vector and the corresponding element in the second source2553/// first source vector and the corresponding element in the second source
2383/// vector. The EFLAGS register is updated as follows: \n2554/// vector.
2555///
2556/// The EFLAGS register is updated as follows: \n
2384/// If there is at least one pair of double-precision elements where the2557/// If there is at least one pair of double-precision elements where the
2385/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2558/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2386/// ZF flag is set to 1. \n2559/// ZF flag is set to 1. \n
...@@ -2407,7 +2580,9 @@ _mm_testz_pd(__m128d __a, __m128d __b)...@@ -2407,7 +2580,9 @@ _mm_testz_pd(__m128d __a, __m128d __b)
2407/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an2580/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an
2408/// element-by-element comparison of the double-precision element in the2581/// element-by-element comparison of the double-precision element in the
2409/// first source vector and the corresponding element in the second source2582/// first source vector and the corresponding element in the second source
2410/// vector. The EFLAGS register is updated as follows: \n2583/// vector.
2584///
2585/// The EFLAGS register is updated as follows: \n
2411/// If there is at least one pair of double-precision elements where the2586/// If there is at least one pair of double-precision elements where the
2412/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2587/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2413/// ZF flag is set to 1. \n2588/// ZF flag is set to 1. \n
...@@ -2434,7 +2609,9 @@ _mm_testc_pd(__m128d __a, __m128d __b)...@@ -2434,7 +2609,9 @@ _mm_testc_pd(__m128d __a, __m128d __b)
2434/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an2609/// \brief Given two 128-bit floating-point vectors of [2 x double], perform an
2435/// element-by-element comparison of the double-precision element in the2610/// element-by-element comparison of the double-precision element in the
2436/// first source vector and the corresponding element in the second source2611/// first source vector and the corresponding element in the second source
2437/// vector. The EFLAGS register is updated as follows: \n2612/// vector.
2613///
2614/// The EFLAGS register is updated as follows: \n
2438/// If there is at least one pair of double-precision elements where the2615/// If there is at least one pair of double-precision elements where the
2439/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2616/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2440/// ZF flag is set to 1. \n2617/// ZF flag is set to 1. \n
...@@ -2462,7 +2639,9 @@ _mm_testnzc_pd(__m128d __a, __m128d __b)...@@ -2462,7 +2639,9 @@ _mm_testnzc_pd(__m128d __a, __m128d __b)
2462/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an2639/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an
2463/// element-by-element comparison of the single-precision element in the2640/// element-by-element comparison of the single-precision element in the
2464/// first source vector and the corresponding element in the second source2641/// first source vector and the corresponding element in the second source
2465/// vector. The EFLAGS register is updated as follows: \n2642/// vector.
2643///
2644/// The EFLAGS register is updated as follows: \n
2466/// If there is at least one pair of single-precision elements where the2645/// If there is at least one pair of single-precision elements where the
2467/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2646/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2468/// ZF flag is set to 1. \n2647/// ZF flag is set to 1. \n
...@@ -2489,7 +2668,9 @@ _mm_testz_ps(__m128 __a, __m128 __b)...@@ -2489,7 +2668,9 @@ _mm_testz_ps(__m128 __a, __m128 __b)
2489/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an2668/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an
2490/// element-by-element comparison of the single-precision element in the2669/// element-by-element comparison of the single-precision element in the
2491/// first source vector and the corresponding element in the second source2670/// first source vector and the corresponding element in the second source
2492/// vector. The EFLAGS register is updated as follows: \n2671/// vector.
2672///
2673/// The EFLAGS register is updated as follows: \n
2493/// If there is at least one pair of single-precision elements where the2674/// If there is at least one pair of single-precision elements where the
2494/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2675/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2495/// ZF flag is set to 1. \n2676/// ZF flag is set to 1. \n
...@@ -2516,7 +2697,9 @@ _mm_testc_ps(__m128 __a, __m128 __b)...@@ -2516,7 +2697,9 @@ _mm_testc_ps(__m128 __a, __m128 __b)
2516/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an2697/// \brief Given two 128-bit floating-point vectors of [4 x float], perform an
2517/// element-by-element comparison of the single-precision element in the2698/// element-by-element comparison of the single-precision element in the
2518/// first source vector and the corresponding element in the second source2699/// first source vector and the corresponding element in the second source
2519/// vector. The EFLAGS register is updated as follows: \n2700/// vector.
2701///
2702/// The EFLAGS register is updated as follows: \n
2520/// If there is at least one pair of single-precision elements where the2703/// If there is at least one pair of single-precision elements where the
2521/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2704/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2522/// ZF flag is set to 1. \n2705/// ZF flag is set to 1. \n
...@@ -2544,7 +2727,9 @@ _mm_testnzc_ps(__m128 __a, __m128 __b)...@@ -2544,7 +2727,9 @@ _mm_testnzc_ps(__m128 __a, __m128 __b)
2544/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an2727/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an
2545/// element-by-element comparison of the double-precision elements in the2728/// element-by-element comparison of the double-precision elements in the
2546/// first source vector and the corresponding elements in the second source2729/// first source vector and the corresponding elements in the second source
2547/// vector. The EFLAGS register is updated as follows: \n2730/// vector.
2731///
2732/// The EFLAGS register is updated as follows: \n
2548/// If there is at least one pair of double-precision elements where the2733/// If there is at least one pair of double-precision elements where the
2549/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2734/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2550/// ZF flag is set to 1. \n2735/// ZF flag is set to 1. \n
...@@ -2571,7 +2756,9 @@ _mm256_testz_pd(__m256d __a, __m256d __b)...@@ -2571,7 +2756,9 @@ _mm256_testz_pd(__m256d __a, __m256d __b)
2571/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an2756/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an
2572/// element-by-element comparison of the double-precision elements in the2757/// element-by-element comparison of the double-precision elements in the
2573/// first source vector and the corresponding elements in the second source2758/// first source vector and the corresponding elements in the second source
2574/// vector. The EFLAGS register is updated as follows: \n2759/// vector.
2760///
2761/// The EFLAGS register is updated as follows: \n
2575/// If there is at least one pair of double-precision elements where the2762/// If there is at least one pair of double-precision elements where the
2576/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2763/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2577/// ZF flag is set to 1. \n2764/// ZF flag is set to 1. \n
...@@ -2598,7 +2785,9 @@ _mm256_testc_pd(__m256d __a, __m256d __b)...@@ -2598,7 +2785,9 @@ _mm256_testc_pd(__m256d __a, __m256d __b)
2598/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an2785/// \brief Given two 256-bit floating-point vectors of [4 x double], perform an
2599/// element-by-element comparison of the double-precision elements in the2786/// element-by-element comparison of the double-precision elements in the
2600/// first source vector and the corresponding elements in the second source2787/// first source vector and the corresponding elements in the second source
2601/// vector. The EFLAGS register is updated as follows: \n2788/// vector.
2789///
2790/// The EFLAGS register is updated as follows: \n
2602/// If there is at least one pair of double-precision elements where the2791/// If there is at least one pair of double-precision elements where the
2603/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2792/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2604/// ZF flag is set to 1. \n2793/// ZF flag is set to 1. \n
...@@ -2626,7 +2815,9 @@ _mm256_testnzc_pd(__m256d __a, __m256d __b)...@@ -2626,7 +2815,9 @@ _mm256_testnzc_pd(__m256d __a, __m256d __b)
2626/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an2815/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an
2627/// element-by-element comparison of the single-precision element in the2816/// element-by-element comparison of the single-precision element in the
2628/// first source vector and the corresponding element in the second source2817/// first source vector and the corresponding element in the second source
2629/// vector. The EFLAGS register is updated as follows: \n2818/// vector.
2819///
2820/// The EFLAGS register is updated as follows: \n
2630/// If there is at least one pair of single-precision elements where the2821/// If there is at least one pair of single-precision elements where the
2631/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2822/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2632/// ZF flag is set to 1. \n2823/// ZF flag is set to 1. \n
...@@ -2653,7 +2844,9 @@ _mm256_testz_ps(__m256 __a, __m256 __b)...@@ -2653,7 +2844,9 @@ _mm256_testz_ps(__m256 __a, __m256 __b)
2653/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an2844/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an
2654/// element-by-element comparison of the single-precision element in the2845/// element-by-element comparison of the single-precision element in the
2655/// first source vector and the corresponding element in the second source2846/// first source vector and the corresponding element in the second source
2656/// vector. The EFLAGS register is updated as follows: \n2847/// vector.
2848///
2849/// The EFLAGS register is updated as follows: \n
2657/// If there is at least one pair of single-precision elements where the2850/// If there is at least one pair of single-precision elements where the
2658/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2851/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2659/// ZF flag is set to 1. \n2852/// ZF flag is set to 1. \n
...@@ -2680,7 +2873,9 @@ _mm256_testc_ps(__m256 __a, __m256 __b)...@@ -2680,7 +2873,9 @@ _mm256_testc_ps(__m256 __a, __m256 __b)
2680/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an2873/// \brief Given two 256-bit floating-point vectors of [8 x float], perform an
2681/// element-by-element comparison of the single-precision elements in the2874/// element-by-element comparison of the single-precision elements in the
2682/// first source vector and the corresponding elements in the second source2875/// first source vector and the corresponding elements in the second source
2683/// vector. The EFLAGS register is updated as follows: \n2876/// vector.
2877///
2878/// The EFLAGS register is updated as follows: \n
2684/// If there is at least one pair of single-precision elements where the2879/// If there is at least one pair of single-precision elements where the
2685/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the2880/// sign-bits of both elements are 1, the ZF flag is set to 0. Otherwise the
2686/// ZF flag is set to 1. \n2881/// ZF flag is set to 1. \n
...@@ -2706,7 +2901,9 @@ _mm256_testnzc_ps(__m256 __a, __m256 __b)...@@ -2706,7 +2901,9 @@ _mm256_testnzc_ps(__m256 __a, __m256 __b)
2706}2901}
27072902
2708/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison2903/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison
2709/// of the two source vectors and update the EFLAGS register as follows: \n2904/// of the two source vectors.
2905///
2906/// The EFLAGS register is updated as follows: \n
2710/// If there is at least one pair of bits where both bits are 1, the ZF flag2907/// If there is at least one pair of bits where both bits are 1, the ZF flag
2711/// is set to 0. Otherwise the ZF flag is set to 1. \n2908/// is set to 0. Otherwise the ZF flag is set to 1. \n
2712/// If there is at least one pair of bits where the bit from the first source2909/// If there is at least one pair of bits where the bit from the first source
...@@ -2730,7 +2927,9 @@ _mm256_testz_si256(__m256i __a, __m256i __b)...@@ -2730,7 +2927,9 @@ _mm256_testz_si256(__m256i __a, __m256i __b)
2730}2927}
27312928
2732/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison2929/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison
2733/// of the two source vectors and update the EFLAGS register as follows: \n2930/// of the two source vectors.
2931///
2932/// The EFLAGS register is updated as follows: \n
2734/// If there is at least one pair of bits where both bits are 1, the ZF flag2933/// If there is at least one pair of bits where both bits are 1, the ZF flag
2735/// is set to 0. Otherwise the ZF flag is set to 1. \n2934/// is set to 0. Otherwise the ZF flag is set to 1. \n
2736/// If there is at least one pair of bits where the bit from the first source2935/// If there is at least one pair of bits where the bit from the first source
...@@ -2754,7 +2953,9 @@ _mm256_testc_si256(__m256i __a, __m256i __b)...@@ -2754,7 +2953,9 @@ _mm256_testc_si256(__m256i __a, __m256i __b)
2754}2953}
27552954
2756/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison2955/// \brief Given two 256-bit integer vectors, perform a bit-by-bit comparison
2757/// of the two source vectors and update the EFLAGS register as follows: \n2956/// of the two source vectors.
2957///
2958/// The EFLAGS register is updated as follows: \n
2758/// If there is at least one pair of bits where both bits are 1, the ZF flag2959/// If there is at least one pair of bits where both bits are 1, the ZF flag
2759/// is set to 0. Otherwise the ZF flag is set to 1. \n2960/// is set to 0. Otherwise the ZF flag is set to 1. \n
2760/// If there is at least one pair of bits where the bit from the first source2961/// If there is at least one pair of bits where the bit from the first source
...@@ -3389,7 +3590,8 @@ _mm_maskstore_ps(float *__p, __m128i __m, __m128 __a)...@@ -3389,7 +3590,8 @@ _mm_maskstore_ps(float *__p, __m128i __m, __m128 __a)
3389static __inline void __DEFAULT_FN_ATTRS3590static __inline void __DEFAULT_FN_ATTRS
3390_mm256_stream_si256(__m256i *__a, __m256i __b)3591_mm256_stream_si256(__m256i *__a, __m256i __b)
3391{3592{
3392 __builtin_nontemporal_store((__v4di)__b, (__v4di*)__a);3593 typedef __v4di __v4di_aligned __attribute__((aligned(32)));
3594 __builtin_nontemporal_store((__v4di_aligned)__b, (__v4di_aligned*)__a);
3393}3595}
33943596
3395/// \brief Moves double-precision values from a 256-bit vector of [4 x double]3597/// \brief Moves double-precision values from a 256-bit vector of [4 x double]
...@@ -3402,13 +3604,14 @@ _mm256_stream_si256(__m256i *__a, __m256i __b)...@@ -3402,13 +3604,14 @@ _mm256_stream_si256(__m256i *__a, __m256i __b)
3402///3604///
3403/// \param __a3605/// \param __a
3404/// A pointer to a 32-byte aligned memory location that will receive the3606/// A pointer to a 32-byte aligned memory location that will receive the
3405/// integer values.3607/// double-precision floating-point values.
3406/// \param __b3608/// \param __b
3407/// A 256-bit vector of [4 x double] containing the values to be moved.3609/// A 256-bit vector of [4 x double] containing the values to be moved.
3408static __inline void __DEFAULT_FN_ATTRS3610static __inline void __DEFAULT_FN_ATTRS
3409_mm256_stream_pd(double *__a, __m256d __b)3611_mm256_stream_pd(double *__a, __m256d __b)
3410{3612{
3411 __builtin_nontemporal_store((__v4df)__b, (__v4df*)__a);3613 typedef __v4df __v4df_aligned __attribute__((aligned(32)));
3614 __builtin_nontemporal_store((__v4df_aligned)__b, (__v4df_aligned*)__a);
3412}3615}
34133616
3414/// \brief Moves single-precision floating point values from a 256-bit vector3617/// \brief Moves single-precision floating point values from a 256-bit vector
...@@ -3428,7 +3631,8 @@ _mm256_stream_pd(double *__a, __m256d __b)...@@ -3428,7 +3631,8 @@ _mm256_stream_pd(double *__a, __m256d __b)
3428static __inline void __DEFAULT_FN_ATTRS3631static __inline void __DEFAULT_FN_ATTRS
3429_mm256_stream_ps(float *__p, __m256 __a)3632_mm256_stream_ps(float *__p, __m256 __a)
3430{3633{
3431 __builtin_nontemporal_store((__v8sf)__a, (__v8sf*)__p);3634 typedef __v8sf __v8sf_aligned __attribute__((aligned(32)));
3635 __builtin_nontemporal_store((__v8sf_aligned)__a, (__v8sf_aligned*)__p);
3432}3636}
34333637
3434/* Create vectors */3638/* Create vectors */
...@@ -4310,9 +4514,10 @@ _mm256_castsi256_si128(__m256i __a)...@@ -4310,9 +4514,10 @@ _mm256_castsi256_si128(__m256i __a)
4310}4514}
43114515
4312/// \brief Constructs a 256-bit floating-point vector of [4 x double] from a4516/// \brief Constructs a 256-bit floating-point vector of [4 x double] from a
4313/// 128-bit floating-point vector of [2 x double]. The lower 128 bits4517/// 128-bit floating-point vector of [2 x double].
4314/// contain the value of the source vector. The contents of the upper 1284518///
4315/// bits are undefined.4519/// The lower 128 bits contain the value of the source vector. The contents
4520/// of the upper 128 bits are undefined.
4316///4521///
4317/// \headerfile <x86intrin.h>4522/// \headerfile <x86intrin.h>
4318///4523///
...@@ -4330,9 +4535,10 @@ _mm256_castpd128_pd256(__m128d __a)...@@ -4330,9 +4535,10 @@ _mm256_castpd128_pd256(__m128d __a)
4330}4535}
43314536
4332/// \brief Constructs a 256-bit floating-point vector of [8 x float] from a4537/// \brief Constructs a 256-bit floating-point vector of [8 x float] from a
4333/// 128-bit floating-point vector of [4 x float]. The lower 128 bits contain4538/// 128-bit floating-point vector of [4 x float].
4334/// the value of the source vector. The contents of the upper 128 bits are4539///
4335/// undefined.4540/// The lower 128 bits contain the value of the source vector. The contents
4541/// of the upper 128 bits are undefined.
4336///4542///
4337/// \headerfile <x86intrin.h>4543/// \headerfile <x86intrin.h>
4338///4544///
...@@ -4350,6 +4556,7 @@ _mm256_castps128_ps256(__m128 __a)...@@ -4350,6 +4556,7 @@ _mm256_castps128_ps256(__m128 __a)
4350}4556}
43514557
4352/// \brief Constructs a 256-bit integer vector from a 128-bit integer vector.4558/// \brief Constructs a 256-bit integer vector from a 128-bit integer vector.
4559///
4353/// The lower 128 bits contain the value of the source vector. The contents4560/// The lower 128 bits contain the value of the source vector. The contents
4354/// of the upper 128 bits are undefined.4561/// of the upper 128 bits are undefined.
4355///4562///
...@@ -4367,6 +4574,61 @@ _mm256_castsi128_si256(__m128i __a)...@@ -4367,6 +4574,61 @@ _mm256_castsi128_si256(__m128i __a)
4367 return __builtin_shufflevector((__v2di)__a, (__v2di)__a, 0, 1, -1, -1);4574 return __builtin_shufflevector((__v2di)__a, (__v2di)__a, 0, 1, -1, -1);
4368}4575}
43694576
4577/// \brief Constructs a 256-bit floating-point vector of [4 x double] from a
4578/// 128-bit floating-point vector of [2 x double]. The lower 128 bits
4579/// contain the value of the source vector. The upper 128 bits are set
4580/// to zero.
4581///
4582/// \headerfile <x86intrin.h>
4583///
4584/// This intrinsic has no corresponding instruction.
4585///
4586/// \param __a
4587/// A 128-bit vector of [2 x double].
4588/// \returns A 256-bit floating-point vector of [4 x double]. The lower 128 bits
4589/// contain the value of the parameter. The upper 128 bits are set to zero.
4590static __inline __m256d __DEFAULT_FN_ATTRS
4591_mm256_zextpd128_pd256(__m128d __a)
4592{
4593 return __builtin_shufflevector((__v2df)__a, (__v2df)_mm_setzero_pd(), 0, 1, 2, 3);
4594}
4595
4596/// \brief Constructs a 256-bit floating-point vector of [8 x float] from a
4597/// 128-bit floating-point vector of [4 x float]. The lower 128 bits contain
4598/// the value of the source vector. The upper 128 bits are set to zero.
4599///
4600/// \headerfile <x86intrin.h>
4601///
4602/// This intrinsic has no corresponding instruction.
4603///
4604/// \param __a
4605/// A 128-bit vector of [4 x float].
4606/// \returns A 256-bit floating-point vector of [8 x float]. The lower 128 bits
4607/// contain the value of the parameter. The upper 128 bits are set to zero.
4608static __inline __m256 __DEFAULT_FN_ATTRS
4609_mm256_zextps128_ps256(__m128 __a)
4610{
4611 return __builtin_shufflevector((__v4sf)__a, (__v4sf)_mm_setzero_ps(), 0, 1, 2, 3, 4, 5, 6, 7);
4612}
4613
4614/// \brief Constructs a 256-bit integer vector from a 128-bit integer vector.
4615/// The lower 128 bits contain the value of the source vector. The upper
4616/// 128 bits are set to zero.
4617///
4618/// \headerfile <x86intrin.h>
4619///
4620/// This intrinsic has no corresponding instruction.
4621///
4622/// \param __a
4623/// A 128-bit integer vector.
4624/// \returns A 256-bit integer vector. The lower 128 bits contain the value of
4625/// the parameter. The upper 128 bits are set to zero.
4626static __inline __m256i __DEFAULT_FN_ATTRS
4627_mm256_zextsi128_si256(__m128i __a)
4628{
4629 return __builtin_shufflevector((__v2di)__a, (__v2di)_mm_setzero_si128(), 0, 1, 2, 3);
4630}
4631
4370/*4632/*
4371 Vector insert.4633 Vector insert.
4372 We use macros rather than inlines because we only want to accept4634 We use macros rather than inlines because we only want to accept
...@@ -4375,8 +4637,10 @@ _mm256_castsi128_si256(__m128i __a)...@@ -4375,8 +4637,10 @@ _mm256_castsi128_si256(__m128i __a)
4375/// \brief Constructs a new 256-bit vector of [8 x float] by first duplicating4637/// \brief Constructs a new 256-bit vector of [8 x float] by first duplicating
4376/// a 256-bit vector of [8 x float] given in the first parameter, and then4638/// a 256-bit vector of [8 x float] given in the first parameter, and then
4377/// replacing either the upper or the lower 128 bits with the contents of a4639/// replacing either the upper or the lower 128 bits with the contents of a
4378/// 128-bit vector of [4 x float] in the second parameter. The immediate4640/// 128-bit vector of [4 x float] in the second parameter.
4379/// integer parameter determines between the upper or the lower 128 bits.4641///
4642/// The immediate integer parameter determines between the upper or the lower
4643/// 128 bits.
4380///4644///
4381/// \headerfile <x86intrin.h>4645/// \headerfile <x86intrin.h>
4382///4646///
...@@ -4420,8 +4684,10 @@ _mm256_castsi128_si256(__m128i __a)...@@ -4420,8 +4684,10 @@ _mm256_castsi128_si256(__m128i __a)
4420/// \brief Constructs a new 256-bit vector of [4 x double] by first duplicating4684/// \brief Constructs a new 256-bit vector of [4 x double] by first duplicating
4421/// a 256-bit vector of [4 x double] given in the first parameter, and then4685/// a 256-bit vector of [4 x double] given in the first parameter, and then
4422/// replacing either the upper or the lower 128 bits with the contents of a4686/// replacing either the upper or the lower 128 bits with the contents of a
4423/// 128-bit vector of [2 x double] in the second parameter. The immediate4687/// 128-bit vector of [2 x double] in the second parameter.
4424/// integer parameter determines between the upper or the lower 128 bits.4688///
4689/// The immediate integer parameter determines between the upper or the lower
4690/// 128 bits.
4425///4691///
4426/// \headerfile <x86intrin.h>4692/// \headerfile <x86intrin.h>
4427///4693///
...@@ -4461,8 +4727,10 @@ _mm256_castsi128_si256(__m128i __a)...@@ -4461,8 +4727,10 @@ _mm256_castsi128_si256(__m128i __a)
4461/// \brief Constructs a new 256-bit integer vector by first duplicating a4727/// \brief Constructs a new 256-bit integer vector by first duplicating a
4462/// 256-bit integer vector given in the first parameter, and then replacing4728/// 256-bit integer vector given in the first parameter, and then replacing
4463/// either the upper or the lower 128 bits with the contents of a 128-bit4729/// either the upper or the lower 128 bits with the contents of a 128-bit
4464/// integer vector in the second parameter. The immediate integer parameter4730/// integer vector in the second parameter.
4465/// determines between the upper or the lower 128 bits.4731///
4732/// The immediate integer parameter determines between the upper or the lower
4733/// 128 bits.
4466///4734///
4467/// \headerfile <x86intrin.h>4735/// \headerfile <x86intrin.h>
4468///4736///
c_headers/bmiintrin.h+5-171
...@@ -28,107 +28,17 @@...@@ -28,107 +28,17 @@
28#ifndef __BMIINTRIN_H28#ifndef __BMIINTRIN_H
29#define __BMIINTRIN_H29#define __BMIINTRIN_H
3030
31/// \brief Counts the number of trailing zero bits in the operand.
32///
33/// \headerfile <x86intrin.h>
34///
35/// \code
36/// unsigned short _tzcnt_u16(unsigned short a);
37/// \endcode
38///
39/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
40///
41/// \param a
42/// An unsigned 16-bit integer whose trailing zeros are to be counted.
43/// \returns An unsigned 16-bit integer containing the number of trailing zero
44/// bits in the operand.
45#define _tzcnt_u16(a) (__tzcnt_u16((a)))31#define _tzcnt_u16(a) (__tzcnt_u16((a)))
4632
47/// \brief Performs a bitwise AND of the second operand with the one's
48/// complement of the first operand.
49///
50/// \headerfile <x86intrin.h>
51///
52/// \code
53/// unsigned int _andn_u32(unsigned int a, unsigned int b);
54/// \endcode
55///
56/// This intrinsic corresponds to the <c> ANDN </c> instruction.
57///
58/// \param a
59/// An unsigned integer containing one of the operands.
60/// \param b
61/// An unsigned integer containing one of the operands.
62/// \returns An unsigned integer containing the bitwise AND of the second
63/// operand with the one's complement of the first operand.
64#define _andn_u32(a, b) (__andn_u32((a), (b)))33#define _andn_u32(a, b) (__andn_u32((a), (b)))
6534
66/* _bextr_u32 != __bextr_u32 */35/* _bextr_u32 != __bextr_u32 */
67/// \brief Clears all bits in the source except for the least significant bit
68/// containing a value of 1 and returns the result.
69///
70/// \headerfile <x86intrin.h>
71///
72/// \code
73/// unsigned int _blsi_u32(unsigned int a);
74/// \endcode
75///
76/// This intrinsic corresponds to the <c> BLSI </c> instruction.
77///
78/// \param a
79/// An unsigned integer whose bits are to be cleared.
80/// \returns An unsigned integer containing the result of clearing the bits from
81/// the source operand.
82#define _blsi_u32(a) (__blsi_u32((a)))36#define _blsi_u32(a) (__blsi_u32((a)))
8337
84/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
85/// including the least siginificant bit that is set to 1 in the source
86/// operand and returns the result.
87///
88/// \headerfile <x86intrin.h>
89///
90/// \code
91/// unsigned int _blsmsk_u32(unsigned int a);
92/// \endcode
93///
94/// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
95///
96/// \param a
97/// An unsigned integer used to create the mask.
98/// \returns An unsigned integer containing the newly created mask.
99#define _blsmsk_u32(a) (__blsmsk_u32((a)))38#define _blsmsk_u32(a) (__blsmsk_u32((a)))
10039
101/// \brief Clears the least siginificant bit that is set to 1 in the source
102/// operand and returns the result.
103///
104/// \headerfile <x86intrin.h>
105///
106/// \code
107/// unsigned int _blsr_u32(unsigned int a);
108/// \endcode
109///
110/// This intrinsic corresponds to the <c> BLSR </c> instruction.
111///
112/// \param a
113/// An unsigned integer containing the operand to be cleared.
114/// \returns An unsigned integer containing the result of clearing the source
115/// operand.
116#define _blsr_u32(a) (__blsr_u32((a)))40#define _blsr_u32(a) (__blsr_u32((a)))
11741
118/// \brief Counts the number of trailing zero bits in the operand.
119///
120/// \headerfile <x86intrin.h>
121///
122/// \code
123/// unsigned int _tzcnt_u32(unsigned int a);
124/// \endcode
125///
126/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
127///
128/// \param a
129/// An unsigned 32-bit integer whose trailing zeros are to be counted.
130/// \returns An unsigned 32-bit integer containing the number of trailing zero
131/// bits in the operand.
132#define _tzcnt_u32(a) (__tzcnt_u32((a)))42#define _tzcnt_u32(a) (__tzcnt_u32((a)))
13343
134/* Define the default attributes for the functions in this file. */44/* Define the default attributes for the functions in this file. */
...@@ -238,7 +148,7 @@ __blsi_u32(unsigned int __X)...@@ -238,7 +148,7 @@ __blsi_u32(unsigned int __X)
238}148}
239149
240/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and150/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
241/// including the least siginificant bit that is set to 1 in the source151/// including the least significant bit that is set to 1 in the source
242/// operand and returns the result.152/// operand and returns the result.
243///153///
244/// \headerfile <x86intrin.h>154/// \headerfile <x86intrin.h>
...@@ -254,7 +164,7 @@ __blsmsk_u32(unsigned int __X)...@@ -254,7 +164,7 @@ __blsmsk_u32(unsigned int __X)
254 return __X ^ (__X - 1);164 return __X ^ (__X - 1);
255}165}
256166
257/// \brief Clears the least siginificant bit that is set to 1 in the source167/// \brief Clears the least significant bit that is set to 1 in the source
258/// operand and returns the result.168/// operand and returns the result.
259///169///
260/// \headerfile <x86intrin.h>170/// \headerfile <x86intrin.h>
...@@ -305,91 +215,15 @@ _mm_tzcnt_32(unsigned int __X)...@@ -305,91 +215,15 @@ _mm_tzcnt_32(unsigned int __X)
305215
306#ifdef __x86_64__216#ifdef __x86_64__
307217
308/// \brief Performs a bitwise AND of the second operand with the one's
309/// complement of the first operand.
310///
311/// \headerfile <x86intrin.h>
312///
313/// \code
314/// unsigned long long _andn_u64 (unsigned long long a, unsigned long long b);
315/// \endcode
316///
317/// This intrinsic corresponds to the <c> ANDN </c> instruction.
318///
319/// \param a
320/// An unsigned 64-bit integer containing one of the operands.
321/// \param b
322/// An unsigned 64-bit integer containing one of the operands.
323/// \returns An unsigned 64-bit integer containing the bitwise AND of the second
324/// operand with the one's complement of the first operand.
325#define _andn_u64(a, b) (__andn_u64((a), (b)))218#define _andn_u64(a, b) (__andn_u64((a), (b)))
326219
327/* _bextr_u64 != __bextr_u64 */220/* _bextr_u64 != __bextr_u64 */
328/// \brief Clears all bits in the source except for the least significant bit
329/// containing a value of 1 and returns the result.
330///
331/// \headerfile <x86intrin.h>
332///
333/// \code
334/// unsigned long long _blsi_u64(unsigned long long a);
335/// \endcode
336///
337/// This intrinsic corresponds to the <c> BLSI </c> instruction.
338///
339/// \param a
340/// An unsigned 64-bit integer whose bits are to be cleared.
341/// \returns An unsigned 64-bit integer containing the result of clearing the
342/// bits from the source operand.
343#define _blsi_u64(a) (__blsi_u64((a)))221#define _blsi_u64(a) (__blsi_u64((a)))
344222
345/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
346/// including the least siginificant bit that is set to 1 in the source
347/// operand and returns the result.
348///
349/// \headerfile <x86intrin.h>
350///
351/// \code
352/// unsigned long long _blsmsk_u64(unsigned long long a);
353/// \endcode
354///
355/// This intrinsic corresponds to the <c> BLSMSK </c> instruction.
356///
357/// \param a
358/// An unsigned 64-bit integer used to create the mask.
359/// \returns A unsigned 64-bit integer containing the newly created mask.
360#define _blsmsk_u64(a) (__blsmsk_u64((a)))223#define _blsmsk_u64(a) (__blsmsk_u64((a)))
361224
362/// \brief Clears the least siginificant bit that is set to 1 in the source
363/// operand and returns the result.
364///
365/// \headerfile <x86intrin.h>
366///
367/// \code
368/// unsigned long long _blsr_u64(unsigned long long a);
369/// \endcode
370///
371/// This intrinsic corresponds to the <c> BLSR </c> instruction.
372///
373/// \param a
374/// An unsigned 64-bit integer containing the operand to be cleared.
375/// \returns An unsigned 64-bit integer containing the result of clearing the
376/// source operand.
377#define _blsr_u64(a) (__blsr_u64((a)))225#define _blsr_u64(a) (__blsr_u64((a)))
378226
379/// \brief Counts the number of trailing zero bits in the operand.
380///
381/// \headerfile <x86intrin.h>
382///
383/// \code
384/// unsigned long long _tzcnt_u64(unsigned long long a);
385/// \endcode
386///
387/// This intrinsic corresponds to the <c> TZCNT </c> instruction.
388///
389/// \param a
390/// An unsigned 64-bit integer whose trailing zeros are to be counted.
391/// \returns An unsigned 64-bit integer containing the number of trailing zero
392/// bits in the operand.
393#define _tzcnt_u64(a) (__tzcnt_u64((a)))227#define _tzcnt_u64(a) (__tzcnt_u64((a)))
394228
395/// \brief Performs a bitwise AND of the second operand with the one's229/// \brief Performs a bitwise AND of the second operand with the one's
...@@ -475,7 +309,7 @@ __blsi_u64(unsigned long long __X)...@@ -475,7 +309,7 @@ __blsi_u64(unsigned long long __X)
475}309}
476310
477/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and311/// \brief Creates a mask whose bits are set to 1, using bit 0 up to and
478/// including the least siginificant bit that is set to 1 in the source312/// including the least significant bit that is set to 1 in the source
479/// operand and returns the result.313/// operand and returns the result.
480///314///
481/// \headerfile <x86intrin.h>315/// \headerfile <x86intrin.h>
...@@ -484,14 +318,14 @@ __blsi_u64(unsigned long long __X)...@@ -484,14 +318,14 @@ __blsi_u64(unsigned long long __X)
484///318///
485/// \param __X319/// \param __X
486/// An unsigned 64-bit integer used to create the mask.320/// An unsigned 64-bit integer used to create the mask.
487/// \returns A unsigned 64-bit integer containing the newly created mask.321/// \returns An unsigned 64-bit integer containing the newly created mask.
488static __inline__ unsigned long long __DEFAULT_FN_ATTRS322static __inline__ unsigned long long __DEFAULT_FN_ATTRS
489__blsmsk_u64(unsigned long long __X)323__blsmsk_u64(unsigned long long __X)
490{324{
491 return __X ^ (__X - 1);325 return __X ^ (__X - 1);
492}326}
493327
494/// \brief Clears the least siginificant bit that is set to 1 in the source328/// \brief Clears the least significant bit that is set to 1 in the source
495/// operand and returns the result.329/// operand and returns the result.
496///330///
497/// \headerfile <x86intrin.h>331/// \headerfile <x86intrin.h>
c_headers/clzerointrin.h created+50
...@@ -0,0 +1,50 @@
1/*===----------------------- clzerointrin.h - CLZERO ----------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23#ifndef __X86INTRIN_H
24#error "Never use <clzerointrin.h> directly; include <x86intrin.h> instead."
25#endif
26
27#ifndef _CLZEROINTRIN_H
28#define _CLZEROINTRIN_H
29
30/* Define the default attributes for the functions in this file. */
31#define __DEFAULT_FN_ATTRS \
32 __attribute__((__always_inline__, __nodebug__, __target__("clzero")))
33
34/// \brief Loads the cache line address and zero's out the cacheline
35///
36/// \headerfile <clzerointrin.h>
37///
38/// This intrinsic corresponds to the <c> CLZERO </c> instruction.
39///
40/// \param __line
41/// A pointer to a cacheline which needs to be zeroed out.
42static __inline__ void __DEFAULT_FN_ATTRS
43_mm_clzero (void * __line)
44{
45 __builtin_ia32_clzero ((void *)__line);
46}
47
48#undef __DEFAULT_FN_ATTRS
49
50#endif /* _CLZEROINTRIN_H */
c_headers/cpuid.h+98-20
...@@ -79,7 +79,7 @@...@@ -79,7 +79,7 @@
79#define signature_VORTEX_edx 0x3638786579#define signature_VORTEX_edx 0x36387865
80#define signature_VORTEX_ecx 0x436f532080#define signature_VORTEX_ecx 0x436f5320
8181
82/* Features in %ecx for level 1 */82/* Features in %ecx for leaf 1 */
83#define bit_SSE3 0x0000000183#define bit_SSE3 0x00000001
84#define bit_PCLMULQDQ 0x0000000284#define bit_PCLMULQDQ 0x00000002
85#define bit_PCLMUL bit_PCLMULQDQ /* for gcc compat */85#define bit_PCLMUL bit_PCLMULQDQ /* for gcc compat */
...@@ -114,7 +114,7 @@...@@ -114,7 +114,7 @@
114#define bit_F16C 0x20000000114#define bit_F16C 0x20000000
115#define bit_RDRND 0x40000000115#define bit_RDRND 0x40000000
116116
117/* Features in %edx for level 1 */117/* Features in %edx for leaf 1 */
118#define bit_FPU 0x00000001118#define bit_FPU 0x00000001
119#define bit_VME 0x00000002119#define bit_VME 0x00000002
120#define bit_DE 0x00000004120#define bit_DE 0x00000004
...@@ -147,44 +147,95 @@...@@ -147,44 +147,95 @@
147#define bit_TM 0x20000000147#define bit_TM 0x20000000
148#define bit_PBE 0x80000000148#define bit_PBE 0x80000000
149149
150/* Features in %ebx for level 7 sub-leaf 0 */150/* Features in %ebx for leaf 7 sub-leaf 0 */
151#define bit_FSGSBASE 0x00000001151#define bit_FSGSBASE 0x00000001
152#define bit_SGX 0x00000004
153#define bit_BMI 0x00000008
154#define bit_HLE 0x00000010
155#define bit_AVX2 0x00000020
152#define bit_SMEP 0x00000080156#define bit_SMEP 0x00000080
157#define bit_BMI2 0x00000100
153#define bit_ENH_MOVSB 0x00000200158#define bit_ENH_MOVSB 0x00000200
159#define bit_RTM 0x00000800
160#define bit_MPX 0x00004000
161#define bit_AVX512F 0x00010000
162#define bit_AVX512DQ 0x00020000
163#define bit_RDSEED 0x00040000
164#define bit_ADX 0x00080000
165#define bit_AVX512IFMA 0x00200000
166#define bit_CLFLUSHOPT 0x00800000
167#define bit_CLWB 0x01000000
168#define bit_AVX512PF 0x04000000
169#define bit_AVX51SER 0x08000000
170#define bit_AVX512CD 0x10000000
171#define bit_SHA 0x20000000
172#define bit_AVX512BW 0x40000000
173#define bit_AVX512VL 0x80000000
174
175/* Features in %ecx for leaf 7 sub-leaf 0 */
176#define bit_PREFTCHWT1 0x00000001
177#define bit_AVX512VBMI 0x00000002
178#define bit_PKU 0x00000004
179#define bit_OSPKE 0x00000010
180#define bit_AVX512VPOPCNTDQ 0x00004000
181#define bit_RDPID 0x00400000
182
183/* Features in %edx for leaf 7 sub-leaf 0 */
184#define bit_AVX5124VNNIW 0x00000004
185#define bit_AVX5124FMAPS 0x00000008
186
187/* Features in %eax for leaf 13 sub-leaf 1 */
188#define bit_XSAVEOPT 0x00000001
189#define bit_XSAVEC 0x00000002
190#define bit_XSAVES 0x00000008
191
192/* Features in %ecx for leaf 0x80000001 */
193#define bit_LAHF_LM 0x00000001
194#define bit_ABM 0x00000020
195#define bit_SSE4a 0x00000040
196#define bit_PRFCHW 0x00000100
197#define bit_XOP 0x00000800
198#define bit_LWP 0x00008000
199#define bit_FMA4 0x00010000
200#define bit_TBM 0x00200000
201#define bit_MWAITX 0x20000000
202
203/* Features in %edx for leaf 0x80000001 */
204#define bit_MMXEXT 0x00400000
205#define bit_LM 0x20000000
206#define bit_3DNOWP 0x40000000
207#define bit_3DNOW 0x80000000
208
209/* Features in %ebx for leaf 0x80000001 */
210#define bit_CLZERO 0x00000001
211
154212
155#if __i386__213#if __i386__
156#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \214#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
157 __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \215 __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
158 : "0"(__level))216 : "0"(__leaf))
159217
160#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \218#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
161 __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \219 __asm("cpuid" : "=a"(__eax), "=b" (__ebx), "=c"(__ecx), "=d"(__edx) \
162 : "0"(__level), "2"(__count))220 : "0"(__leaf), "2"(__count))
163#else221#else
164/* x86-64 uses %rbx as the base register, so preserve it. */222/* x86-64 uses %rbx as the base register, so preserve it. */
165#define __cpuid(__level, __eax, __ebx, __ecx, __edx) \223#define __cpuid(__leaf, __eax, __ebx, __ecx, __edx) \
166 __asm(" xchgq %%rbx,%q1\n" \224 __asm(" xchgq %%rbx,%q1\n" \
167 " cpuid\n" \225 " cpuid\n" \
168 " xchgq %%rbx,%q1" \226 " xchgq %%rbx,%q1" \
169 : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \227 : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
170 : "0"(__level))228 : "0"(__leaf))
171229
172#define __cpuid_count(__level, __count, __eax, __ebx, __ecx, __edx) \230#define __cpuid_count(__leaf, __count, __eax, __ebx, __ecx, __edx) \
173 __asm(" xchgq %%rbx,%q1\n" \231 __asm(" xchgq %%rbx,%q1\n" \
174 " cpuid\n" \232 " cpuid\n" \
175 " xchgq %%rbx,%q1" \233 " xchgq %%rbx,%q1" \
176 : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \234 : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
177 : "0"(__level), "2"(__count))235 : "0"(__leaf), "2"(__count))
178#endif236#endif
179237
180static __inline int __get_cpuid (unsigned int __level, unsigned int *__eax,238static __inline int __get_cpuid_max (unsigned int __leaf, unsigned int *__sig)
181 unsigned int *__ebx, unsigned int *__ecx,
182 unsigned int *__edx) {
183 __cpuid(__level, *__eax, *__ebx, *__ecx, *__edx);
184 return 1;
185}
186
187static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig)
188{239{
189 unsigned int __eax, __ebx, __ecx, __edx;240 unsigned int __eax, __ebx, __ecx, __edx;
190#if __i386__241#if __i386__
...@@ -208,8 +259,35 @@ static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig)...@@ -208,8 +259,35 @@ static __inline int __get_cpuid_max (unsigned int __level, unsigned int *__sig)
208 return 0;259 return 0;
209#endif260#endif
210261
211 __cpuid(__level, __eax, __ebx, __ecx, __edx);262 __cpuid(__leaf, __eax, __ebx, __ecx, __edx);
212 if (__sig)263 if (__sig)
213 *__sig = __ebx;264 *__sig = __ebx;
214 return __eax;265 return __eax;
215}266}
267
268static __inline int __get_cpuid (unsigned int __leaf, unsigned int *__eax,
269 unsigned int *__ebx, unsigned int *__ecx,
270 unsigned int *__edx)
271{
272 unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
273
274 if (__max_leaf == 0 || __max_leaf < __leaf)
275 return 0;
276
277 __cpuid(__leaf, *__eax, *__ebx, *__ecx, *__edx);
278 return 1;
279}
280
281static __inline int __get_cpuid_count (unsigned int __leaf,
282 unsigned int __subleaf,
283 unsigned int *__eax, unsigned int *__ebx,
284 unsigned int *__ecx, unsigned int *__edx)
285{
286 unsigned int __max_leaf = __get_cpuid_max(__leaf & 0x80000000, 0);
287
288 if (__max_leaf == 0 || __max_leaf < __leaf)
289 return 0;
290
291 __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
292 return 1;
293}
c_headers/emmintrin.h+251-114
...@@ -302,7 +302,7 @@ _mm_min_pd(__m128d __a, __m128d __b)...@@ -302,7 +302,7 @@ _mm_min_pd(__m128d __a, __m128d __b)
302 return __builtin_ia32_minpd((__v2df)__a, (__v2df)__b);302 return __builtin_ia32_minpd((__v2df)__a, (__v2df)__b);
303}303}
304304
305/// \brief Compares lower 64-bits double-precision values of both operands, and305/// \brief Compares lower 64-bit double-precision values of both operands, and
306/// returns the greater of the pair of values in the lower 64-bits of the306/// returns the greater of the pair of values in the lower 64-bits of the
307/// result. The upper 64 bits of the result are copied from the upper double-307/// result. The upper 64 bits of the result are copied from the upper double-
308/// precision value of the first operand.308/// precision value of the first operand.
...@@ -462,8 +462,9 @@ _mm_cmplt_pd(__m128d __a, __m128d __b)...@@ -462,8 +462,9 @@ _mm_cmplt_pd(__m128d __a, __m128d __b)
462462
463/// \brief Compares each of the corresponding double-precision values of the463/// \brief Compares each of the corresponding double-precision values of the
464/// 128-bit vectors of [2 x double] to determine if the values in the first464/// 128-bit vectors of [2 x double] to determine if the values in the first
465/// operand are less than or equal to those in the second operand. Each465/// operand are less than or equal to those in the second operand.
466/// comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.466///
467/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
467///468///
468/// \headerfile <x86intrin.h>469/// \headerfile <x86intrin.h>
469///470///
...@@ -482,8 +483,9 @@ _mm_cmple_pd(__m128d __a, __m128d __b)...@@ -482,8 +483,9 @@ _mm_cmple_pd(__m128d __a, __m128d __b)
482483
483/// \brief Compares each of the corresponding double-precision values of the484/// \brief Compares each of the corresponding double-precision values of the
484/// 128-bit vectors of [2 x double] to determine if the values in the first485/// 128-bit vectors of [2 x double] to determine if the values in the first
485/// operand are greater than those in the second operand. Each comparison486/// operand are greater than those in the second operand.
486/// yields 0h for false, FFFFFFFFFFFFFFFFh for true.487///
488/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
487///489///
488/// \headerfile <x86intrin.h>490/// \headerfile <x86intrin.h>
489///491///
...@@ -502,8 +504,9 @@ _mm_cmpgt_pd(__m128d __a, __m128d __b)...@@ -502,8 +504,9 @@ _mm_cmpgt_pd(__m128d __a, __m128d __b)
502504
503/// \brief Compares each of the corresponding double-precision values of the505/// \brief Compares each of the corresponding double-precision values of the
504/// 128-bit vectors of [2 x double] to determine if the values in the first506/// 128-bit vectors of [2 x double] to determine if the values in the first
505/// operand are greater than or equal to those in the second operand. Each507/// operand are greater than or equal to those in the second operand.
506/// comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.508///
509/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
507///510///
508/// \headerfile <x86intrin.h>511/// \headerfile <x86intrin.h>
509///512///
...@@ -522,9 +525,10 @@ _mm_cmpge_pd(__m128d __a, __m128d __b)...@@ -522,9 +525,10 @@ _mm_cmpge_pd(__m128d __a, __m128d __b)
522525
523/// \brief Compares each of the corresponding double-precision values of the526/// \brief Compares each of the corresponding double-precision values of the
524/// 128-bit vectors of [2 x double] to determine if the values in the first527/// 128-bit vectors of [2 x double] to determine if the values in the first
525/// operand are ordered with respect to those in the second operand. A pair528/// operand are ordered with respect to those in the second operand.
526/// of double-precision values are "ordered" with respect to each other if529///
527/// neither value is a NaN. Each comparison yields 0h for false,530/// A pair of double-precision values are "ordered" with respect to each
531/// other if neither value is a NaN. Each comparison yields 0h for false,
528/// FFFFFFFFFFFFFFFFh for true.532/// FFFFFFFFFFFFFFFFh for true.
529///533///
530/// \headerfile <x86intrin.h>534/// \headerfile <x86intrin.h>
...@@ -544,9 +548,10 @@ _mm_cmpord_pd(__m128d __a, __m128d __b)...@@ -544,9 +548,10 @@ _mm_cmpord_pd(__m128d __a, __m128d __b)
544548
545/// \brief Compares each of the corresponding double-precision values of the549/// \brief Compares each of the corresponding double-precision values of the
546/// 128-bit vectors of [2 x double] to determine if the values in the first550/// 128-bit vectors of [2 x double] to determine if the values in the first
547/// operand are unordered with respect to those in the second operand. A pair551/// operand are unordered with respect to those in the second operand.
548/// of double-precision values are "unordered" with respect to each other if552///
549/// one or both values are NaN. Each comparison yields 0h for false,553/// A pair of double-precision values are "unordered" with respect to each
554/// other if one or both values are NaN. Each comparison yields 0h for false,
550/// FFFFFFFFFFFFFFFFh for true.555/// FFFFFFFFFFFFFFFFh for true.
551///556///
552/// \headerfile <x86intrin.h>557/// \headerfile <x86intrin.h>
...@@ -567,8 +572,9 @@ _mm_cmpunord_pd(__m128d __a, __m128d __b)...@@ -567,8 +572,9 @@ _mm_cmpunord_pd(__m128d __a, __m128d __b)
567572
568/// \brief Compares each of the corresponding double-precision values of the573/// \brief Compares each of the corresponding double-precision values of the
569/// 128-bit vectors of [2 x double] to determine if the values in the first574/// 128-bit vectors of [2 x double] to determine if the values in the first
570/// operand are unequal to those in the second operand. Each comparison575/// operand are unequal to those in the second operand.
571/// yields 0h for false, FFFFFFFFFFFFFFFFh for true.576///
577/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
572///578///
573/// \headerfile <x86intrin.h>579/// \headerfile <x86intrin.h>
574///580///
...@@ -587,8 +593,9 @@ _mm_cmpneq_pd(__m128d __a, __m128d __b)...@@ -587,8 +593,9 @@ _mm_cmpneq_pd(__m128d __a, __m128d __b)
587593
588/// \brief Compares each of the corresponding double-precision values of the594/// \brief Compares each of the corresponding double-precision values of the
589/// 128-bit vectors of [2 x double] to determine if the values in the first595/// 128-bit vectors of [2 x double] to determine if the values in the first
590/// operand are not less than those in the second operand. Each comparison596/// operand are not less than those in the second operand.
591/// yields 0h for false, FFFFFFFFFFFFFFFFh for true.597///
598/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
592///599///
593/// \headerfile <x86intrin.h>600/// \headerfile <x86intrin.h>
594///601///
...@@ -607,8 +614,9 @@ _mm_cmpnlt_pd(__m128d __a, __m128d __b)...@@ -607,8 +614,9 @@ _mm_cmpnlt_pd(__m128d __a, __m128d __b)
607614
608/// \brief Compares each of the corresponding double-precision values of the615/// \brief Compares each of the corresponding double-precision values of the
609/// 128-bit vectors of [2 x double] to determine if the values in the first616/// 128-bit vectors of [2 x double] to determine if the values in the first
610/// operand are not less than or equal to those in the second operand. Each617/// operand are not less than or equal to those in the second operand.
611/// comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.618///
619/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
612///620///
613/// \headerfile <x86intrin.h>621/// \headerfile <x86intrin.h>
614///622///
...@@ -627,8 +635,9 @@ _mm_cmpnle_pd(__m128d __a, __m128d __b)...@@ -627,8 +635,9 @@ _mm_cmpnle_pd(__m128d __a, __m128d __b)
627635
628/// \brief Compares each of the corresponding double-precision values of the636/// \brief Compares each of the corresponding double-precision values of the
629/// 128-bit vectors of [2 x double] to determine if the values in the first637/// 128-bit vectors of [2 x double] to determine if the values in the first
630/// operand are not greater than those in the second operand. Each638/// operand are not greater than those in the second operand.
631/// comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.639///
640/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
632///641///
633/// \headerfile <x86intrin.h>642/// \headerfile <x86intrin.h>
634///643///
...@@ -648,6 +657,7 @@ _mm_cmpngt_pd(__m128d __a, __m128d __b)...@@ -648,6 +657,7 @@ _mm_cmpngt_pd(__m128d __a, __m128d __b)
648/// \brief Compares each of the corresponding double-precision values of the657/// \brief Compares each of the corresponding double-precision values of the
649/// 128-bit vectors of [2 x double] to determine if the values in the first658/// 128-bit vectors of [2 x double] to determine if the values in the first
650/// operand are not greater than or equal to those in the second operand.659/// operand are not greater than or equal to those in the second operand.
660///
651/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.661/// Each comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
652///662///
653/// \headerfile <x86intrin.h>663/// \headerfile <x86intrin.h>
...@@ -666,8 +676,9 @@ _mm_cmpnge_pd(__m128d __a, __m128d __b)...@@ -666,8 +676,9 @@ _mm_cmpnge_pd(__m128d __a, __m128d __b)
666}676}
667677
668/// \brief Compares the lower double-precision floating-point values in each of678/// \brief Compares the lower double-precision floating-point values in each of
669/// the two 128-bit floating-point vectors of [2 x double] for equality. The679/// the two 128-bit floating-point vectors of [2 x double] for equality.
670/// comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.680///
681/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
671///682///
672/// \headerfile <x86intrin.h>683/// \headerfile <x86intrin.h>
673///684///
...@@ -690,8 +701,9 @@ _mm_cmpeq_sd(__m128d __a, __m128d __b)...@@ -690,8 +701,9 @@ _mm_cmpeq_sd(__m128d __a, __m128d __b)
690/// \brief Compares the lower double-precision floating-point values in each of701/// \brief Compares the lower double-precision floating-point values in each of
691/// the two 128-bit floating-point vectors of [2 x double] to determine if702/// the two 128-bit floating-point vectors of [2 x double] to determine if
692/// the value in the first parameter is less than the corresponding value in703/// the value in the first parameter is less than the corresponding value in
693/// the second parameter. The comparison yields 0h for false,704/// the second parameter.
694/// FFFFFFFFFFFFFFFFh for true.705///
706/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
695///707///
696/// \headerfile <x86intrin.h>708/// \headerfile <x86intrin.h>
697///709///
...@@ -714,8 +726,9 @@ _mm_cmplt_sd(__m128d __a, __m128d __b)...@@ -714,8 +726,9 @@ _mm_cmplt_sd(__m128d __a, __m128d __b)
714/// \brief Compares the lower double-precision floating-point values in each of726/// \brief Compares the lower double-precision floating-point values in each of
715/// the two 128-bit floating-point vectors of [2 x double] to determine if727/// the two 128-bit floating-point vectors of [2 x double] to determine if
716/// the value in the first parameter is less than or equal to the728/// the value in the first parameter is less than or equal to the
717/// corresponding value in the second parameter. The comparison yields 0h for729/// corresponding value in the second parameter.
718/// false, FFFFFFFFFFFFFFFFh for true.730///
731/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
719///732///
720/// \headerfile <x86intrin.h>733/// \headerfile <x86intrin.h>
721///734///
...@@ -738,8 +751,9 @@ _mm_cmple_sd(__m128d __a, __m128d __b)...@@ -738,8 +751,9 @@ _mm_cmple_sd(__m128d __a, __m128d __b)
738/// \brief Compares the lower double-precision floating-point values in each of751/// \brief Compares the lower double-precision floating-point values in each of
739/// the two 128-bit floating-point vectors of [2 x double] to determine if752/// the two 128-bit floating-point vectors of [2 x double] to determine if
740/// the value in the first parameter is greater than the corresponding value753/// the value in the first parameter is greater than the corresponding value
741/// in the second parameter. The comparison yields 0h for false,754/// in the second parameter.
742/// FFFFFFFFFFFFFFFFh for true.755///
756/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
743///757///
744/// \headerfile <x86intrin.h>758/// \headerfile <x86intrin.h>
745///759///
...@@ -763,8 +777,9 @@ _mm_cmpgt_sd(__m128d __a, __m128d __b)...@@ -763,8 +777,9 @@ _mm_cmpgt_sd(__m128d __a, __m128d __b)
763/// \brief Compares the lower double-precision floating-point values in each of777/// \brief Compares the lower double-precision floating-point values in each of
764/// the two 128-bit floating-point vectors of [2 x double] to determine if778/// the two 128-bit floating-point vectors of [2 x double] to determine if
765/// the value in the first parameter is greater than or equal to the779/// the value in the first parameter is greater than or equal to the
766/// corresponding value in the second parameter. The comparison yields 0h for780/// corresponding value in the second parameter.
767/// false, FFFFFFFFFFFFFFFFh for true.781///
782/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
768///783///
769/// \headerfile <x86intrin.h>784/// \headerfile <x86intrin.h>
770///785///
...@@ -788,9 +803,11 @@ _mm_cmpge_sd(__m128d __a, __m128d __b)...@@ -788,9 +803,11 @@ _mm_cmpge_sd(__m128d __a, __m128d __b)
788/// \brief Compares the lower double-precision floating-point values in each of803/// \brief Compares the lower double-precision floating-point values in each of
789/// the two 128-bit floating-point vectors of [2 x double] to determine if804/// the two 128-bit floating-point vectors of [2 x double] to determine if
790/// the value in the first parameter is "ordered" with respect to the805/// the value in the first parameter is "ordered" with respect to the
791/// corresponding value in the second parameter. The comparison yields 0h for806/// corresponding value in the second parameter.
792/// false, FFFFFFFFFFFFFFFFh for true. A pair of double-precision values are807///
793/// "ordered" with respect to each other if neither value is a NaN.808/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true. A pair of
809/// double-precision values are "ordered" with respect to each other if
810/// neither value is a NaN.
794///811///
795/// \headerfile <x86intrin.h>812/// \headerfile <x86intrin.h>
796///813///
...@@ -813,9 +830,11 @@ _mm_cmpord_sd(__m128d __a, __m128d __b)...@@ -813,9 +830,11 @@ _mm_cmpord_sd(__m128d __a, __m128d __b)
813/// \brief Compares the lower double-precision floating-point values in each of830/// \brief Compares the lower double-precision floating-point values in each of
814/// the two 128-bit floating-point vectors of [2 x double] to determine if831/// the two 128-bit floating-point vectors of [2 x double] to determine if
815/// the value in the first parameter is "unordered" with respect to the832/// the value in the first parameter is "unordered" with respect to the
816/// corresponding value in the second parameter. The comparison yields 0h833/// corresponding value in the second parameter.
817/// for false, FFFFFFFFFFFFFFFFh for true. A pair of double-precision values834///
818/// are "unordered" with respect to each other if one or both values are NaN.835/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true. A pair of
836/// double-precision values are "unordered" with respect to each other if one
837/// or both values are NaN.
819///838///
820/// \headerfile <x86intrin.h>839/// \headerfile <x86intrin.h>
821///840///
...@@ -839,8 +858,9 @@ _mm_cmpunord_sd(__m128d __a, __m128d __b)...@@ -839,8 +858,9 @@ _mm_cmpunord_sd(__m128d __a, __m128d __b)
839/// \brief Compares the lower double-precision floating-point values in each of858/// \brief Compares the lower double-precision floating-point values in each of
840/// the two 128-bit floating-point vectors of [2 x double] to determine if859/// the two 128-bit floating-point vectors of [2 x double] to determine if
841/// the value in the first parameter is unequal to the corresponding value in860/// the value in the first parameter is unequal to the corresponding value in
842/// the second parameter. The comparison yields 0h for false,861/// the second parameter.
843/// FFFFFFFFFFFFFFFFh for true.862///
863/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
844///864///
845/// \headerfile <x86intrin.h>865/// \headerfile <x86intrin.h>
846///866///
...@@ -863,8 +883,9 @@ _mm_cmpneq_sd(__m128d __a, __m128d __b)...@@ -863,8 +883,9 @@ _mm_cmpneq_sd(__m128d __a, __m128d __b)
863/// \brief Compares the lower double-precision floating-point values in each of883/// \brief Compares the lower double-precision floating-point values in each of
864/// the two 128-bit floating-point vectors of [2 x double] to determine if884/// the two 128-bit floating-point vectors of [2 x double] to determine if
865/// the value in the first parameter is not less than the corresponding885/// the value in the first parameter is not less than the corresponding
866/// value in the second parameter. The comparison yields 0h for false,886/// value in the second parameter.
867/// FFFFFFFFFFFFFFFFh for true.887///
888/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
868///889///
869/// \headerfile <x86intrin.h>890/// \headerfile <x86intrin.h>
870///891///
...@@ -887,8 +908,9 @@ _mm_cmpnlt_sd(__m128d __a, __m128d __b)...@@ -887,8 +908,9 @@ _mm_cmpnlt_sd(__m128d __a, __m128d __b)
887/// \brief Compares the lower double-precision floating-point values in each of908/// \brief Compares the lower double-precision floating-point values in each of
888/// the two 128-bit floating-point vectors of [2 x double] to determine if909/// the two 128-bit floating-point vectors of [2 x double] to determine if
889/// the value in the first parameter is not less than or equal to the910/// the value in the first parameter is not less than or equal to the
890/// corresponding value in the second parameter. The comparison yields 0h911/// corresponding value in the second parameter.
891/// for false, FFFFFFFFFFFFFFFFh for true.912///
913/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
892///914///
893/// \headerfile <x86intrin.h>915/// \headerfile <x86intrin.h>
894///916///
...@@ -911,8 +933,9 @@ _mm_cmpnle_sd(__m128d __a, __m128d __b)...@@ -911,8 +933,9 @@ _mm_cmpnle_sd(__m128d __a, __m128d __b)
911/// \brief Compares the lower double-precision floating-point values in each of933/// \brief Compares the lower double-precision floating-point values in each of
912/// the two 128-bit floating-point vectors of [2 x double] to determine if934/// the two 128-bit floating-point vectors of [2 x double] to determine if
913/// the value in the first parameter is not greater than the corresponding935/// the value in the first parameter is not greater than the corresponding
914/// value in the second parameter. The comparison yields 0h for false,936/// value in the second parameter.
915/// FFFFFFFFFFFFFFFFh for true.937///
938/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
916///939///
917/// \headerfile <x86intrin.h>940/// \headerfile <x86intrin.h>
918///941///
...@@ -936,8 +959,9 @@ _mm_cmpngt_sd(__m128d __a, __m128d __b)...@@ -936,8 +959,9 @@ _mm_cmpngt_sd(__m128d __a, __m128d __b)
936/// \brief Compares the lower double-precision floating-point values in each of959/// \brief Compares the lower double-precision floating-point values in each of
937/// the two 128-bit floating-point vectors of [2 x double] to determine if960/// the two 128-bit floating-point vectors of [2 x double] to determine if
938/// the value in the first parameter is not greater than or equal to the961/// the value in the first parameter is not greater than or equal to the
939/// corresponding value in the second parameter. The comparison yields 0h962/// corresponding value in the second parameter.
940/// for false, FFFFFFFFFFFFFFFFh for true.963///
964/// The comparison yields 0h for false, FFFFFFFFFFFFFFFFh for true.
941///965///
942/// \headerfile <x86intrin.h>966/// \headerfile <x86intrin.h>
943///967///
...@@ -982,7 +1006,9 @@ _mm_comieq_sd(__m128d __a, __m128d __b)...@@ -982,7 +1006,9 @@ _mm_comieq_sd(__m128d __a, __m128d __b)
982/// \brief Compares the lower double-precision floating-point values in each of1006/// \brief Compares the lower double-precision floating-point values in each of
983/// the two 128-bit floating-point vectors of [2 x double] to determine if1007/// the two 128-bit floating-point vectors of [2 x double] to determine if
984/// the value in the first parameter is less than the corresponding value in1008/// the value in the first parameter is less than the corresponding value in
985/// the second parameter. The comparison yields 0 for false, 1 for true.1009/// the second parameter.
1010///
1011/// The comparison yields 0 for false, 1 for true.
986///1012///
987/// \headerfile <x86intrin.h>1013/// \headerfile <x86intrin.h>
988///1014///
...@@ -1004,8 +1030,9 @@ _mm_comilt_sd(__m128d __a, __m128d __b)...@@ -1004,8 +1030,9 @@ _mm_comilt_sd(__m128d __a, __m128d __b)
1004/// \brief Compares the lower double-precision floating-point values in each of1030/// \brief Compares the lower double-precision floating-point values in each of
1005/// the two 128-bit floating-point vectors of [2 x double] to determine if1031/// the two 128-bit floating-point vectors of [2 x double] to determine if
1006/// the value in the first parameter is less than or equal to the1032/// the value in the first parameter is less than or equal to the
1007/// corresponding value in the second parameter. The comparison yields 0 for1033/// corresponding value in the second parameter.
1008/// false, 1 for true.1034///
1035/// The comparison yields 0 for false, 1 for true.
1009///1036///
1010/// \headerfile <x86intrin.h>1037/// \headerfile <x86intrin.h>
1011///1038///
...@@ -1027,7 +1054,9 @@ _mm_comile_sd(__m128d __a, __m128d __b)...@@ -1027,7 +1054,9 @@ _mm_comile_sd(__m128d __a, __m128d __b)
1027/// \brief Compares the lower double-precision floating-point values in each of1054/// \brief Compares the lower double-precision floating-point values in each of
1028/// the two 128-bit floating-point vectors of [2 x double] to determine if1055/// the two 128-bit floating-point vectors of [2 x double] to determine if
1029/// the value in the first parameter is greater than the corresponding value1056/// the value in the first parameter is greater than the corresponding value
1030/// in the second parameter. The comparison yields 0 for false, 1 for true.1057/// in the second parameter.
1058///
1059/// The comparison yields 0 for false, 1 for true.
1031///1060///
1032/// \headerfile <x86intrin.h>1061/// \headerfile <x86intrin.h>
1033///1062///
...@@ -1049,8 +1078,9 @@ _mm_comigt_sd(__m128d __a, __m128d __b)...@@ -1049,8 +1078,9 @@ _mm_comigt_sd(__m128d __a, __m128d __b)
1049/// \brief Compares the lower double-precision floating-point values in each of1078/// \brief Compares the lower double-precision floating-point values in each of
1050/// the two 128-bit floating-point vectors of [2 x double] to determine if1079/// the two 128-bit floating-point vectors of [2 x double] to determine if
1051/// the value in the first parameter is greater than or equal to the1080/// the value in the first parameter is greater than or equal to the
1052/// corresponding value in the second parameter. The comparison yields 0 for1081/// corresponding value in the second parameter.
1053/// false, 1 for true.1082///
1083/// The comparison yields 0 for false, 1 for true.
1054///1084///
1055/// \headerfile <x86intrin.h>1085/// \headerfile <x86intrin.h>
1056///1086///
...@@ -1072,7 +1102,9 @@ _mm_comige_sd(__m128d __a, __m128d __b)...@@ -1072,7 +1102,9 @@ _mm_comige_sd(__m128d __a, __m128d __b)
1072/// \brief Compares the lower double-precision floating-point values in each of1102/// \brief Compares the lower double-precision floating-point values in each of
1073/// the two 128-bit floating-point vectors of [2 x double] to determine if1103/// the two 128-bit floating-point vectors of [2 x double] to determine if
1074/// the value in the first parameter is unequal to the corresponding value in1104/// the value in the first parameter is unequal to the corresponding value in
1075/// the second parameter. The comparison yields 0 for false, 1 for true.1105/// the second parameter.
1106///
1107/// The comparison yields 0 for false, 1 for true.
1076///1108///
1077/// \headerfile <x86intrin.h>1109/// \headerfile <x86intrin.h>
1078///1110///
...@@ -1093,8 +1125,9 @@ _mm_comineq_sd(__m128d __a, __m128d __b)...@@ -1093,8 +1125,9 @@ _mm_comineq_sd(__m128d __a, __m128d __b)
10931125
1094/// \brief Compares the lower double-precision floating-point values in each of1126/// \brief Compares the lower double-precision floating-point values in each of
1095/// the two 128-bit floating-point vectors of [2 x double] for equality. The1127/// the two 128-bit floating-point vectors of [2 x double] for equality. The
1096/// comparison yields 0 for false, 1 for true. If either of the two lower1128/// comparison yields 0 for false, 1 for true.
1097/// double-precision values is NaN, 1 is returned.1129///
1130/// If either of the two lower double-precision values is NaN, 1 is returned.
1098///1131///
1099/// \headerfile <x86intrin.h>1132/// \headerfile <x86intrin.h>
1100///1133///
...@@ -1117,8 +1150,10 @@ _mm_ucomieq_sd(__m128d __a, __m128d __b)...@@ -1117,8 +1150,10 @@ _mm_ucomieq_sd(__m128d __a, __m128d __b)
1117/// \brief Compares the lower double-precision floating-point values in each of1150/// \brief Compares the lower double-precision floating-point values in each of
1118/// the two 128-bit floating-point vectors of [2 x double] to determine if1151/// the two 128-bit floating-point vectors of [2 x double] to determine if
1119/// the value in the first parameter is less than the corresponding value in1152/// the value in the first parameter is less than the corresponding value in
1120/// the second parameter. The comparison yields 0 for false, 1 for true. If1153/// the second parameter.
1121/// either of the two lower double-precision values is NaN, 1 is returned.1154///
1155/// The comparison yields 0 for false, 1 for true. If either of the two lower
1156/// double-precision values is NaN, 1 is returned.
1122///1157///
1123/// \headerfile <x86intrin.h>1158/// \headerfile <x86intrin.h>
1124///1159///
...@@ -1141,9 +1176,10 @@ _mm_ucomilt_sd(__m128d __a, __m128d __b)...@@ -1141,9 +1176,10 @@ _mm_ucomilt_sd(__m128d __a, __m128d __b)
1141/// \brief Compares the lower double-precision floating-point values in each of1176/// \brief Compares the lower double-precision floating-point values in each of
1142/// the two 128-bit floating-point vectors of [2 x double] to determine if1177/// the two 128-bit floating-point vectors of [2 x double] to determine if
1143/// the value in the first parameter is less than or equal to the1178/// the value in the first parameter is less than or equal to the
1144/// corresponding value in the second parameter. The comparison yields 0 for1179/// corresponding value in the second parameter.
1145/// false, 1 for true. If either of the two lower double-precision values is1180///
1146/// NaN, 1 is returned.1181/// The comparison yields 0 for false, 1 for true. If either of the two lower
1182/// double-precision values is NaN, 1 is returned.
1147///1183///
1148/// \headerfile <x86intrin.h>1184/// \headerfile <x86intrin.h>
1149///1185///
...@@ -1166,8 +1202,10 @@ _mm_ucomile_sd(__m128d __a, __m128d __b)...@@ -1166,8 +1202,10 @@ _mm_ucomile_sd(__m128d __a, __m128d __b)
1166/// \brief Compares the lower double-precision floating-point values in each of1202/// \brief Compares the lower double-precision floating-point values in each of
1167/// the two 128-bit floating-point vectors of [2 x double] to determine if1203/// the two 128-bit floating-point vectors of [2 x double] to determine if
1168/// the value in the first parameter is greater than the corresponding value1204/// the value in the first parameter is greater than the corresponding value
1169/// in the second parameter. The comparison yields 0 for false, 1 for true.1205/// in the second parameter.
1170/// If either of the two lower double-precision values is NaN, 0 is returned.1206///
1207/// The comparison yields 0 for false, 1 for true. If either of the two lower
1208/// double-precision values is NaN, 0 is returned.
1171///1209///
1172/// \headerfile <x86intrin.h>1210/// \headerfile <x86intrin.h>
1173///1211///
...@@ -1190,9 +1228,10 @@ _mm_ucomigt_sd(__m128d __a, __m128d __b)...@@ -1190,9 +1228,10 @@ _mm_ucomigt_sd(__m128d __a, __m128d __b)
1190/// \brief Compares the lower double-precision floating-point values in each of1228/// \brief Compares the lower double-precision floating-point values in each of
1191/// the two 128-bit floating-point vectors of [2 x double] to determine if1229/// the two 128-bit floating-point vectors of [2 x double] to determine if
1192/// the value in the first parameter is greater than or equal to the1230/// the value in the first parameter is greater than or equal to the
1193/// corresponding value in the second parameter. The comparison yields 0 for1231/// corresponding value in the second parameter.
1194/// false, 1 for true. If either of the two lower double-precision values1232///
1195/// is NaN, 0 is returned.1233/// The comparison yields 0 for false, 1 for true. If either of the two
1234/// lower double-precision values is NaN, 0 is returned.
1196///1235///
1197/// \headerfile <x86intrin.h>1236/// \headerfile <x86intrin.h>
1198///1237///
...@@ -1215,8 +1254,10 @@ _mm_ucomige_sd(__m128d __a, __m128d __b)...@@ -1215,8 +1254,10 @@ _mm_ucomige_sd(__m128d __a, __m128d __b)
1215/// \brief Compares the lower double-precision floating-point values in each of1254/// \brief Compares the lower double-precision floating-point values in each of
1216/// the two 128-bit floating-point vectors of [2 x double] to determine if1255/// the two 128-bit floating-point vectors of [2 x double] to determine if
1217/// the value in the first parameter is unequal to the corresponding value in1256/// the value in the first parameter is unequal to the corresponding value in
1218/// the second parameter. The comparison yields 0 for false, 1 for true. If1257/// the second parameter.
1219/// either of the two lower double-precision values is NaN, 0 is returned.1258///
1259/// The comparison yields 0 for false, 1 for true. If either of the two lower
1260/// double-precision values is NaN, 0 is returned.
1220///1261///
1221/// \headerfile <x86intrin.h>1262/// \headerfile <x86intrin.h>
1222///1263///
...@@ -1278,8 +1319,9 @@ _mm_cvtps_pd(__m128 __a)...@@ -1278,8 +1319,9 @@ _mm_cvtps_pd(__m128 __a)
12781319
1279/// \brief Converts the lower two integer elements of a 128-bit vector of1320/// \brief Converts the lower two integer elements of a 128-bit vector of
1280/// [4 x i32] into two double-precision floating-point values, returned in a1321/// [4 x i32] into two double-precision floating-point values, returned in a
1281/// 128-bit vector of [2 x double]. The upper two elements of the input1322/// 128-bit vector of [2 x double].
1282/// vector are unused.1323///
1324/// The upper two elements of the input vector are unused.
1283///1325///
1284/// \headerfile <x86intrin.h>1326/// \headerfile <x86intrin.h>
1285///1327///
...@@ -1287,7 +1329,9 @@ _mm_cvtps_pd(__m128 __a)...@@ -1287,7 +1329,9 @@ _mm_cvtps_pd(__m128 __a)
1287///1329///
1288/// \param __a1330/// \param __a
1289/// A 128-bit integer vector of [4 x i32]. The lower two integer elements are1331/// A 128-bit integer vector of [4 x i32]. The lower two integer elements are
1290/// converted to double-precision values. The upper two elements are unused.1332/// converted to double-precision values.
1333///
1334/// The upper two elements are unused.
1291/// \returns A 128-bit vector of [2 x double] containing the converted values.1335/// \returns A 128-bit vector of [2 x double] containing the converted values.
1292static __inline__ __m128d __DEFAULT_FN_ATTRS1336static __inline__ __m128d __DEFAULT_FN_ATTRS
1293_mm_cvtepi32_pd(__m128i __a)1337_mm_cvtepi32_pd(__m128i __a)
...@@ -1409,10 +1453,11 @@ _mm_cvtss_sd(__m128d __a, __m128 __b)...@@ -1409,10 +1453,11 @@ _mm_cvtss_sd(__m128d __a, __m128 __b)
14091453
1410/// \brief Converts the two double-precision floating-point elements of a1454/// \brief Converts the two double-precision floating-point elements of a
1411/// 128-bit vector of [2 x double] into two signed 32-bit integer values,1455/// 128-bit vector of [2 x double] into two signed 32-bit integer values,
1412/// returned in the lower 64 bits of a 128-bit vector of [4 x i32]. If the1456/// returned in the lower 64 bits of a 128-bit vector of [4 x i32].
1413/// result of either conversion is inexact, the result is truncated (rounded1457///
1414/// towards zero) regardless of the current MXCSR setting. The upper 64 bits1458/// If the result of either conversion is inexact, the result is truncated
1415/// of the result vector are set to zero.1459/// (rounded towards zero) regardless of the current MXCSR setting. The upper
1460/// 64 bits of the result vector are set to zero.
1416///1461///
1417/// \headerfile <x86intrin.h>1462/// \headerfile <x86intrin.h>
1418///1463///
...@@ -1466,9 +1511,10 @@ _mm_cvtpd_pi32(__m128d __a)...@@ -1466,9 +1511,10 @@ _mm_cvtpd_pi32(__m128d __a)
14661511
1467/// \brief Converts the two double-precision floating-point elements of a1512/// \brief Converts the two double-precision floating-point elements of a
1468/// 128-bit vector of [2 x double] into two signed 32-bit integer values,1513/// 128-bit vector of [2 x double] into two signed 32-bit integer values,
1469/// returned in a 64-bit vector of [2 x i32]. If the result of either1514/// returned in a 64-bit vector of [2 x i32].
1470/// conversion is inexact, the result is truncated (rounded towards zero)1515///
1471/// regardless of the current MXCSR setting.1516/// If the result of either conversion is inexact, the result is truncated
1517/// (rounded towards zero) regardless of the current MXCSR setting.
1472///1518///
1473/// \headerfile <x86intrin.h>1519/// \headerfile <x86intrin.h>
1474///1520///
...@@ -1599,6 +1645,17 @@ _mm_loadu_pd(double const *__dp)...@@ -1599,6 +1645,17 @@ _mm_loadu_pd(double const *__dp)
1599 return ((struct __loadu_pd*)__dp)->__v;1645 return ((struct __loadu_pd*)__dp)->__v;
1600}1646}
16011647
1648/// \brief Loads a 64-bit integer value to the low element of a 128-bit integer
1649/// vector and clears the upper element.
1650///
1651/// \headerfile <x86intrin.h>
1652///
1653/// This intrinsic corresponds to the <c> VMOVQ / MOVQ </c> instruction.
1654///
1655/// \param __a
1656/// A pointer to a 64-bit memory location. The address of the memory
1657/// location does not have to be aligned.
1658/// \returns A 128-bit vector of [2 x i64] containing the loaded value.
1602static __inline__ __m128i __DEFAULT_FN_ATTRS1659static __inline__ __m128i __DEFAULT_FN_ATTRS
1603_mm_loadu_si64(void const *__a)1660_mm_loadu_si64(void const *__a)
1604{1661{
...@@ -1609,6 +1666,17 @@ _mm_loadu_si64(void const *__a)...@@ -1609,6 +1666,17 @@ _mm_loadu_si64(void const *__a)
1609 return (__m128i){__u, 0L};1666 return (__m128i){__u, 0L};
1610}1667}
16111668
1669/// \brief Loads a 64-bit double-precision value to the low element of a
1670/// 128-bit integer vector and clears the upper element.
1671///
1672/// \headerfile <x86intrin.h>
1673///
1674/// This intrinsic corresponds to the <c> VMOVSD / MOVSD </c> instruction.
1675///
1676/// \param __dp
1677/// A pointer to a memory location containing a double-precision value.
1678/// The address of the memory location does not have to be aligned.
1679/// \returns A 128-bit vector of [2 x double] containing the loaded value.
1612static __inline__ __m128d __DEFAULT_FN_ATTRS1680static __inline__ __m128d __DEFAULT_FN_ATTRS
1613_mm_load_sd(double const *__dp)1681_mm_load_sd(double const *__dp)
1614{1682{
...@@ -1728,6 +1796,24 @@ _mm_set1_pd(double __w)...@@ -1728,6 +1796,24 @@ _mm_set1_pd(double __w)
1728 return (__m128d){ __w, __w };1796 return (__m128d){ __w, __w };
1729}1797}
17301798
1799/// \brief Constructs a 128-bit floating-point vector of [2 x double], with each
1800/// of the two double-precision floating-point vector elements set to the
1801/// specified double-precision floating-point value.
1802///
1803/// \headerfile <x86intrin.h>
1804///
1805/// This intrinsic corresponds to the <c> VMOVDDUP / MOVLHPS </c> instruction.
1806///
1807/// \param __w
1808/// A double-precision floating-point value used to initialize each vector
1809/// element of the result.
1810/// \returns An initialized 128-bit floating-point vector of [2 x double].
1811static __inline__ __m128d __DEFAULT_FN_ATTRS
1812_mm_set_pd1(double __w)
1813{
1814 return _mm_set1_pd(__w);
1815}
1816
1731/// \brief Constructs a 128-bit floating-point vector of [2 x double]1817/// \brief Constructs a 128-bit floating-point vector of [2 x double]
1732/// initialized with the specified double-precision floating-point values.1818/// initialized with the specified double-precision floating-point values.
1733///1819///
...@@ -1787,7 +1873,7 @@ _mm_setzero_pd(void)...@@ -1787,7 +1873,7 @@ _mm_setzero_pd(void)
1787/// \brief Constructs a 128-bit floating-point vector of [2 x double]. The lower1873/// \brief Constructs a 128-bit floating-point vector of [2 x double]. The lower
1788/// 64 bits are set to the lower 64 bits of the second parameter. The upper1874/// 64 bits are set to the lower 64 bits of the second parameter. The upper
1789/// 64 bits are set to the upper 64 bits of the first parameter.1875/// 64 bits are set to the upper 64 bits of the first parameter.
1790//1876///
1791/// \headerfile <x86intrin.h>1877/// \headerfile <x86intrin.h>
1792///1878///
1793/// This intrinsic corresponds to the <c> VBLENDPD / BLENDPD </c> instruction.1879/// This intrinsic corresponds to the <c> VBLENDPD / BLENDPD </c> instruction.
...@@ -1825,12 +1911,38 @@ _mm_store_sd(double *__dp, __m128d __a)...@@ -1825,12 +1911,38 @@ _mm_store_sd(double *__dp, __m128d __a)
1825 ((struct __mm_store_sd_struct*)__dp)->__u = __a[0];1911 ((struct __mm_store_sd_struct*)__dp)->__u = __a[0];
1826}1912}
18271913
1914/// \brief Moves packed double-precision values from a 128-bit vector of
1915/// [2 x double] to a memory location.
1916///
1917/// \headerfile <x86intrin.h>
1918///
1919/// This intrinsic corresponds to the <c>VMOVAPD / MOVAPS</c> instruction.
1920///
1921/// \param __dp
1922/// A pointer to an aligned memory location that can store two
1923/// double-precision values.
1924/// \param __a
1925/// A packed 128-bit vector of [2 x double] containing the values to be
1926/// moved.
1828static __inline__ void __DEFAULT_FN_ATTRS1927static __inline__ void __DEFAULT_FN_ATTRS
1829_mm_store_pd(double *__dp, __m128d __a)1928_mm_store_pd(double *__dp, __m128d __a)
1830{1929{
1831 *(__m128d*)__dp = __a;1930 *(__m128d*)__dp = __a;
1832}1931}
18331932
1933/// \brief Moves the lower 64 bits of a 128-bit vector of [2 x double] twice to
1934/// the upper and lower 64 bits of a memory location.
1935///
1936/// \headerfile <x86intrin.h>
1937///
1938/// This intrinsic corresponds to the <c>VMOVDDUP + VMOVAPD / MOVLHPS + MOVAPS </c> instruction.
1939///
1940/// \param __dp
1941/// A pointer to a memory location that can store two double-precision
1942/// values.
1943/// \param __a
1944/// A 128-bit vector of [2 x double] whose lower 64 bits are copied to each
1945/// of the values in \a dp.
1834static __inline__ void __DEFAULT_FN_ATTRS1946static __inline__ void __DEFAULT_FN_ATTRS
1835_mm_store1_pd(double *__dp, __m128d __a)1947_mm_store1_pd(double *__dp, __m128d __a)
1836{1948{
...@@ -1940,8 +2052,9 @@ _mm_storel_pd(double *__dp, __m128d __a)...@@ -1940,8 +2052,9 @@ _mm_storel_pd(double *__dp, __m128d __a)
19402052
1941/// \brief Adds the corresponding elements of two 128-bit vectors of [16 x i8],2053/// \brief Adds the corresponding elements of two 128-bit vectors of [16 x i8],
1942/// saving the lower 8 bits of each sum in the corresponding element of a2054/// saving the lower 8 bits of each sum in the corresponding element of a
1943/// 128-bit result vector of [16 x i8]. The integer elements of both2055/// 128-bit result vector of [16 x i8].
1944/// parameters can be either signed or unsigned.2056///
2057/// The integer elements of both parameters can be either signed or unsigned.
1945///2058///
1946/// \headerfile <x86intrin.h>2059/// \headerfile <x86intrin.h>
1947///2060///
...@@ -1961,8 +2074,9 @@ _mm_add_epi8(__m128i __a, __m128i __b)...@@ -1961,8 +2074,9 @@ _mm_add_epi8(__m128i __a, __m128i __b)
19612074
1962/// \brief Adds the corresponding elements of two 128-bit vectors of [8 x i16],2075/// \brief Adds the corresponding elements of two 128-bit vectors of [8 x i16],
1963/// saving the lower 16 bits of each sum in the corresponding element of a2076/// saving the lower 16 bits of each sum in the corresponding element of a
1964/// 128-bit result vector of [8 x i16]. The integer elements of both2077/// 128-bit result vector of [8 x i16].
1965/// parameters can be either signed or unsigned.2078///
2079/// The integer elements of both parameters can be either signed or unsigned.
1966///2080///
1967/// \headerfile <x86intrin.h>2081/// \headerfile <x86intrin.h>
1968///2082///
...@@ -1982,8 +2096,9 @@ _mm_add_epi16(__m128i __a, __m128i __b)...@@ -1982,8 +2096,9 @@ _mm_add_epi16(__m128i __a, __m128i __b)
19822096
1983/// \brief Adds the corresponding elements of two 128-bit vectors of [4 x i32],2097/// \brief Adds the corresponding elements of two 128-bit vectors of [4 x i32],
1984/// saving the lower 32 bits of each sum in the corresponding element of a2098/// saving the lower 32 bits of each sum in the corresponding element of a
1985/// 128-bit result vector of [4 x i32]. The integer elements of both2099/// 128-bit result vector of [4 x i32].
1986/// parameters can be either signed or unsigned.2100///
2101/// The integer elements of both parameters can be either signed or unsigned.
1987///2102///
1988/// \headerfile <x86intrin.h>2103/// \headerfile <x86intrin.h>
1989///2104///
...@@ -2021,8 +2136,9 @@ _mm_add_si64(__m64 __a, __m64 __b)...@@ -2021,8 +2136,9 @@ _mm_add_si64(__m64 __a, __m64 __b)
20212136
2022/// \brief Adds the corresponding elements of two 128-bit vectors of [2 x i64],2137/// \brief Adds the corresponding elements of two 128-bit vectors of [2 x i64],
2023/// saving the lower 64 bits of each sum in the corresponding element of a2138/// saving the lower 64 bits of each sum in the corresponding element of a
2024/// 128-bit result vector of [2 x i64]. The integer elements of both2139/// 128-bit result vector of [2 x i64].
2025/// parameters can be either signed or unsigned.2140///
2141/// The integer elements of both parameters can be either signed or unsigned.
2026///2142///
2027/// \headerfile <x86intrin.h>2143/// \headerfile <x86intrin.h>
2028///2144///
...@@ -2168,10 +2284,12 @@ _mm_avg_epu16(__m128i __a, __m128i __b)...@@ -2168,10 +2284,12 @@ _mm_avg_epu16(__m128i __a, __m128i __b)
2168/// \brief Multiplies the corresponding elements of two 128-bit signed [8 x i16]2284/// \brief Multiplies the corresponding elements of two 128-bit signed [8 x i16]
2169/// vectors, producing eight intermediate 32-bit signed integer products, and2285/// vectors, producing eight intermediate 32-bit signed integer products, and
2170/// adds the consecutive pairs of 32-bit products to form a 128-bit signed2286/// adds the consecutive pairs of 32-bit products to form a 128-bit signed
2171/// [4 x i32] vector. For example, bits [15:0] of both parameters are2287/// [4 x i32] vector.
2172/// multiplied producing a 32-bit product, bits [31:16] of both parameters2288///
2173/// are multiplied producing a 32-bit product, and the sum of those two2289/// For example, bits [15:0] of both parameters are multiplied producing a
2174/// products becomes bits [31:0] of the result.2290/// 32-bit product, bits [31:16] of both parameters are multiplied producing
2291/// a 32-bit product, and the sum of those two products becomes bits [31:0]
2292/// of the result.
2175///2293///
2176/// \headerfile <x86intrin.h>2294/// \headerfile <x86intrin.h>
2177///2295///
...@@ -2369,7 +2487,7 @@ _mm_mul_epu32(__m128i __a, __m128i __b)...@@ -2369,7 +2487,7 @@ _mm_mul_epu32(__m128i __a, __m128i __b)
23692487
2370/// \brief Computes the absolute differences of corresponding 8-bit integer2488/// \brief Computes the absolute differences of corresponding 8-bit integer
2371/// values in two 128-bit vectors. Sums the first 8 absolute differences, and2489/// values in two 128-bit vectors. Sums the first 8 absolute differences, and
2372/// separately sums the second 8 absolute differences. Packss these two2490/// separately sums the second 8 absolute differences. Packs these two
2373/// unsigned 16-bit integer sums into the upper and lower elements of a2491/// unsigned 16-bit integer sums into the upper and lower elements of a
2374/// [2 x i64] vector.2492/// [2 x i64] vector.
2375///2493///
...@@ -3106,8 +3224,9 @@ _mm_cmpgt_epi8(__m128i __a, __m128i __b)...@@ -3106,8 +3224,9 @@ _mm_cmpgt_epi8(__m128i __a, __m128i __b)
31063224
3107/// \brief Compares each of the corresponding signed 16-bit values of the3225/// \brief Compares each of the corresponding signed 16-bit values of the
3108/// 128-bit integer vectors to determine if the values in the first operand3226/// 128-bit integer vectors to determine if the values in the first operand
3109/// are greater than those in the second operand. Each comparison yields 0h3227/// are greater than those in the second operand.
3110/// for false, FFFFh for true.3228///
3229/// Each comparison yields 0h for false, FFFFh for true.
3111///3230///
3112/// \headerfile <x86intrin.h>3231/// \headerfile <x86intrin.h>
3113///3232///
...@@ -3126,8 +3245,9 @@ _mm_cmpgt_epi16(__m128i __a, __m128i __b)...@@ -3126,8 +3245,9 @@ _mm_cmpgt_epi16(__m128i __a, __m128i __b)
31263245
3127/// \brief Compares each of the corresponding signed 32-bit values of the3246/// \brief Compares each of the corresponding signed 32-bit values of the
3128/// 128-bit integer vectors to determine if the values in the first operand3247/// 128-bit integer vectors to determine if the values in the first operand
3129/// are greater than those in the second operand. Each comparison yields 0h3248/// are greater than those in the second operand.
3130/// for false, FFFFFFFFh for true.3249///
3250/// Each comparison yields 0h for false, FFFFFFFFh for true.
3131///3251///
3132/// \headerfile <x86intrin.h>3252/// \headerfile <x86intrin.h>
3133///3253///
...@@ -3146,8 +3266,9 @@ _mm_cmpgt_epi32(__m128i __a, __m128i __b)...@@ -3146,8 +3266,9 @@ _mm_cmpgt_epi32(__m128i __a, __m128i __b)
31463266
3147/// \brief Compares each of the corresponding signed 8-bit values of the 128-bit3267/// \brief Compares each of the corresponding signed 8-bit values of the 128-bit
3148/// integer vectors to determine if the values in the first operand are less3268/// integer vectors to determine if the values in the first operand are less
3149/// than those in the second operand. Each comparison yields 0h for false,3269/// than those in the second operand.
3150/// FFh for true.3270///
3271/// Each comparison yields 0h for false, FFh for true.
3151///3272///
3152/// \headerfile <x86intrin.h>3273/// \headerfile <x86intrin.h>
3153///3274///
...@@ -3166,8 +3287,9 @@ _mm_cmplt_epi8(__m128i __a, __m128i __b)...@@ -3166,8 +3287,9 @@ _mm_cmplt_epi8(__m128i __a, __m128i __b)
31663287
3167/// \brief Compares each of the corresponding signed 16-bit values of the3288/// \brief Compares each of the corresponding signed 16-bit values of the
3168/// 128-bit integer vectors to determine if the values in the first operand3289/// 128-bit integer vectors to determine if the values in the first operand
3169/// are less than those in the second operand. Each comparison yields 0h for3290/// are less than those in the second operand.
3170/// false, FFFFh for true.3291///
3292/// Each comparison yields 0h for false, FFFFh for true.
3171///3293///
3172/// \headerfile <x86intrin.h>3294/// \headerfile <x86intrin.h>
3173///3295///
...@@ -3186,8 +3308,9 @@ _mm_cmplt_epi16(__m128i __a, __m128i __b)...@@ -3186,8 +3308,9 @@ _mm_cmplt_epi16(__m128i __a, __m128i __b)
31863308
3187/// \brief Compares each of the corresponding signed 32-bit values of the3309/// \brief Compares each of the corresponding signed 32-bit values of the
3188/// 128-bit integer vectors to determine if the values in the first operand3310/// 128-bit integer vectors to determine if the values in the first operand
3189/// are less than those in the second operand. Each comparison yields 0h for3311/// are less than those in the second operand.
3190/// false, FFFFFFFFh for true.3312///
3313/// Each comparison yields 0h for false, FFFFFFFFh for true.
3191///3314///
3192/// \headerfile <x86intrin.h>3315/// \headerfile <x86intrin.h>
3193///3316///
...@@ -3885,10 +4008,11 @@ _mm_storeu_si128(__m128i *__p, __m128i __b)...@@ -3885,10 +4008,11 @@ _mm_storeu_si128(__m128i *__p, __m128i __b)
38854008
3886/// \brief Moves bytes selected by the mask from the first operand to the4009/// \brief Moves bytes selected by the mask from the first operand to the
3887/// specified unaligned memory location. When a mask bit is 1, the4010/// specified unaligned memory location. When a mask bit is 1, the
3888/// corresponding byte is written, otherwise it is not written. To minimize4011/// corresponding byte is written, otherwise it is not written.
3889/// caching, the date is flagged as non-temporal (unlikely to be used again4012///
3890/// soon). Exception and trap behavior for elements not selected for storage4013/// To minimize caching, the date is flagged as non-temporal (unlikely to be
3891/// to memory are implementation dependent.4014/// used again soon). Exception and trap behavior for elements not selected
4015/// for storage to memory are implementation dependent.
3892///4016///
3893/// \headerfile <x86intrin.h>4017/// \headerfile <x86intrin.h>
3894///4018///
...@@ -3932,8 +4056,10 @@ _mm_storel_epi64(__m128i *__p, __m128i __a)...@@ -3932,8 +4056,10 @@ _mm_storel_epi64(__m128i *__p, __m128i __a)
3932}4056}
39334057
3934/// \brief Stores a 128-bit floating point vector of [2 x double] to a 128-bit4058/// \brief Stores a 128-bit floating point vector of [2 x double] to a 128-bit
3935/// aligned memory location. To minimize caching, the data is flagged as4059/// aligned memory location.
3936/// non-temporal (unlikely to be used again soon).4060///
4061/// To minimize caching, the data is flagged as non-temporal (unlikely to be
4062/// used again soon).
3937///4063///
3938/// \headerfile <x86intrin.h>4064/// \headerfile <x86intrin.h>
3939///4065///
...@@ -3950,6 +4076,7 @@ _mm_stream_pd(double *__p, __m128d __a)...@@ -3950,6 +4076,7 @@ _mm_stream_pd(double *__p, __m128d __a)
3950}4076}
39514077
3952/// \brief Stores a 128-bit integer vector to a 128-bit aligned memory location.4078/// \brief Stores a 128-bit integer vector to a 128-bit aligned memory location.
4079///
3953/// To minimize caching, the data is flagged as non-temporal (unlikely to be4080/// To minimize caching, the data is flagged as non-temporal (unlikely to be
3954/// used again soon).4081/// used again soon).
3955///4082///
...@@ -3967,8 +4094,9 @@ _mm_stream_si128(__m128i *__p, __m128i __a)...@@ -3967,8 +4094,9 @@ _mm_stream_si128(__m128i *__p, __m128i __a)
3967 __builtin_nontemporal_store((__v2di)__a, (__v2di*)__p);4094 __builtin_nontemporal_store((__v2di)__a, (__v2di*)__p);
3968}4095}
39694096
3970/// \brief Stores a 32-bit integer value in the specified memory location. To4097/// \brief Stores a 32-bit integer value in the specified memory location.
3971/// minimize caching, the data is flagged as non-temporal (unlikely to be4098///
4099/// To minimize caching, the data is flagged as non-temporal (unlikely to be
3972/// used again soon).4100/// used again soon).
3973///4101///
3974/// \headerfile <x86intrin.h>4102/// \headerfile <x86intrin.h>
...@@ -3986,8 +4114,9 @@ _mm_stream_si32(int *__p, int __a)...@@ -3986,8 +4114,9 @@ _mm_stream_si32(int *__p, int __a)
3986}4114}
39874115
3988#ifdef __x86_64__4116#ifdef __x86_64__
3989/// \brief Stores a 64-bit integer value in the specified memory location. To4117/// \brief Stores a 64-bit integer value in the specified memory location.
3990/// minimize caching, the data is flagged as non-temporal (unlikely to be4118///
4119/// To minimize caching, the data is flagged as non-temporal (unlikely to be
3991/// used again soon).4120/// used again soon).
3992///4121///
3993/// \headerfile <x86intrin.h>4122/// \headerfile <x86intrin.h>
...@@ -4019,7 +4148,7 @@ extern "C" {...@@ -4019,7 +4148,7 @@ extern "C" {
4019/// \param __p4148/// \param __p
4020/// A pointer to the memory location used to identify the cache line to be4149/// A pointer to the memory location used to identify the cache line to be
4021/// flushed.4150/// flushed.
4022void _mm_clflush(void const *);4151void _mm_clflush(void const * __p);
40234152
4024/// \brief Forces strong memory ordering (serialization) between load4153/// \brief Forces strong memory ordering (serialization) between load
4025/// instructions preceding this instruction and load instructions following4154/// instructions preceding this instruction and load instructions following
...@@ -4141,7 +4270,7 @@ _mm_packus_epi16(__m128i __a, __m128i __b)...@@ -4141,7 +4270,7 @@ _mm_packus_epi16(__m128i __a, __m128i __b)
4141/// \param __a4270/// \param __a
4142/// A 128-bit integer vector.4271/// A 128-bit integer vector.
4143/// \param __imm4272/// \param __imm
4144/// An immediate value. Bits [3:0] selects values from \a __a to be assigned4273/// An immediate value. Bits [2:0] selects values from \a __a to be assigned
4145/// to bits[15:0] of the result. \n4274/// to bits[15:0] of the result. \n
4146/// 000: assign values from bits [15:0] of \a __a. \n4275/// 000: assign values from bits [15:0] of \a __a. \n
4147/// 001: assign values from bits [31:16] of \a __a. \n4276/// 001: assign values from bits [31:16] of \a __a. \n
...@@ -4788,4 +4917,12 @@ void _mm_pause(void);...@@ -4788,4 +4917,12 @@ void _mm_pause(void);
47884917
4789#define _MM_SHUFFLE2(x, y) (((x) << 1) | (y))4918#define _MM_SHUFFLE2(x, y) (((x) << 1) | (y))
47904919
4920#define _MM_DENORMALS_ZERO_ON (0x0040)
4921#define _MM_DENORMALS_ZERO_OFF (0x0000)
4922
4923#define _MM_DENORMALS_ZERO_MASK (0x0040)
4924
4925#define _MM_GET_DENORMALS_ZERO_MODE() (_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
4926#define _MM_SET_DENORMALS_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (x)))
4927
4791#endif /* __EMMINTRIN_H */4928#endif /* __EMMINTRIN_H */
c_headers/f16cintrin.h+5-5
...@@ -72,9 +72,9 @@ _cvtsh_ss(unsigned short __a)...@@ -72,9 +72,9 @@ _cvtsh_ss(unsigned short __a)
72/// 011: Truncate \n72/// 011: Truncate \n
73/// 1XX: Use MXCSR.RC for rounding73/// 1XX: Use MXCSR.RC for rounding
74/// \returns The converted 16-bit half-precision float value.74/// \returns The converted 16-bit half-precision float value.
75#define _cvtss_sh(a, imm) \75#define _cvtss_sh(a, imm) __extension__ ({ \
76 ((unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \76 (unsigned short)(((__v8hi)__builtin_ia32_vcvtps2ph((__v4sf){a, 0, 0, 0}, \
77 (imm)))[0]))77 (imm)))[0]); })
7878
79/// \brief Converts a 128-bit vector containing 32-bit float values into a79/// \brief Converts a 128-bit vector containing 32-bit float values into a
80/// 128-bit vector containing 16-bit half-precision float values.80/// 128-bit vector containing 16-bit half-precision float values.
...@@ -99,8 +99,8 @@ _cvtsh_ss(unsigned short __a)...@@ -99,8 +99,8 @@ _cvtsh_ss(unsigned short __a)
99/// \returns A 128-bit vector containing converted 16-bit half-precision float99/// \returns A 128-bit vector containing converted 16-bit half-precision float
100/// values. The lower 64 bits are used to store the converted 16-bit100/// values. The lower 64 bits are used to store the converted 16-bit
101/// half-precision floating-point values.101/// half-precision floating-point values.
102#define _mm_cvtps_ph(a, imm) \102#define _mm_cvtps_ph(a, imm) __extension__ ({ \
103 ((__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm)))103 (__m128i)__builtin_ia32_vcvtps2ph((__v4sf)(__m128)(a), (imm)); })
104104
105/// \brief Converts a 128-bit vector containing 16-bit half-precision float105/// \brief Converts a 128-bit vector containing 16-bit half-precision float
106/// values into a 128-bit vector containing 32-bit float values.106/// values into a 128-bit vector containing 32-bit float values.
c_headers/float.h+9
...@@ -33,6 +33,15 @@...@@ -33,6 +33,15 @@
33 */33 */
34#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \34#if (defined(__APPLE__) || (defined(__MINGW32__) || defined(_MSC_VER))) && \
35 __STDC_HOSTED__ && __has_include_next(<float.h>)35 __STDC_HOSTED__ && __has_include_next(<float.h>)
36
37/* Prior to Apple's 10.7 SDK, float.h SDK header used to apply an extra level
38 * of #include_next<float.h> to keep Metrowerks compilers happy. Avoid this
39 * extra indirection.
40 */
41#ifdef __APPLE__
42#define _FLOAT_H_
43#endif
44
36# include_next <float.h>45# include_next <float.h>
3746
38/* Undefine anything that we'll be redefining below. */47/* Undefine anything that we'll be redefining below. */
c_headers/htmxlintrin.h+5-9
...@@ -35,14 +35,10 @@...@@ -35,14 +35,10 @@
35extern "C" {35extern "C" {
36#endif36#endif
3737
38#define _TEXASR_PTR(TM_BUF) \38#define _TEXASR_PTR(TM_BUF) ((texasr_t *)((char *)(TM_BUF) + 0))
39 ((texasr_t *)((TM_BUF)+0))39#define _TEXASRU_PTR(TM_BUF) ((texasru_t *)((char *)(TM_BUF) + 0))
40#define _TEXASRU_PTR(TM_BUF) \40#define _TEXASRL_PTR(TM_BUF) ((texasrl_t *)((char *)(TM_BUF) + 4))
41 ((texasru_t *)((TM_BUF)+0))41#define _TFIAR_PTR(TM_BUF) ((tfiar_t *)((char *)(TM_BUF) + 8))
42#define _TEXASRL_PTR(TM_BUF) \
43 ((texasrl_t *)((TM_BUF)+4))
44#define _TFIAR_PTR(TM_BUF) \
45 ((tfiar_t *)((TM_BUF)+8))
4642
47typedef char TM_buff_type[16];43typedef char TM_buff_type[16];
4844
...@@ -178,7 +174,7 @@ extern __inline long...@@ -178,7 +174,7 @@ extern __inline long
178__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))174__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
179__TM_is_conflict(void* const __TM_buff)175__TM_is_conflict(void* const __TM_buff)
180{176{
181 texasru_t texasru = *_TEXASRU_PTR (TM_buff);177 texasru_t texasru = *_TEXASRU_PTR (__TM_buff);
182 /* Return TEXASR bits 11 (Self-Induced Conflict) through178 /* Return TEXASR bits 11 (Self-Induced Conflict) through
183 14 (Translation Invalidation Conflict). */179 14 (Translation Invalidation Conflict). */
184 return (_TEXASRU_EXTRACT_BITS (texasru, 14, 4)) ? 1 : 0;180 return (_TEXASRU_EXTRACT_BITS (texasru, 14, 4)) ? 1 : 0;
c_headers/immintrin.h+13-9
...@@ -146,6 +146,10 @@ _mm256_cvtph_ps(__m128i __a)...@@ -146,6 +146,10 @@ _mm256_cvtph_ps(__m128i __a)
146#include <avx512cdintrin.h>146#include <avx512cdintrin.h>
147#endif147#endif
148148
149#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VPOPCNTDQ__)
150#include <avx512vpopcntdqintrin.h>
151#endif
152
149#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__)153#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__)
150#include <avx512dqintrin.h>154#include <avx512dqintrin.h>
151#endif155#endif
...@@ -208,6 +212,15 @@ _rdrand32_step(unsigned int *__p)...@@ -208,6 +212,15 @@ _rdrand32_step(unsigned int *__p)
208 return __builtin_ia32_rdrand32_step(__p);212 return __builtin_ia32_rdrand32_step(__p);
209}213}
210214
215#ifdef __x86_64__
216static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
217_rdrand64_step(unsigned long long *__p)
218{
219 return __builtin_ia32_rdrand64_step(__p);
220}
221#endif
222#endif /* __RDRND__ */
223
211/* __bit_scan_forward */224/* __bit_scan_forward */
212static __inline__ int __attribute__((__always_inline__, __nodebug__))225static __inline__ int __attribute__((__always_inline__, __nodebug__))
213_bit_scan_forward(int __A) {226_bit_scan_forward(int __A) {
...@@ -220,15 +233,6 @@ _bit_scan_reverse(int __A) {...@@ -220,15 +233,6 @@ _bit_scan_reverse(int __A) {
220 return 31 - __builtin_clz(__A);233 return 31 - __builtin_clz(__A);
221}234}
222235
223#ifdef __x86_64__
224static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
225_rdrand64_step(unsigned long long *__p)
226{
227 return __builtin_ia32_rdrand64_step(__p);
228}
229#endif
230#endif /* __RDRND__ */
231
232#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__)236#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__)
233#ifdef __x86_64__237#ifdef __x86_64__
234static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))238static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
c_headers/intrin.h-56
...@@ -69,7 +69,6 @@ static __inline__...@@ -69,7 +69,6 @@ static __inline__
69__int64 __emul(int, int);69__int64 __emul(int, int);
70static __inline__70static __inline__
71unsigned __int64 __emulu(unsigned int, unsigned int);71unsigned __int64 __emulu(unsigned int, unsigned int);
72void __cdecl __fastfail(unsigned int);
73unsigned int __getcallerseflags(void);72unsigned int __getcallerseflags(void);
74static __inline__73static __inline__
75void __halt(void);74void __halt(void);
...@@ -80,16 +79,12 @@ void __incfsdword(unsigned long);...@@ -80,16 +79,12 @@ void __incfsdword(unsigned long);
80void __incfsword(unsigned long);79void __incfsword(unsigned long);
81unsigned long __indword(unsigned short);80unsigned long __indword(unsigned short);
82void __indwordstring(unsigned short, unsigned long *, unsigned long);81void __indwordstring(unsigned short, unsigned long *, unsigned long);
83void __int2c(void);
84void __invlpg(void *);82void __invlpg(void *);
85unsigned short __inword(unsigned short);83unsigned short __inword(unsigned short);
86void __inwordstring(unsigned short, unsigned short *, unsigned long);84void __inwordstring(unsigned short, unsigned short *, unsigned long);
87void __lidt(void *);85void __lidt(void *);
88unsigned __int64 __ll_lshift(unsigned __int64, int);86unsigned __int64 __ll_lshift(unsigned __int64, int);
89__int64 __ll_rshift(__int64, int);87__int64 __ll_rshift(__int64, int);
90void __llwpcb(void *);
91unsigned char __lwpins32(unsigned int, unsigned int, unsigned int);
92void __lwpval32(unsigned int, unsigned int, unsigned int);
93unsigned int __lzcnt(unsigned int);88unsigned int __lzcnt(unsigned int);
94unsigned short __lzcnt16(unsigned short);89unsigned short __lzcnt16(unsigned short);
95static __inline__90static __inline__
...@@ -128,7 +123,6 @@ unsigned __int64 __readmsr(unsigned long);...@@ -128,7 +123,6 @@ unsigned __int64 __readmsr(unsigned long);
128unsigned __int64 __readpmc(unsigned long);123unsigned __int64 __readpmc(unsigned long);
129unsigned long __segmentlimit(unsigned long);124unsigned long __segmentlimit(unsigned long);
130void __sidt(void *);125void __sidt(void *);
131void *__slwpcb(void);
132static __inline__126static __inline__
133void __stosb(unsigned char *, unsigned char, size_t);127void __stosb(unsigned char *, unsigned char, size_t);
134static __inline__128static __inline__
...@@ -142,7 +136,6 @@ void __svm_stgi(void);...@@ -142,7 +136,6 @@ void __svm_stgi(void);
142void __svm_vmload(size_t);136void __svm_vmload(size_t);
143void __svm_vmrun(size_t);137void __svm_vmrun(size_t);
144void __svm_vmsave(size_t);138void __svm_vmsave(size_t);
145void __ud2(void);
146unsigned __int64 __ull_rshift(unsigned __int64, int);139unsigned __int64 __ull_rshift(unsigned __int64, int);
147void __vmx_off(void);140void __vmx_off(void);
148void __vmx_vmptrst(unsigned __int64 *);141void __vmx_vmptrst(unsigned __int64 *);
...@@ -176,7 +169,6 @@ void __cdecl _disable(void);...@@ -176,7 +169,6 @@ void __cdecl _disable(void);
176void __cdecl _enable(void);169void __cdecl _enable(void);
177long _InterlockedAddLargeStatistic(__int64 volatile *_Addend, long _Value);170long _InterlockedAddLargeStatistic(__int64 volatile *_Addend, long _Value);
178unsigned char _interlockedbittestandreset(long volatile *, long);171unsigned char _interlockedbittestandreset(long volatile *, long);
179static __inline__
180unsigned char _interlockedbittestandset(long volatile *, long);172unsigned char _interlockedbittestandset(long volatile *, long);
181long _InterlockedCompareExchange_HLEAcquire(long volatile *, long, long);173long _InterlockedCompareExchange_HLEAcquire(long volatile *, long, long);
182long _InterlockedCompareExchange_HLERelease(long volatile *, long, long);174long _InterlockedCompareExchange_HLERelease(long volatile *, long, long);
...@@ -231,8 +223,6 @@ void __incgsbyte(unsigned long);...@@ -231,8 +223,6 @@ void __incgsbyte(unsigned long);
231void __incgsdword(unsigned long);223void __incgsdword(unsigned long);
232void __incgsqword(unsigned long);224void __incgsqword(unsigned long);
233void __incgsword(unsigned long);225void __incgsword(unsigned long);
234unsigned char __lwpins64(unsigned __int64, unsigned int, unsigned int);
235void __lwpval64(unsigned __int64, unsigned int, unsigned int);
236unsigned __int64 __lzcnt64(unsigned __int64);226unsigned __int64 __lzcnt64(unsigned __int64);
237static __inline__227static __inline__
238void __movsq(unsigned long long *, unsigned long long const *, size_t);228void __movsq(unsigned long long *, unsigned long long const *, size_t);
...@@ -372,11 +362,6 @@ _bittestandset(long *_BitBase, long _BitPos) {...@@ -372,11 +362,6 @@ _bittestandset(long *_BitBase, long _BitPos) {
372 *_BitBase = *_BitBase | (1 << _BitPos);362 *_BitBase = *_BitBase | (1 << _BitPos);
373 return _Res;363 return _Res;
374}364}
375static __inline__ unsigned char __DEFAULT_FN_ATTRS
376_interlockedbittestandset(long volatile *_BitBase, long _BitPos) {
377 long _PrevVal = __atomic_fetch_or(_BitBase, 1l << _BitPos, __ATOMIC_SEQ_CST);
378 return (_PrevVal >> _BitPos) & 1;
379}
380#if defined(__arm__) || defined(__aarch64__)365#if defined(__arm__) || defined(__aarch64__)
381static __inline__ unsigned char __DEFAULT_FN_ATTRS366static __inline__ unsigned char __DEFAULT_FN_ATTRS
382_interlockedbittestandset_acq(long volatile *_BitBase, long _BitPos) {367_interlockedbittestandset_acq(long volatile *_BitBase, long _BitPos) {
...@@ -872,48 +857,7 @@ _InterlockedCompareExchange64_rel(__int64 volatile *_Destination,...@@ -872,48 +857,7 @@ _InterlockedCompareExchange64_rel(__int64 volatile *_Destination,
872 return _Comparand;857 return _Comparand;
873}858}
874#endif859#endif
875/*----------------------------------------------------------------------------*\
876|* readfs, readgs
877|* (Pointers in address space #256 and #257 are relative to the GS and FS
878|* segment registers, respectively.)
879\*----------------------------------------------------------------------------*/
880#define __ptr_to_addr_space(__addr_space_nbr, __type, __offset) \
881 ((volatile __type __attribute__((__address_space__(__addr_space_nbr)))*) \
882 (__offset))
883860
884#ifdef __i386__
885static __inline__ unsigned char __DEFAULT_FN_ATTRS
886__readfsbyte(unsigned long __offset) {
887 return *__ptr_to_addr_space(257, unsigned char, __offset);
888}
889static __inline__ unsigned short __DEFAULT_FN_ATTRS
890__readfsword(unsigned long __offset) {
891 return *__ptr_to_addr_space(257, unsigned short, __offset);
892}
893static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
894__readfsqword(unsigned long __offset) {
895 return *__ptr_to_addr_space(257, unsigned __int64, __offset);
896}
897#endif
898#ifdef __x86_64__
899static __inline__ unsigned char __DEFAULT_FN_ATTRS
900__readgsbyte(unsigned long __offset) {
901 return *__ptr_to_addr_space(256, unsigned char, __offset);
902}
903static __inline__ unsigned short __DEFAULT_FN_ATTRS
904__readgsword(unsigned long __offset) {
905 return *__ptr_to_addr_space(256, unsigned short, __offset);
906}
907static __inline__ unsigned long __DEFAULT_FN_ATTRS
908__readgsdword(unsigned long __offset) {
909 return *__ptr_to_addr_space(256, unsigned long, __offset);
910}
911static __inline__ unsigned __int64 __DEFAULT_FN_ATTRS
912__readgsqword(unsigned long __offset) {
913 return *__ptr_to_addr_space(256, unsigned __int64, __offset);
914}
915#endif
916#undef __ptr_to_addr_space
917/*----------------------------------------------------------------------------*\861/*----------------------------------------------------------------------------*\
918|* movs, stos862|* movs, stos
919\*----------------------------------------------------------------------------*/863\*----------------------------------------------------------------------------*/
c_headers/lwpintrin.h created+150
...@@ -0,0 +1,150 @@
1/*===---- lwpintrin.h - LWP intrinsics -------------------------------------===
2 *
3 * Permission is hereby granted, free of charge, to any person obtaining a copy
4 * of this software and associated documentation files (the "Software"), to deal
5 * in the Software without restriction, including without limitation the rights
6 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 * copies of the Software, and to permit persons to whom the Software is
8 * furnished to do so, subject to the following conditions:
9 *
10 * The above copyright notice and this permission notice shall be included in
11 * all copies or substantial portions of the Software.
12 *
13 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 * THE SOFTWARE.
20 *
21 *===-----------------------------------------------------------------------===
22 */
23
24#ifndef __X86INTRIN_H
25#error "Never use <lwpintrin.h> directly; include <x86intrin.h> instead."
26#endif
27
28#ifndef __LWPINTRIN_H
29#define __LWPINTRIN_H
30
31/* Define the default attributes for the functions in this file. */
32#define __DEFAULT_FN_ATTRS __attribute__((__always_inline__, __nodebug__, __target__("lwp")))
33
34/// \brief Parses the LWPCB at the specified address and enables
35/// profiling if valid.
36///
37/// \headerfile <x86intrin.h>
38///
39/// This intrinsic corresponds to the <c> LLWPCB </c> instruction.
40///
41/// \param __addr
42/// Address to the new Lightweight Profiling Control Block (LWPCB). If the
43/// LWPCB is valid, writes the address into the LWP_CBADDR MSR and enables
44/// Lightweight Profiling.
45static __inline__ void __DEFAULT_FN_ATTRS
46__llwpcb (void *__addr)
47{
48 __builtin_ia32_llwpcb(__addr);
49}
50
51/// \brief Flushes the LWP state to memory and returns the address of the LWPCB.
52///
53/// \headerfile <x86intrin.h>
54///
55/// This intrinsic corresponds to the <c> SLWPCB </c> instruction.
56///
57/// \return
58/// Address to the current Lightweight Profiling Control Block (LWPCB).
59/// If LWP is not currently enabled, returns NULL.
60static __inline__ void* __DEFAULT_FN_ATTRS
61__slwpcb ()
62{
63 return __builtin_ia32_slwpcb();
64}
65
66/// \brief Inserts programmed event record into the LWP event ring buffer
67/// and advances the ring buffer pointer.
68///
69/// \headerfile <x86intrin.h>
70///
71/// This intrinsic corresponds to the <c> LWPINS </c> instruction.
72///
73/// \param DATA2
74/// A 32-bit value is zero-extended and inserted into the 64-bit Data2 field.
75/// \param DATA1
76/// A 32-bit value is inserted into the 32-bit Data1 field.
77/// \param FLAGS
78/// A 32-bit immediate value is inserted into the 32-bit Flags field.
79/// \returns If the ring buffer is full and LWP is running in Synchronized Mode,
80/// the event record overwrites the last record in the buffer, the MissedEvents
81/// counter in the LWPCB is incremented, the head pointer is not advanced, and
82/// 1 is returned. Otherwise 0 is returned.
83#define __lwpins32(DATA2, DATA1, FLAGS) \
84 (__builtin_ia32_lwpins32((unsigned int) (DATA2), (unsigned int) (DATA1), \
85 (unsigned int) (FLAGS)))
86
87/// \brief Decrements the LWP programmed value sample event counter. If the result is
88/// negative, inserts an event record into the LWP event ring buffer in memory
89/// and advances the ring buffer pointer.
90///
91/// \headerfile <x86intrin.h>
92///
93/// This intrinsic corresponds to the <c> LWPVAL </c> instruction.
94///
95/// \param DATA2
96/// A 32-bit value is zero-extended and inserted into the 64-bit Data2 field.
97/// \param DATA1
98/// A 32-bit value is inserted into the 32-bit Data1 field.
99/// \param FLAGS
100/// A 32-bit immediate value is inserted into the 32-bit Flags field.
101#define __lwpval32(DATA2, DATA1, FLAGS) \
102 (__builtin_ia32_lwpval32((unsigned int) (DATA2), (unsigned int) (DATA1), \
103 (unsigned int) (FLAGS)))
104
105#ifdef __x86_64__
106
107/// \brief Inserts programmed event record into the LWP event ring buffer
108/// and advances the ring buffer pointer.
109///
110/// \headerfile <x86intrin.h>
111///
112/// This intrinsic corresponds to the <c> LWPINS </c> instruction.
113///
114/// \param DATA2
115/// A 64-bit value is inserted into the 64-bit Data2 field.
116/// \param DATA1
117/// A 32-bit value is inserted into the 32-bit Data1 field.
118/// \param FLAGS
119/// A 32-bit immediate value is inserted into the 32-bit Flags field.
120/// \returns If the ring buffer is full and LWP is running in Synchronized Mode,
121/// the event record overwrites the last record in the buffer, the MissedEvents
122/// counter in the LWPCB is incremented, the head pointer is not advanced, and
123/// 1 is returned. Otherwise 0 is returned.
124#define __lwpins64(DATA2, DATA1, FLAGS) \
125 (__builtin_ia32_lwpins64((unsigned long long) (DATA2), (unsigned int) (DATA1), \
126 (unsigned int) (FLAGS)))
127
128/// \brief Decrements the LWP programmed value sample event counter. If the result is
129/// negative, inserts an event record into the LWP event ring buffer in memory
130/// and advances the ring buffer pointer.
131///
132/// \headerfile <x86intrin.h>
133///
134/// This intrinsic corresponds to the <c> LWPVAL </c> instruction.
135///
136/// \param DATA2
137/// A 64-bit value is and inserted into the 64-bit Data2 field.
138/// \param DATA1
139/// A 32-bit value is inserted into the 32-bit Data1 field.
140/// \param FLAGS
141/// A 32-bit immediate value is inserted into the 32-bit Flags field.
142#define __lwpval64(DATA2, DATA1, FLAGS) \
143 (__builtin_ia32_lwpval64((unsigned long long) (DATA2), (unsigned int) (DATA1), \
144 (unsigned int) (FLAGS)))
145
146#endif
147
148#undef __DEFAULT_FN_ATTRS
149
150#endif /* __LWPINTRIN_H */
c_headers/mmintrin.h+63-42
...@@ -211,7 +211,7 @@ _mm_packs_pu16(__m64 __m1, __m64 __m2)...@@ -211,7 +211,7 @@ _mm_packs_pu16(__m64 __m1, __m64 __m2)
211/// This intrinsic corresponds to the <c> PUNPCKHBW </c> instruction.211/// This intrinsic corresponds to the <c> PUNPCKHBW </c> instruction.
212///212///
213/// \param __m1213/// \param __m1
214/// A 64-bit integer vector of [8 x i8]. \n 214/// A 64-bit integer vector of [8 x i8]. \n
215/// Bits [39:32] are written to bits [7:0] of the result. \n215/// Bits [39:32] are written to bits [7:0] of the result. \n
216/// Bits [47:40] are written to bits [23:16] of the result. \n216/// Bits [47:40] are written to bits [23:16] of the result. \n
217/// Bits [55:48] are written to bits [39:32] of the result. \n217/// Bits [55:48] are written to bits [39:32] of the result. \n
...@@ -608,10 +608,11 @@ _mm_subs_pi16(__m64 __m1, __m64 __m2)...@@ -608,10 +608,11 @@ _mm_subs_pi16(__m64 __m1, __m64 __m2)
608608
609/// \brief Subtracts each 8-bit unsigned integer element of the second 64-bit609/// \brief Subtracts each 8-bit unsigned integer element of the second 64-bit
610/// integer vector of [8 x i8] from the corresponding 8-bit unsigned integer610/// integer vector of [8 x i8] from the corresponding 8-bit unsigned integer
611/// element of the first 64-bit integer vector of [8 x i8]. If an element of611/// element of the first 64-bit integer vector of [8 x i8].
612/// the first vector is less than the corresponding element of the second612///
613/// vector, the result is saturated to 0. The results are packed into a613/// If an element of the first vector is less than the corresponding element
614/// 64-bit integer vector of [8 x i8].614/// of the second vector, the result is saturated to 0. The results are
615/// packed into a 64-bit integer vector of [8 x i8].
615///616///
616/// \headerfile <x86intrin.h>617/// \headerfile <x86intrin.h>
617///618///
...@@ -631,10 +632,11 @@ _mm_subs_pu8(__m64 __m1, __m64 __m2)...@@ -631,10 +632,11 @@ _mm_subs_pu8(__m64 __m1, __m64 __m2)
631632
632/// \brief Subtracts each 16-bit unsigned integer element of the second 64-bit633/// \brief Subtracts each 16-bit unsigned integer element of the second 64-bit
633/// integer vector of [4 x i16] from the corresponding 16-bit unsigned634/// integer vector of [4 x i16] from the corresponding 16-bit unsigned
634/// integer element of the first 64-bit integer vector of [4 x i16]. If an635/// integer element of the first 64-bit integer vector of [4 x i16].
635/// element of the first vector is less than the corresponding element of the636///
636/// second vector, the result is saturated to 0. The results are packed into637/// If an element of the first vector is less than the corresponding element
637/// a 64-bit integer vector of [4 x i16].638/// of the second vector, the result is saturated to 0. The results are
639/// packed into a 64-bit integer vector of [4 x i16].
638///640///
639/// \headerfile <x86intrin.h>641/// \headerfile <x86intrin.h>
640///642///
...@@ -657,9 +659,11 @@ _mm_subs_pu16(__m64 __m1, __m64 __m2)...@@ -657,9 +659,11 @@ _mm_subs_pu16(__m64 __m1, __m64 __m2)
657/// element of the second 64-bit integer vector of [4 x i16] and get four659/// element of the second 64-bit integer vector of [4 x i16] and get four
658/// 32-bit products. Adds adjacent pairs of products to get two 32-bit sums.660/// 32-bit products. Adds adjacent pairs of products to get two 32-bit sums.
659/// The lower 32 bits of these two sums are packed into a 64-bit integer661/// The lower 32 bits of these two sums are packed into a 64-bit integer
660/// vector of [2 x i32]. For example, bits [15:0] of both parameters are662/// vector of [2 x i32].
661/// multiplied, bits [31:16] of both parameters are multiplied, and the sum663///
662/// of both results is written to bits [31:0] of the result.664/// For example, bits [15:0] of both parameters are multiplied, bits [31:16]
665/// of both parameters are multiplied, and the sum of both results is written
666/// to bits [31:0] of the result.
663///667///
664/// \headerfile <x86intrin.h>668/// \headerfile <x86intrin.h>
665///669///
...@@ -851,10 +855,11 @@ _mm_slli_si64(__m64 __m, int __count)...@@ -851,10 +855,11 @@ _mm_slli_si64(__m64 __m, int __count)
851855
852/// \brief Right-shifts each 16-bit integer element of the first parameter,856/// \brief Right-shifts each 16-bit integer element of the first parameter,
853/// which is a 64-bit integer vector of [4 x i16], by the number of bits857/// which is a 64-bit integer vector of [4 x i16], by the number of bits
854/// specified by the second parameter, which is a 64-bit integer. High-order858/// specified by the second parameter, which is a 64-bit integer.
855/// bits are filled with the sign bit of the initial value of each 16-bit859///
856/// element. The 16-bit results are packed into a 64-bit integer vector of860/// High-order bits are filled with the sign bit of the initial value of each
857/// [4 x i16].861/// 16-bit element. The 16-bit results are packed into a 64-bit integer
862/// vector of [4 x i16].
858///863///
859/// \headerfile <x86intrin.h>864/// \headerfile <x86intrin.h>
860///865///
...@@ -874,6 +879,7 @@ _mm_sra_pi16(__m64 __m, __m64 __count)...@@ -874,6 +879,7 @@ _mm_sra_pi16(__m64 __m, __m64 __count)
874879
875/// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector880/// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector
876/// of [4 x i16] by the number of bits specified by a 32-bit integer.881/// of [4 x i16] by the number of bits specified by a 32-bit integer.
882///
877/// High-order bits are filled with the sign bit of the initial value of each883/// High-order bits are filled with the sign bit of the initial value of each
878/// 16-bit element. The 16-bit results are packed into a 64-bit integer884/// 16-bit element. The 16-bit results are packed into a 64-bit integer
879/// vector of [4 x i16].885/// vector of [4 x i16].
...@@ -896,10 +902,11 @@ _mm_srai_pi16(__m64 __m, int __count)...@@ -896,10 +902,11 @@ _mm_srai_pi16(__m64 __m, int __count)
896902
897/// \brief Right-shifts each 32-bit integer element of the first parameter,903/// \brief Right-shifts each 32-bit integer element of the first parameter,
898/// which is a 64-bit integer vector of [2 x i32], by the number of bits904/// which is a 64-bit integer vector of [2 x i32], by the number of bits
899/// specified by the second parameter, which is a 64-bit integer. High-order905/// specified by the second parameter, which is a 64-bit integer.
900/// bits are filled with the sign bit of the initial value of each 32-bit906///
901/// element. The 32-bit results are packed into a 64-bit integer vector of907/// High-order bits are filled with the sign bit of the initial value of each
902/// [2 x i32].908/// 32-bit element. The 32-bit results are packed into a 64-bit integer
909/// vector of [2 x i32].
903///910///
904/// \headerfile <x86intrin.h>911/// \headerfile <x86intrin.h>
905///912///
...@@ -919,6 +926,7 @@ _mm_sra_pi32(__m64 __m, __m64 __count)...@@ -919,6 +926,7 @@ _mm_sra_pi32(__m64 __m, __m64 __count)
919926
920/// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector927/// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector
921/// of [2 x i32] by the number of bits specified by a 32-bit integer.928/// of [2 x i32] by the number of bits specified by a 32-bit integer.
929///
922/// High-order bits are filled with the sign bit of the initial value of each930/// High-order bits are filled with the sign bit of the initial value of each
923/// 32-bit element. The 32-bit results are packed into a 64-bit integer931/// 32-bit element. The 32-bit results are packed into a 64-bit integer
924/// vector of [2 x i32].932/// vector of [2 x i32].
...@@ -941,9 +949,10 @@ _mm_srai_pi32(__m64 __m, int __count)...@@ -941,9 +949,10 @@ _mm_srai_pi32(__m64 __m, int __count)
941949
942/// \brief Right-shifts each 16-bit integer element of the first parameter,950/// \brief Right-shifts each 16-bit integer element of the first parameter,
943/// which is a 64-bit integer vector of [4 x i16], by the number of bits951/// which is a 64-bit integer vector of [4 x i16], by the number of bits
944/// specified by the second parameter, which is a 64-bit integer. High-order952/// specified by the second parameter, which is a 64-bit integer.
945/// bits are cleared. The 16-bit results are packed into a 64-bit integer953///
946/// vector of [4 x i16].954/// High-order bits are cleared. The 16-bit results are packed into a 64-bit
955/// integer vector of [4 x i16].
947///956///
948/// \headerfile <x86intrin.h>957/// \headerfile <x86intrin.h>
949///958///
...@@ -963,6 +972,7 @@ _mm_srl_pi16(__m64 __m, __m64 __count)...@@ -963,6 +972,7 @@ _mm_srl_pi16(__m64 __m, __m64 __count)
963972
964/// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector973/// \brief Right-shifts each 16-bit integer element of a 64-bit integer vector
965/// of [4 x i16] by the number of bits specified by a 32-bit integer.974/// of [4 x i16] by the number of bits specified by a 32-bit integer.
975///
966/// High-order bits are cleared. The 16-bit results are packed into a 64-bit976/// High-order bits are cleared. The 16-bit results are packed into a 64-bit
967/// integer vector of [4 x i16].977/// integer vector of [4 x i16].
968///978///
...@@ -984,9 +994,10 @@ _mm_srli_pi16(__m64 __m, int __count)...@@ -984,9 +994,10 @@ _mm_srli_pi16(__m64 __m, int __count)
984994
985/// \brief Right-shifts each 32-bit integer element of the first parameter,995/// \brief Right-shifts each 32-bit integer element of the first parameter,
986/// which is a 64-bit integer vector of [2 x i32], by the number of bits996/// which is a 64-bit integer vector of [2 x i32], by the number of bits
987/// specified by the second parameter, which is a 64-bit integer. High-order997/// specified by the second parameter, which is a 64-bit integer.
988/// bits are cleared. The 32-bit results are packed into a 64-bit integer998///
989/// vector of [2 x i32].999/// High-order bits are cleared. The 32-bit results are packed into a 64-bit
1000/// integer vector of [2 x i32].
990///1001///
991/// \headerfile <x86intrin.h>1002/// \headerfile <x86intrin.h>
992///1003///
...@@ -1006,6 +1017,7 @@ _mm_srl_pi32(__m64 __m, __m64 __count)...@@ -1006,6 +1017,7 @@ _mm_srl_pi32(__m64 __m, __m64 __count)
10061017
1007/// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector1018/// \brief Right-shifts each 32-bit integer element of a 64-bit integer vector
1008/// of [2 x i32] by the number of bits specified by a 32-bit integer.1019/// of [2 x i32] by the number of bits specified by a 32-bit integer.
1020///
1009/// High-order bits are cleared. The 32-bit results are packed into a 64-bit1021/// High-order bits are cleared. The 32-bit results are packed into a 64-bit
1010/// integer vector of [2 x i32].1022/// integer vector of [2 x i32].
1011///1023///
...@@ -1026,8 +1038,9 @@ _mm_srli_pi32(__m64 __m, int __count)...@@ -1026,8 +1038,9 @@ _mm_srli_pi32(__m64 __m, int __count)
1026}1038}
10271039
1028/// \brief Right-shifts the first 64-bit integer parameter by the number of bits1040/// \brief Right-shifts the first 64-bit integer parameter by the number of bits
1029/// specified by the second 64-bit integer parameter. High-order bits are1041/// specified by the second 64-bit integer parameter.
1030/// cleared.1042///
1043/// High-order bits are cleared.
1031///1044///
1032/// \headerfile <x86intrin.h>1045/// \headerfile <x86intrin.h>
1033///1046///
...@@ -1046,7 +1059,9 @@ _mm_srl_si64(__m64 __m, __m64 __count)...@@ -1046,7 +1059,9 @@ _mm_srl_si64(__m64 __m, __m64 __count)
10461059
1047/// \brief Right-shifts the first parameter, which is a 64-bit integer, by the1060/// \brief Right-shifts the first parameter, which is a 64-bit integer, by the
1048/// number of bits specified by the second parameter, which is a 32-bit1061/// number of bits specified by the second parameter, which is a 32-bit
1049/// integer. High-order bits are cleared.1062/// integer.
1063///
1064/// High-order bits are cleared.
1050///1065///
1051/// \headerfile <x86intrin.h>1066/// \headerfile <x86intrin.h>
1052///1067///
...@@ -1140,8 +1155,9 @@ _mm_xor_si64(__m64 __m1, __m64 __m2)...@@ -1140,8 +1155,9 @@ _mm_xor_si64(__m64 __m1, __m64 __m2)
11401155
1141/// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of1156/// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of
1142/// [8 x i8] to determine if the element of the first vector is equal to the1157/// [8 x i8] to determine if the element of the first vector is equal to the
1143/// corresponding element of the second vector. The comparison yields 0 for1158/// corresponding element of the second vector.
1144/// false, 0xFF for true.1159///
1160/// The comparison yields 0 for false, 0xFF for true.
1145///1161///
1146/// \headerfile <x86intrin.h>1162/// \headerfile <x86intrin.h>
1147///1163///
...@@ -1161,8 +1177,9 @@ _mm_cmpeq_pi8(__m64 __m1, __m64 __m2)...@@ -1161,8 +1177,9 @@ _mm_cmpeq_pi8(__m64 __m1, __m64 __m2)
11611177
1162/// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of1178/// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of
1163/// [4 x i16] to determine if the element of the first vector is equal to the1179/// [4 x i16] to determine if the element of the first vector is equal to the
1164/// corresponding element of the second vector. The comparison yields 0 for1180/// corresponding element of the second vector.
1165/// false, 0xFFFF for true.1181///
1182/// The comparison yields 0 for false, 0xFFFF for true.
1166///1183///
1167/// \headerfile <x86intrin.h>1184/// \headerfile <x86intrin.h>
1168///1185///
...@@ -1182,8 +1199,9 @@ _mm_cmpeq_pi16(__m64 __m1, __m64 __m2)...@@ -1182,8 +1199,9 @@ _mm_cmpeq_pi16(__m64 __m1, __m64 __m2)
11821199
1183/// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of1200/// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of
1184/// [2 x i32] to determine if the element of the first vector is equal to the1201/// [2 x i32] to determine if the element of the first vector is equal to the
1185/// corresponding element of the second vector. The comparison yields 0 for1202/// corresponding element of the second vector.
1186/// false, 0xFFFFFFFF for true.1203///
1204/// The comparison yields 0 for false, 0xFFFFFFFF for true.
1187///1205///
1188/// \headerfile <x86intrin.h>1206/// \headerfile <x86intrin.h>
1189///1207///
...@@ -1203,8 +1221,9 @@ _mm_cmpeq_pi32(__m64 __m1, __m64 __m2)...@@ -1203,8 +1221,9 @@ _mm_cmpeq_pi32(__m64 __m1, __m64 __m2)
12031221
1204/// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of1222/// \brief Compares the 8-bit integer elements of two 64-bit integer vectors of
1205/// [8 x i8] to determine if the element of the first vector is greater than1223/// [8 x i8] to determine if the element of the first vector is greater than
1206/// the corresponding element of the second vector. The comparison yields 01224/// the corresponding element of the second vector.
1207/// for false, 0xFF for true.1225///
1226/// The comparison yields 0 for false, 0xFF for true.
1208///1227///
1209/// \headerfile <x86intrin.h>1228/// \headerfile <x86intrin.h>
1210///1229///
...@@ -1224,8 +1243,9 @@ _mm_cmpgt_pi8(__m64 __m1, __m64 __m2)...@@ -1224,8 +1243,9 @@ _mm_cmpgt_pi8(__m64 __m1, __m64 __m2)
12241243
1225/// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of1244/// \brief Compares the 16-bit integer elements of two 64-bit integer vectors of
1226/// [4 x i16] to determine if the element of the first vector is greater than1245/// [4 x i16] to determine if the element of the first vector is greater than
1227/// the corresponding element of the second vector. The comparison yields 01246/// the corresponding element of the second vector.
1228/// for false, 0xFFFF for true.1247///
1248/// The comparison yields 0 for false, 0xFFFF for true.
1229///1249///
1230/// \headerfile <x86intrin.h>1250/// \headerfile <x86intrin.h>
1231///1251///
...@@ -1245,8 +1265,9 @@ _mm_cmpgt_pi16(__m64 __m1, __m64 __m2)...@@ -1245,8 +1265,9 @@ _mm_cmpgt_pi16(__m64 __m1, __m64 __m2)
12451265
1246/// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of1266/// \brief Compares the 32-bit integer elements of two 64-bit integer vectors of
1247/// [2 x i32] to determine if the element of the first vector is greater than1267/// [2 x i32] to determine if the element of the first vector is greater than
1248/// the corresponding element of the second vector. The comparison yields 01268/// the corresponding element of the second vector.
1249/// for false, 0xFFFFFFFF for true.1269///
1270/// The comparison yields 0 for false, 0xFFFFFFFF for true.
1250///1271///
1251/// \headerfile <x86intrin.h>1272/// \headerfile <x86intrin.h>
1252///1273///
...@@ -1268,7 +1289,7 @@ _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)...@@ -1268,7 +1289,7 @@ _mm_cmpgt_pi32(__m64 __m1, __m64 __m2)
1268///1289///
1269/// \headerfile <x86intrin.h>1290/// \headerfile <x86intrin.h>
1270///1291///
1271/// This intrinsic corresponds to the the <c> VXORPS / XORPS </c> instruction.1292/// This intrinsic corresponds to the <c> VXORPS / XORPS </c> instruction.
1272///1293///
1273/// \returns An initialized 64-bit integer vector with all elements set to zero.1294/// \returns An initialized 64-bit integer vector with all elements set to zero.
1274static __inline__ __m64 __DEFAULT_FN_ATTRS1295static __inline__ __m64 __DEFAULT_FN_ATTRS
c_headers/module.modulemap+1
...@@ -61,6 +61,7 @@ module _Builtin_intrinsics [system] [extern_c] {...@@ -61,6 +61,7 @@ module _Builtin_intrinsics [system] [extern_c] {
61 textual header "xopintrin.h"61 textual header "xopintrin.h"
62 textual header "fma4intrin.h"62 textual header "fma4intrin.h"
63 textual header "mwaitxintrin.h"63 textual header "mwaitxintrin.h"
64 textual header "clzerointrin.h"
6465
65 explicit module mm_malloc {66 explicit module mm_malloc {
66 requires !freestanding67 requires !freestanding
c_headers/opencl-c.h+120-778
...@@ -16,6 +16,12 @@...@@ -16,6 +16,12 @@
16#endif //cl_khr_depth_images16#endif //cl_khr_depth_images
17#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_017#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1818
19#if __OPENCL_C_VERSION__ < CL_VERSION_2_0
20#ifdef cl_khr_3d_image_writes
21#pragma OPENCL EXTENSION cl_khr_3d_image_writes : enable
22#endif //cl_khr_3d_image_writes
23#endif //__OPENCL_C_VERSION__ < CL_VERSION_2_0
24
19#define __ovld __attribute__((overloadable))25#define __ovld __attribute__((overloadable))
20#define __conv __attribute__((convergent))26#define __conv __attribute__((convergent))
2127
...@@ -6578,777 +6584,85 @@ half16 __ovld __cnfn convert_half16_rtz(double16);...@@ -6578,777 +6584,85 @@ half16 __ovld __cnfn convert_half16_rtz(double16);
6578 * OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators6584 * OpenCL v1.1/1.2/2.0 s6.2.4.2 - as_type operators
6579 * Reinterprets a data type as another data type of the same size6585 * Reinterprets a data type as another data type of the same size
6580 */6586 */
6581char __ovld __cnfn as_char(char);6587#define as_char(x) __builtin_astype((x), char)
6582char __ovld __cnfn as_char(uchar);6588#define as_char2(x) __builtin_astype((x), char2)
65836589#define as_char3(x) __builtin_astype((x), char3)
6584char2 __ovld __cnfn as_char2(char2);6590#define as_char4(x) __builtin_astype((x), char4)
6585char2 __ovld __cnfn as_char2(uchar2);6591#define as_char8(x) __builtin_astype((x), char8)
6586char2 __ovld __cnfn as_char2(short);6592#define as_char16(x) __builtin_astype((x), char16)
6587char2 __ovld __cnfn as_char2(ushort);6593
65886594#define as_uchar(x) __builtin_astype((x), uchar)
6589char3 __ovld __cnfn as_char3(char3);6595#define as_uchar2(x) __builtin_astype((x), uchar2)
6590char3 __ovld __cnfn as_char3(char4);6596#define as_uchar3(x) __builtin_astype((x), uchar3)
6591char3 __ovld __cnfn as_char3(uchar3);6597#define as_uchar4(x) __builtin_astype((x), uchar4)
6592char3 __ovld __cnfn as_char3(uchar4);6598#define as_uchar8(x) __builtin_astype((x), uchar8)
6593char3 __ovld __cnfn as_char3(short2);6599#define as_uchar16(x) __builtin_astype((x), uchar16)
6594char3 __ovld __cnfn as_char3(ushort2);6600
6595char3 __ovld __cnfn as_char3(int);6601#define as_short(x) __builtin_astype((x), short)
6596char3 __ovld __cnfn as_char3(uint);6602#define as_short2(x) __builtin_astype((x), short2)
6597char3 __ovld __cnfn as_char3(float);6603#define as_short3(x) __builtin_astype((x), short3)
65986604#define as_short4(x) __builtin_astype((x), short4)
6599char4 __ovld __cnfn as_char4(char3);6605#define as_short8(x) __builtin_astype((x), short8)
6600char4 __ovld __cnfn as_char4(char4);6606#define as_short16(x) __builtin_astype((x), short16)
6601char4 __ovld __cnfn as_char4(uchar3);6607
6602char4 __ovld __cnfn as_char4(uchar4);6608#define as_ushort(x) __builtin_astype((x), ushort)
6603char4 __ovld __cnfn as_char4(short2);6609#define as_ushort2(x) __builtin_astype((x), ushort2)
6604char4 __ovld __cnfn as_char4(ushort2);6610#define as_ushort3(x) __builtin_astype((x), ushort3)
6605char4 __ovld __cnfn as_char4(int);6611#define as_ushort4(x) __builtin_astype((x), ushort4)
6606char4 __ovld __cnfn as_char4(uint);6612#define as_ushort8(x) __builtin_astype((x), ushort8)
6607char4 __ovld __cnfn as_char4(float);6613#define as_ushort16(x) __builtin_astype((x), ushort16)
66086614
6609char8 __ovld __cnfn as_char8(char8);6615#define as_int(x) __builtin_astype((x), int)
6610char8 __ovld __cnfn as_char8(uchar8);6616#define as_int2(x) __builtin_astype((x), int2)
6611char8 __ovld __cnfn as_char8(short3);6617#define as_int3(x) __builtin_astype((x), int3)
6612char8 __ovld __cnfn as_char8(short4);6618#define as_int4(x) __builtin_astype((x), int4)
6613char8 __ovld __cnfn as_char8(ushort3);6619#define as_int8(x) __builtin_astype((x), int8)
6614char8 __ovld __cnfn as_char8(ushort4);6620#define as_int16(x) __builtin_astype((x), int16)
6615char8 __ovld __cnfn as_char8(int2);6621
6616char8 __ovld __cnfn as_char8(uint2);6622#define as_uint(x) __builtin_astype((x), uint)
6617char8 __ovld __cnfn as_char8(long);6623#define as_uint2(x) __builtin_astype((x), uint2)
6618char8 __ovld __cnfn as_char8(ulong);6624#define as_uint3(x) __builtin_astype((x), uint3)
6619char8 __ovld __cnfn as_char8(float2);6625#define as_uint4(x) __builtin_astype((x), uint4)
66206626#define as_uint8(x) __builtin_astype((x), uint8)
6621char16 __ovld __cnfn as_char16(char16);6627#define as_uint16(x) __builtin_astype((x), uint16)
6622char16 __ovld __cnfn as_char16(uchar16);6628
6623char16 __ovld __cnfn as_char16(short8);6629#define as_long(x) __builtin_astype((x), long)
6624char16 __ovld __cnfn as_char16(ushort8);6630#define as_long2(x) __builtin_astype((x), long2)
6625char16 __ovld __cnfn as_char16(int3);6631#define as_long3(x) __builtin_astype((x), long3)
6626char16 __ovld __cnfn as_char16(int4);6632#define as_long4(x) __builtin_astype((x), long4)
6627char16 __ovld __cnfn as_char16(uint3);6633#define as_long8(x) __builtin_astype((x), long8)
6628char16 __ovld __cnfn as_char16(uint4);6634#define as_long16(x) __builtin_astype((x), long16)
6629char16 __ovld __cnfn as_char16(long2);6635
6630char16 __ovld __cnfn as_char16(ulong2);6636#define as_ulong(x) __builtin_astype((x), ulong)
6631char16 __ovld __cnfn as_char16(float3);6637#define as_ulong2(x) __builtin_astype((x), ulong2)
6632char16 __ovld __cnfn as_char16(float4);6638#define as_ulong3(x) __builtin_astype((x), ulong3)
66336639#define as_ulong4(x) __builtin_astype((x), ulong4)
6634uchar __ovld __cnfn as_uchar(char);6640#define as_ulong8(x) __builtin_astype((x), ulong8)
6635uchar __ovld __cnfn as_uchar(uchar);6641#define as_ulong16(x) __builtin_astype((x), ulong16)
66366642
6637uchar2 __ovld __cnfn as_uchar2(char2);6643#define as_float(x) __builtin_astype((x), float)
6638uchar2 __ovld __cnfn as_uchar2(uchar2);6644#define as_float2(x) __builtin_astype((x), float2)
6639uchar2 __ovld __cnfn as_uchar2(short);6645#define as_float3(x) __builtin_astype((x), float3)
6640uchar2 __ovld __cnfn as_uchar2(ushort);6646#define as_float4(x) __builtin_astype((x), float4)
66416647#define as_float8(x) __builtin_astype((x), float8)
6642uchar3 __ovld __cnfn as_uchar3(char3);6648#define as_float16(x) __builtin_astype((x), float16)
6643uchar3 __ovld __cnfn as_uchar3(char4);
6644uchar3 __ovld __cnfn as_uchar3(uchar3);
6645uchar3 __ovld __cnfn as_uchar3(uchar4);
6646uchar3 __ovld __cnfn as_uchar3(short2);
6647uchar3 __ovld __cnfn as_uchar3(ushort2);
6648uchar3 __ovld __cnfn as_uchar3(int);
6649uchar3 __ovld __cnfn as_uchar3(uint);
6650uchar3 __ovld __cnfn as_uchar3(float);
6651
6652uchar4 __ovld __cnfn as_uchar4(char3);
6653uchar4 __ovld __cnfn as_uchar4(char4);
6654uchar4 __ovld __cnfn as_uchar4(uchar3);
6655uchar4 __ovld __cnfn as_uchar4(uchar4);
6656uchar4 __ovld __cnfn as_uchar4(short2);
6657uchar4 __ovld __cnfn as_uchar4(ushort2);
6658uchar4 __ovld __cnfn as_uchar4(int);
6659uchar4 __ovld __cnfn as_uchar4(uint);
6660uchar4 __ovld __cnfn as_uchar4(float);
6661
6662uchar8 __ovld __cnfn as_uchar8(char8);
6663uchar8 __ovld __cnfn as_uchar8(uchar8);
6664uchar8 __ovld __cnfn as_uchar8(short3);
6665uchar8 __ovld __cnfn as_uchar8(short4);
6666uchar8 __ovld __cnfn as_uchar8(ushort3);
6667uchar8 __ovld __cnfn as_uchar8(ushort4);
6668uchar8 __ovld __cnfn as_uchar8(int2);
6669uchar8 __ovld __cnfn as_uchar8(uint2);
6670uchar8 __ovld __cnfn as_uchar8(long);
6671uchar8 __ovld __cnfn as_uchar8(ulong);
6672uchar8 __ovld __cnfn as_uchar8(float2);
6673
6674uchar16 __ovld __cnfn as_uchar16(char16);
6675uchar16 __ovld __cnfn as_uchar16(uchar16);
6676uchar16 __ovld __cnfn as_uchar16(short8);
6677uchar16 __ovld __cnfn as_uchar16(ushort8);
6678uchar16 __ovld __cnfn as_uchar16(int3);
6679uchar16 __ovld __cnfn as_uchar16(int4);
6680uchar16 __ovld __cnfn as_uchar16(uint3);
6681uchar16 __ovld __cnfn as_uchar16(uint4);
6682uchar16 __ovld __cnfn as_uchar16(long2);
6683uchar16 __ovld __cnfn as_uchar16(ulong2);
6684uchar16 __ovld __cnfn as_uchar16(float3);
6685uchar16 __ovld __cnfn as_uchar16(float4);
6686
6687short __ovld __cnfn as_short(char2);
6688short __ovld __cnfn as_short(uchar2);
6689short __ovld __cnfn as_short(short);
6690short __ovld __cnfn as_short(ushort);
6691
6692short2 __ovld __cnfn as_short2(char3);
6693short2 __ovld __cnfn as_short2(char4);
6694short2 __ovld __cnfn as_short2(uchar3);
6695short2 __ovld __cnfn as_short2(uchar4);
6696short2 __ovld __cnfn as_short2(short2);
6697short2 __ovld __cnfn as_short2(ushort2);
6698short2 __ovld __cnfn as_short2(int);
6699short2 __ovld __cnfn as_short2(uint);
6700short2 __ovld __cnfn as_short2(float);
6701
6702short3 __ovld __cnfn as_short3(char8);
6703short3 __ovld __cnfn as_short3(uchar8);
6704short3 __ovld __cnfn as_short3(short3);
6705short3 __ovld __cnfn as_short3(short4);
6706short3 __ovld __cnfn as_short3(ushort3);
6707short3 __ovld __cnfn as_short3(ushort4);
6708short3 __ovld __cnfn as_short3(int2);
6709short3 __ovld __cnfn as_short3(uint2);
6710short3 __ovld __cnfn as_short3(long);
6711short3 __ovld __cnfn as_short3(ulong);
6712short3 __ovld __cnfn as_short3(float2);
6713
6714short4 __ovld __cnfn as_short4(char8);
6715short4 __ovld __cnfn as_short4(uchar8);
6716short4 __ovld __cnfn as_short4(short3);
6717short4 __ovld __cnfn as_short4(short4);
6718short4 __ovld __cnfn as_short4(ushort3);
6719short4 __ovld __cnfn as_short4(ushort4);
6720short4 __ovld __cnfn as_short4(int2);
6721short4 __ovld __cnfn as_short4(uint2);
6722short4 __ovld __cnfn as_short4(long);
6723short4 __ovld __cnfn as_short4(ulong);
6724short4 __ovld __cnfn as_short4(float2);
6725
6726short8 __ovld __cnfn as_short8(char16);
6727short8 __ovld __cnfn as_short8(uchar16);
6728short8 __ovld __cnfn as_short8(short8);
6729short8 __ovld __cnfn as_short8(ushort8);
6730short8 __ovld __cnfn as_short8(int3);
6731short8 __ovld __cnfn as_short8(int4);
6732short8 __ovld __cnfn as_short8(uint3);
6733short8 __ovld __cnfn as_short8(uint4);
6734short8 __ovld __cnfn as_short8(long2);
6735short8 __ovld __cnfn as_short8(ulong2);
6736short8 __ovld __cnfn as_short8(float3);
6737short8 __ovld __cnfn as_short8(float4);
6738
6739short16 __ovld __cnfn as_short16(short16);
6740short16 __ovld __cnfn as_short16(ushort16);
6741short16 __ovld __cnfn as_short16(int8);
6742short16 __ovld __cnfn as_short16(uint8);
6743short16 __ovld __cnfn as_short16(long3);
6744short16 __ovld __cnfn as_short16(long4);
6745short16 __ovld __cnfn as_short16(ulong3);
6746short16 __ovld __cnfn as_short16(ulong4);
6747short16 __ovld __cnfn as_short16(float8);
6748
6749ushort __ovld __cnfn as_ushort(char2);
6750ushort __ovld __cnfn as_ushort(uchar2);
6751ushort __ovld __cnfn as_ushort(short);
6752ushort __ovld __cnfn as_ushort(ushort);
6753
6754ushort2 __ovld __cnfn as_ushort2(char3);
6755ushort2 __ovld __cnfn as_ushort2(char4);
6756ushort2 __ovld __cnfn as_ushort2(uchar3);
6757ushort2 __ovld __cnfn as_ushort2(uchar4);
6758ushort2 __ovld __cnfn as_ushort2(short2);
6759ushort2 __ovld __cnfn as_ushort2(ushort2);
6760ushort2 __ovld __cnfn as_ushort2(int);
6761ushort2 __ovld __cnfn as_ushort2(uint);
6762ushort2 __ovld __cnfn as_ushort2(float);
6763
6764ushort3 __ovld __cnfn as_ushort3(char8);
6765ushort3 __ovld __cnfn as_ushort3(uchar8);
6766ushort3 __ovld __cnfn as_ushort3(short3);
6767ushort3 __ovld __cnfn as_ushort3(short4);
6768ushort3 __ovld __cnfn as_ushort3(ushort3);
6769ushort3 __ovld __cnfn as_ushort3(ushort4);
6770ushort3 __ovld __cnfn as_ushort3(int2);
6771ushort3 __ovld __cnfn as_ushort3(uint2);
6772ushort3 __ovld __cnfn as_ushort3(long);
6773ushort3 __ovld __cnfn as_ushort3(ulong);
6774ushort3 __ovld __cnfn as_ushort3(float2);
6775
6776ushort4 __ovld __cnfn as_ushort4(char8);
6777ushort4 __ovld __cnfn as_ushort4(uchar8);
6778ushort4 __ovld __cnfn as_ushort4(short3);
6779ushort4 __ovld __cnfn as_ushort4(short4);
6780ushort4 __ovld __cnfn as_ushort4(ushort3);
6781ushort4 __ovld __cnfn as_ushort4(ushort4);
6782ushort4 __ovld __cnfn as_ushort4(int2);
6783ushort4 __ovld __cnfn as_ushort4(uint2);
6784ushort4 __ovld __cnfn as_ushort4(long);
6785ushort4 __ovld __cnfn as_ushort4(ulong);
6786ushort4 __ovld __cnfn as_ushort4(float2);
6787
6788ushort8 __ovld __cnfn as_ushort8(char16);
6789ushort8 __ovld __cnfn as_ushort8(uchar16);
6790ushort8 __ovld __cnfn as_ushort8(short8);
6791ushort8 __ovld __cnfn as_ushort8(ushort8);
6792ushort8 __ovld __cnfn as_ushort8(int3);
6793ushort8 __ovld __cnfn as_ushort8(int4);
6794ushort8 __ovld __cnfn as_ushort8(uint3);
6795ushort8 __ovld __cnfn as_ushort8(uint4);
6796ushort8 __ovld __cnfn as_ushort8(long2);
6797ushort8 __ovld __cnfn as_ushort8(ulong2);
6798ushort8 __ovld __cnfn as_ushort8(float3);
6799ushort8 __ovld __cnfn as_ushort8(float4);
6800
6801ushort16 __ovld __cnfn as_ushort16(short16);
6802ushort16 __ovld __cnfn as_ushort16(ushort16);
6803ushort16 __ovld __cnfn as_ushort16(int8);
6804ushort16 __ovld __cnfn as_ushort16(uint8);
6805ushort16 __ovld __cnfn as_ushort16(long3);
6806ushort16 __ovld __cnfn as_ushort16(long4);
6807ushort16 __ovld __cnfn as_ushort16(ulong3);
6808ushort16 __ovld __cnfn as_ushort16(ulong4);
6809ushort16 __ovld __cnfn as_ushort16(float8);
6810
6811int __ovld __cnfn as_int(char3);
6812int __ovld __cnfn as_int(char4);
6813int __ovld __cnfn as_int(uchar3);
6814int __ovld __cnfn as_int(uchar4);
6815int __ovld __cnfn as_int(short2);
6816int __ovld __cnfn as_int(ushort2);
6817int __ovld __cnfn as_int(int);
6818int __ovld __cnfn as_int(uint);
6819int __ovld __cnfn as_int(float);
6820
6821int2 __ovld __cnfn as_int2(char8);
6822int2 __ovld __cnfn as_int2(uchar8);
6823int2 __ovld __cnfn as_int2(short3);
6824int2 __ovld __cnfn as_int2(short4);
6825int2 __ovld __cnfn as_int2(ushort3);
6826int2 __ovld __cnfn as_int2(ushort4);
6827int2 __ovld __cnfn as_int2(int2);
6828int2 __ovld __cnfn as_int2(uint2);
6829int2 __ovld __cnfn as_int2(long);
6830int2 __ovld __cnfn as_int2(ulong);
6831int2 __ovld __cnfn as_int2(float2);
6832
6833int3 __ovld __cnfn as_int3(char16);
6834int3 __ovld __cnfn as_int3(uchar16);
6835int3 __ovld __cnfn as_int3(short8);
6836int3 __ovld __cnfn as_int3(ushort8);
6837int3 __ovld __cnfn as_int3(int3);
6838int3 __ovld __cnfn as_int3(int4);
6839int3 __ovld __cnfn as_int3(uint3);
6840int3 __ovld __cnfn as_int3(uint4);
6841int3 __ovld __cnfn as_int3(long2);
6842int3 __ovld __cnfn as_int3(ulong2);
6843int3 __ovld __cnfn as_int3(float3);
6844int3 __ovld __cnfn as_int3(float4);
6845
6846int4 __ovld __cnfn as_int4(char16);
6847int4 __ovld __cnfn as_int4(uchar16);
6848int4 __ovld __cnfn as_int4(short8);
6849int4 __ovld __cnfn as_int4(ushort8);
6850int4 __ovld __cnfn as_int4(int3);
6851int4 __ovld __cnfn as_int4(int4);
6852int4 __ovld __cnfn as_int4(uint3);
6853int4 __ovld __cnfn as_int4(uint4);
6854int4 __ovld __cnfn as_int4(long2);
6855int4 __ovld __cnfn as_int4(ulong2);
6856int4 __ovld __cnfn as_int4(float3);
6857int4 __ovld __cnfn as_int4(float4);
6858
6859int8 __ovld __cnfn as_int8(short16);
6860int8 __ovld __cnfn as_int8(ushort16);
6861int8 __ovld __cnfn as_int8(int8);
6862int8 __ovld __cnfn as_int8(uint8);
6863int8 __ovld __cnfn as_int8(long3);
6864int8 __ovld __cnfn as_int8(long4);
6865int8 __ovld __cnfn as_int8(ulong3);
6866int8 __ovld __cnfn as_int8(ulong4);
6867int8 __ovld __cnfn as_int8(float8);
6868
6869int16 __ovld __cnfn as_int16(int16);
6870int16 __ovld __cnfn as_int16(uint16);
6871int16 __ovld __cnfn as_int16(long8);
6872int16 __ovld __cnfn as_int16(ulong8);
6873int16 __ovld __cnfn as_int16(float16);
6874
6875uint __ovld __cnfn as_uint(char3);
6876uint __ovld __cnfn as_uint(char4);
6877uint __ovld __cnfn as_uint(uchar3);
6878uint __ovld __cnfn as_uint(uchar4);
6879uint __ovld __cnfn as_uint(short2);
6880uint __ovld __cnfn as_uint(ushort2);
6881uint __ovld __cnfn as_uint(int);
6882uint __ovld __cnfn as_uint(uint);
6883uint __ovld __cnfn as_uint(float);
6884
6885uint2 __ovld __cnfn as_uint2(char8);
6886uint2 __ovld __cnfn as_uint2(uchar8);
6887uint2 __ovld __cnfn as_uint2(short3);
6888uint2 __ovld __cnfn as_uint2(short4);
6889uint2 __ovld __cnfn as_uint2(ushort3);
6890uint2 __ovld __cnfn as_uint2(ushort4);
6891uint2 __ovld __cnfn as_uint2(int2);
6892uint2 __ovld __cnfn as_uint2(uint2);
6893uint2 __ovld __cnfn as_uint2(long);
6894uint2 __ovld __cnfn as_uint2(ulong);
6895uint2 __ovld __cnfn as_uint2(float2);
6896
6897uint3 __ovld __cnfn as_uint3(char16);
6898uint3 __ovld __cnfn as_uint3(uchar16);
6899uint3 __ovld __cnfn as_uint3(short8);
6900uint3 __ovld __cnfn as_uint3(ushort8);
6901uint3 __ovld __cnfn as_uint3(int3);
6902uint3 __ovld __cnfn as_uint3(int4);
6903uint3 __ovld __cnfn as_uint3(uint3);
6904uint3 __ovld __cnfn as_uint3(uint4);
6905uint3 __ovld __cnfn as_uint3(long2);
6906uint3 __ovld __cnfn as_uint3(ulong2);
6907uint3 __ovld __cnfn as_uint3(float3);
6908uint3 __ovld __cnfn as_uint3(float4);
6909
6910uint4 __ovld __cnfn as_uint4(char16);
6911uint4 __ovld __cnfn as_uint4(uchar16);
6912uint4 __ovld __cnfn as_uint4(short8);
6913uint4 __ovld __cnfn as_uint4(ushort8);
6914uint4 __ovld __cnfn as_uint4(int3);
6915uint4 __ovld __cnfn as_uint4(int4);
6916uint4 __ovld __cnfn as_uint4(uint3);
6917uint4 __ovld __cnfn as_uint4(uint4);
6918uint4 __ovld __cnfn as_uint4(long2);
6919uint4 __ovld __cnfn as_uint4(ulong2);
6920uint4 __ovld __cnfn as_uint4(float3);
6921uint4 __ovld __cnfn as_uint4(float4);
6922
6923uint8 __ovld __cnfn as_uint8(short16);
6924uint8 __ovld __cnfn as_uint8(ushort16);
6925uint8 __ovld __cnfn as_uint8(int8);
6926uint8 __ovld __cnfn as_uint8(uint8);
6927uint8 __ovld __cnfn as_uint8(long3);
6928uint8 __ovld __cnfn as_uint8(long4);
6929uint8 __ovld __cnfn as_uint8(ulong3);
6930uint8 __ovld __cnfn as_uint8(ulong4);
6931uint8 __ovld __cnfn as_uint8(float8);
6932
6933uint16 __ovld __cnfn as_uint16(int16);
6934uint16 __ovld __cnfn as_uint16(uint16);
6935uint16 __ovld __cnfn as_uint16(long8);
6936uint16 __ovld __cnfn as_uint16(ulong8);
6937uint16 __ovld __cnfn as_uint16(float16);
6938
6939long __ovld __cnfn as_long(char8);
6940long __ovld __cnfn as_long(uchar8);
6941long __ovld __cnfn as_long(short3);
6942long __ovld __cnfn as_long(short4);
6943long __ovld __cnfn as_long(ushort3);
6944long __ovld __cnfn as_long(ushort4);
6945long __ovld __cnfn as_long(int2);
6946long __ovld __cnfn as_long(uint2);
6947long __ovld __cnfn as_long(long);
6948long __ovld __cnfn as_long(ulong);
6949long __ovld __cnfn as_long(float2);
6950
6951long2 __ovld __cnfn as_long2(char16);
6952long2 __ovld __cnfn as_long2(uchar16);
6953long2 __ovld __cnfn as_long2(short8);
6954long2 __ovld __cnfn as_long2(ushort8);
6955long2 __ovld __cnfn as_long2(int3);
6956long2 __ovld __cnfn as_long2(int4);
6957long2 __ovld __cnfn as_long2(uint3);
6958long2 __ovld __cnfn as_long2(uint4);
6959long2 __ovld __cnfn as_long2(long2);
6960long2 __ovld __cnfn as_long2(ulong2);
6961long2 __ovld __cnfn as_long2(float3);
6962long2 __ovld __cnfn as_long2(float4);
6963
6964long3 __ovld __cnfn as_long3(short16);
6965long3 __ovld __cnfn as_long3(ushort16);
6966long3 __ovld __cnfn as_long3(int8);
6967long3 __ovld __cnfn as_long3(uint8);
6968long3 __ovld __cnfn as_long3(long3);
6969long3 __ovld __cnfn as_long3(long4);
6970long3 __ovld __cnfn as_long3(ulong3);
6971long3 __ovld __cnfn as_long3(ulong4);
6972long3 __ovld __cnfn as_long3(float8);
6973
6974long4 __ovld __cnfn as_long4(short16);
6975long4 __ovld __cnfn as_long4(ushort16);
6976long4 __ovld __cnfn as_long4(int8);
6977long4 __ovld __cnfn as_long4(uint8);
6978long4 __ovld __cnfn as_long4(long3);
6979long4 __ovld __cnfn as_long4(long4);
6980long4 __ovld __cnfn as_long4(ulong3);
6981long4 __ovld __cnfn as_long4(ulong4);
6982long4 __ovld __cnfn as_long4(float8);
6983
6984long8 __ovld __cnfn as_long8(int16);
6985long8 __ovld __cnfn as_long8(uint16);
6986long8 __ovld __cnfn as_long8(long8);
6987long8 __ovld __cnfn as_long8(ulong8);
6988long8 __ovld __cnfn as_long8(float16);
6989
6990long16 __ovld __cnfn as_long16(long16);
6991long16 __ovld __cnfn as_long16(ulong16);
6992
6993ulong __ovld __cnfn as_ulong(char8);
6994ulong __ovld __cnfn as_ulong(uchar8);
6995ulong __ovld __cnfn as_ulong(short3);
6996ulong __ovld __cnfn as_ulong(short4);
6997ulong __ovld __cnfn as_ulong(ushort3);
6998ulong __ovld __cnfn as_ulong(ushort4);
6999ulong __ovld __cnfn as_ulong(int2);
7000ulong __ovld __cnfn as_ulong(uint2);
7001ulong __ovld __cnfn as_ulong(long);
7002ulong __ovld __cnfn as_ulong(ulong);
7003ulong __ovld __cnfn as_ulong(float2);
7004
7005ulong2 __ovld __cnfn as_ulong2(char16);
7006ulong2 __ovld __cnfn as_ulong2(uchar16);
7007ulong2 __ovld __cnfn as_ulong2(short8);
7008ulong2 __ovld __cnfn as_ulong2(ushort8);
7009ulong2 __ovld __cnfn as_ulong2(int3);
7010ulong2 __ovld __cnfn as_ulong2(int4);
7011ulong2 __ovld __cnfn as_ulong2(uint3);
7012ulong2 __ovld __cnfn as_ulong2(uint4);
7013ulong2 __ovld __cnfn as_ulong2(long2);
7014ulong2 __ovld __cnfn as_ulong2(ulong2);
7015ulong2 __ovld __cnfn as_ulong2(float3);
7016ulong2 __ovld __cnfn as_ulong2(float4);
7017
7018ulong3 __ovld __cnfn as_ulong3(short16);
7019ulong3 __ovld __cnfn as_ulong3(ushort16);
7020ulong3 __ovld __cnfn as_ulong3(int8);
7021ulong3 __ovld __cnfn as_ulong3(uint8);
7022ulong3 __ovld __cnfn as_ulong3(long3);
7023ulong3 __ovld __cnfn as_ulong3(long4);
7024ulong3 __ovld __cnfn as_ulong3(ulong3);
7025ulong3 __ovld __cnfn as_ulong3(ulong4);
7026ulong3 __ovld __cnfn as_ulong3(float8);
7027
7028ulong4 __ovld __cnfn as_ulong4(short16);
7029ulong4 __ovld __cnfn as_ulong4(ushort16);
7030ulong4 __ovld __cnfn as_ulong4(int8);
7031ulong4 __ovld __cnfn as_ulong4(uint8);
7032ulong4 __ovld __cnfn as_ulong4(long3);
7033ulong4 __ovld __cnfn as_ulong4(long4);
7034ulong4 __ovld __cnfn as_ulong4(ulong3);
7035ulong4 __ovld __cnfn as_ulong4(ulong4);
7036ulong4 __ovld __cnfn as_ulong4(float8);
7037
7038ulong8 __ovld __cnfn as_ulong8(int16);
7039ulong8 __ovld __cnfn as_ulong8(uint16);
7040ulong8 __ovld __cnfn as_ulong8(long8);
7041ulong8 __ovld __cnfn as_ulong8(ulong8);
7042ulong8 __ovld __cnfn as_ulong8(float16);
7043
7044ulong16 __ovld __cnfn as_ulong16(long16);
7045ulong16 __ovld __cnfn as_ulong16(ulong16);
7046
7047float __ovld __cnfn as_float(char3);
7048float __ovld __cnfn as_float(char4);
7049float __ovld __cnfn as_float(uchar3);
7050float __ovld __cnfn as_float(uchar4);
7051float __ovld __cnfn as_float(short2);
7052float __ovld __cnfn as_float(ushort2);
7053float __ovld __cnfn as_float(int);
7054float __ovld __cnfn as_float(uint);
7055float __ovld __cnfn as_float(float);
7056
7057float2 __ovld __cnfn as_float2(char8);
7058float2 __ovld __cnfn as_float2(uchar8);
7059float2 __ovld __cnfn as_float2(short3);
7060float2 __ovld __cnfn as_float2(short4);
7061float2 __ovld __cnfn as_float2(ushort3);
7062float2 __ovld __cnfn as_float2(ushort4);
7063float2 __ovld __cnfn as_float2(int2);
7064float2 __ovld __cnfn as_float2(uint2);
7065float2 __ovld __cnfn as_float2(long);
7066float2 __ovld __cnfn as_float2(ulong);
7067float2 __ovld __cnfn as_float2(float2);
7068
7069float3 __ovld __cnfn as_float3(char16);
7070float3 __ovld __cnfn as_float3(uchar16);
7071float3 __ovld __cnfn as_float3(short8);
7072float3 __ovld __cnfn as_float3(ushort8);
7073float3 __ovld __cnfn as_float3(int3);
7074float3 __ovld __cnfn as_float3(int4);
7075float3 __ovld __cnfn as_float3(uint3);
7076float3 __ovld __cnfn as_float3(uint4);
7077float3 __ovld __cnfn as_float3(long2);
7078float3 __ovld __cnfn as_float3(ulong2);
7079float3 __ovld __cnfn as_float3(float3);
7080float3 __ovld __cnfn as_float3(float4);
7081
7082float4 __ovld __cnfn as_float4(char16);
7083float4 __ovld __cnfn as_float4(uchar16);
7084float4 __ovld __cnfn as_float4(short8);
7085float4 __ovld __cnfn as_float4(ushort8);
7086float4 __ovld __cnfn as_float4(int3);
7087float4 __ovld __cnfn as_float4(int4);
7088float4 __ovld __cnfn as_float4(uint3);
7089float4 __ovld __cnfn as_float4(uint4);
7090float4 __ovld __cnfn as_float4(long2);
7091float4 __ovld __cnfn as_float4(ulong2);
7092float4 __ovld __cnfn as_float4(float3);
7093float4 __ovld __cnfn as_float4(float4);
7094
7095float8 __ovld __cnfn as_float8(short16);
7096float8 __ovld __cnfn as_float8(ushort16);
7097float8 __ovld __cnfn as_float8(int8);
7098float8 __ovld __cnfn as_float8(uint8);
7099float8 __ovld __cnfn as_float8(long3);
7100float8 __ovld __cnfn as_float8(long4);
7101float8 __ovld __cnfn as_float8(ulong3);
7102float8 __ovld __cnfn as_float8(ulong4);
7103float8 __ovld __cnfn as_float8(float8);
7104
7105float16 __ovld __cnfn as_float16(int16);
7106float16 __ovld __cnfn as_float16(uint16);
7107float16 __ovld __cnfn as_float16(long8);
7108float16 __ovld __cnfn as_float16(ulong8);
7109float16 __ovld __cnfn as_float16(float16);
71106649
7111#ifdef cl_khr_fp646650#ifdef cl_khr_fp64
7112char8 __ovld __cnfn as_char8(double);6651#define as_double(x) __builtin_astype((x), double)
7113char16 __ovld __cnfn as_char16(double2);6652#define as_double2(x) __builtin_astype((x), double2)
7114uchar8 __ovld __cnfn as_uchar8(double);6653#define as_double3(x) __builtin_astype((x), double3)
7115uchar16 __ovld __cnfn as_uchar16(double2);6654#define as_double4(x) __builtin_astype((x), double4)
7116short3 __ovld __cnfn as_short3(double);6655#define as_double8(x) __builtin_astype((x), double8)
7117short4 __ovld __cnfn as_short4(double);6656#define as_double16(x) __builtin_astype((x), double16)
7118short8 __ovld __cnfn as_short8(double2);
7119short16 __ovld __cnfn as_short16(double3);
7120short16 __ovld __cnfn as_short16(double4);
7121ushort3 __ovld __cnfn as_ushort3(double);
7122ushort4 __ovld __cnfn as_ushort4(double);
7123ushort8 __ovld __cnfn as_ushort8(double2);
7124ushort16 __ovld __cnfn as_ushort16(double3);
7125ushort16 __ovld __cnfn as_ushort16(double4);
7126int2 __ovld __cnfn as_int2(double);
7127int3 __ovld __cnfn as_int3(double2);
7128int4 __ovld __cnfn as_int4(double2);
7129int8 __ovld __cnfn as_int8(double3);
7130int8 __ovld __cnfn as_int8(double4);
7131int16 __ovld __cnfn as_int16(double8);
7132uint2 __ovld __cnfn as_uint2(double);
7133uint3 __ovld __cnfn as_uint3(double2);
7134uint4 __ovld __cnfn as_uint4(double2);
7135uint8 __ovld __cnfn as_uint8(double3);
7136uint8 __ovld __cnfn as_uint8(double4);
7137uint16 __ovld __cnfn as_uint16(double8);
7138long __ovld __cnfn as_long(double);
7139long2 __ovld __cnfn as_long2(double2);
7140long3 __ovld __cnfn as_long3(double3);
7141long3 __ovld __cnfn as_long3(double4);
7142long4 __ovld __cnfn as_long4(double3);
7143long4 __ovld __cnfn as_long4(double4);
7144long8 __ovld __cnfn as_long8(double8);
7145long16 __ovld __cnfn as_long16(double16);
7146ulong __ovld __cnfn as_ulong(double);
7147ulong2 __ovld __cnfn as_ulong2(double2);
7148ulong3 __ovld __cnfn as_ulong3(double3);
7149ulong3 __ovld __cnfn as_ulong3(double4);
7150ulong4 __ovld __cnfn as_ulong4(double3);
7151ulong4 __ovld __cnfn as_ulong4(double4);
7152ulong8 __ovld __cnfn as_ulong8(double8);
7153ulong16 __ovld __cnfn as_ulong16(double16);
7154float2 __ovld __cnfn as_float2(double);
7155float3 __ovld __cnfn as_float3(double2);
7156float4 __ovld __cnfn as_float4(double2);
7157float8 __ovld __cnfn as_float8(double3);
7158float8 __ovld __cnfn as_float8(double4);
7159float16 __ovld __cnfn as_float16(double8);
7160double __ovld __cnfn as_double(char8);
7161double __ovld __cnfn as_double(uchar8);
7162double __ovld __cnfn as_double(short3);
7163double __ovld __cnfn as_double(short4);
7164double __ovld __cnfn as_double(ushort3);
7165double __ovld __cnfn as_double(ushort4);
7166double __ovld __cnfn as_double(int2);
7167double __ovld __cnfn as_double(uint2);
7168double __ovld __cnfn as_double(long);
7169double __ovld __cnfn as_double(ulong);
7170double __ovld __cnfn as_double(float2);
7171double __ovld __cnfn as_double(double);
7172double2 __ovld __cnfn as_double2(char16);
7173double2 __ovld __cnfn as_double2(uchar16);
7174double2 __ovld __cnfn as_double2(short8);
7175double2 __ovld __cnfn as_double2(ushort8);
7176double2 __ovld __cnfn as_double2(int3);
7177double2 __ovld __cnfn as_double2(int4);
7178double2 __ovld __cnfn as_double2(uint3);
7179double2 __ovld __cnfn as_double2(uint4);
7180double2 __ovld __cnfn as_double2(long2);
7181double2 __ovld __cnfn as_double2(ulong2);
7182double2 __ovld __cnfn as_double2(float3);
7183double2 __ovld __cnfn as_double2(float4);
7184double2 __ovld __cnfn as_double2(double2);
7185double3 __ovld __cnfn as_double3(short16);
7186double3 __ovld __cnfn as_double3(ushort16);
7187double3 __ovld __cnfn as_double3(int8);
7188double3 __ovld __cnfn as_double3(uint8);
7189double3 __ovld __cnfn as_double3(long3);
7190double3 __ovld __cnfn as_double3(long4);
7191double3 __ovld __cnfn as_double3(ulong3);
7192double3 __ovld __cnfn as_double3(ulong4);
7193double3 __ovld __cnfn as_double3(float8);
7194double3 __ovld __cnfn as_double3(double3);
7195double3 __ovld __cnfn as_double3(double4);
7196double4 __ovld __cnfn as_double4(short16);
7197double4 __ovld __cnfn as_double4(ushort16);
7198double4 __ovld __cnfn as_double4(int8);
7199double4 __ovld __cnfn as_double4(uint8);
7200double4 __ovld __cnfn as_double4(long3);
7201double4 __ovld __cnfn as_double4(long4);
7202double4 __ovld __cnfn as_double4(ulong3);
7203double4 __ovld __cnfn as_double4(ulong4);
7204double4 __ovld __cnfn as_double4(float8);
7205double4 __ovld __cnfn as_double4(double3);
7206double4 __ovld __cnfn as_double4(double4);
7207double8 __ovld __cnfn as_double8(int16);
7208double8 __ovld __cnfn as_double8(uint16);
7209double8 __ovld __cnfn as_double8(long8);
7210double8 __ovld __cnfn as_double8(ulong8);
7211double8 __ovld __cnfn as_double8(float16);
7212double8 __ovld __cnfn as_double8(double8);
7213double16 __ovld __cnfn as_double16(long16);
7214double16 __ovld __cnfn as_double16(ulong16);
7215double16 __ovld __cnfn as_double16(double16);
7216#endif //cl_khr_fp646657#endif //cl_khr_fp64
72176658
7218#ifdef cl_khr_fp166659#ifdef cl_khr_fp16
7219char2 __ovld __cnfn as_char2(half);6660#define as_half(x) __builtin_astype((x), half)
7220char3 __ovld __cnfn as_char3(half2);6661#define as_half2(x) __builtin_astype((x), half2)
7221char4 __ovld __cnfn as_char4(half2);6662#define as_half3(x) __builtin_astype((x), half3)
7222char8 __ovld __cnfn as_char8(half3);6663#define as_half4(x) __builtin_astype((x), half4)
7223char8 __ovld __cnfn as_char8(half4);6664#define as_half8(x) __builtin_astype((x), half8)
7224char16 __ovld __cnfn as_char16(half8);6665#define as_half16(x) __builtin_astype((x), half16)
7225uchar2 __ovld __cnfn as_uchar2(half);
7226uchar3 __ovld __cnfn as_uchar3(half2);
7227uchar4 __ovld __cnfn as_uchar4(half2);
7228uchar8 __ovld __cnfn as_uchar8(half3);
7229uchar8 __ovld __cnfn as_uchar8(half4);
7230uchar16 __ovld __cnfn as_uchar16(half8);
7231short __ovld __cnfn as_short(half);
7232short2 __ovld __cnfn as_short2(half2);
7233short3 __ovld __cnfn as_short3(half3);
7234short3 __ovld __cnfn as_short3(half4);
7235short4 __ovld __cnfn as_short4(half3);
7236short4 __ovld __cnfn as_short4(half4);
7237short8 __ovld __cnfn as_short8(half8);
7238short16 __ovld __cnfn as_short16(half16);
7239ushort __ovld __cnfn as_ushort(half);
7240ushort2 __ovld __cnfn as_ushort2(half2);
7241ushort3 __ovld __cnfn as_ushort3(half3);
7242ushort3 __ovld __cnfn as_ushort3(half4);
7243ushort4 __ovld __cnfn as_ushort4(half3);
7244ushort4 __ovld __cnfn as_ushort4(half4);
7245ushort8 __ovld __cnfn as_ushort8(half8);
7246ushort16 __ovld __cnfn as_ushort16(half16);
7247int __ovld __cnfn as_int(half2);
7248int2 __ovld __cnfn as_int2(half3);
7249int2 __ovld __cnfn as_int2(half4);
7250int3 __ovld __cnfn as_int3(half8);
7251int4 __ovld __cnfn as_int4(half8);
7252int8 __ovld __cnfn as_int8(half16);
7253uint __ovld __cnfn as_uint(half2);
7254uint2 __ovld __cnfn as_uint2(half3);
7255uint2 __ovld __cnfn as_uint2(half4);
7256uint3 __ovld __cnfn as_uint3(half8);
7257uint4 __ovld __cnfn as_uint4(half8);
7258uint8 __ovld __cnfn as_uint8(half16);
7259long __ovld __cnfn as_long(half3);
7260long __ovld __cnfn as_long(half4);
7261long2 __ovld __cnfn as_long2(half8);
7262long3 __ovld __cnfn as_long3(half16);
7263long4 __ovld __cnfn as_long4(half16);
7264ulong __ovld __cnfn as_ulong(half3);
7265ulong __ovld __cnfn as_ulong(half4);
7266ulong2 __ovld __cnfn as_ulong2(half8);
7267ulong3 __ovld __cnfn as_ulong3(half16);
7268ulong4 __ovld __cnfn as_ulong4(half16);
7269half __ovld __cnfn as_half(char2);
7270half __ovld __cnfn as_half(uchar2);
7271half __ovld __cnfn as_half(short);
7272half __ovld __cnfn as_half(ushort);
7273half __ovld __cnfn as_half(half);
7274half2 __ovld __cnfn as_half2(char3);
7275half2 __ovld __cnfn as_half2(char4);
7276half2 __ovld __cnfn as_half2(uchar3);
7277half2 __ovld __cnfn as_half2(uchar4);
7278half2 __ovld __cnfn as_half2(short2);
7279half2 __ovld __cnfn as_half2(ushort2);
7280half2 __ovld __cnfn as_half2(int);
7281half2 __ovld __cnfn as_half2(uint);
7282half2 __ovld __cnfn as_half2(half2);
7283half2 __ovld __cnfn as_half2(float);
7284half3 __ovld __cnfn as_half3(char8);
7285half3 __ovld __cnfn as_half3(uchar8);
7286half3 __ovld __cnfn as_half3(short3);
7287half3 __ovld __cnfn as_half3(short4);
7288half3 __ovld __cnfn as_half3(ushort3);
7289half3 __ovld __cnfn as_half3(ushort4);
7290half3 __ovld __cnfn as_half3(int2);
7291half3 __ovld __cnfn as_half3(uint2);
7292half3 __ovld __cnfn as_half3(long);
7293half3 __ovld __cnfn as_half3(ulong);
7294half3 __ovld __cnfn as_half3(half3);
7295half3 __ovld __cnfn as_half3(half4);
7296half3 __ovld __cnfn as_half3(float2);
7297half4 __ovld __cnfn as_half4(char8);
7298half4 __ovld __cnfn as_half4(uchar8);
7299half4 __ovld __cnfn as_half4(short3);
7300half4 __ovld __cnfn as_half4(short4);
7301half4 __ovld __cnfn as_half4(ushort3);
7302half4 __ovld __cnfn as_half4(ushort4);
7303half4 __ovld __cnfn as_half4(int2);
7304half4 __ovld __cnfn as_half4(uint2);
7305half4 __ovld __cnfn as_half4(long);
7306half4 __ovld __cnfn as_half4(ulong);
7307half4 __ovld __cnfn as_half4(half3);
7308half4 __ovld __cnfn as_half4(half4);
7309half4 __ovld __cnfn as_half4(float2);
7310half8 __ovld __cnfn as_half8(char16);
7311half8 __ovld __cnfn as_half8(uchar16);
7312half8 __ovld __cnfn as_half8(short8);
7313half8 __ovld __cnfn as_half8(ushort8);
7314half8 __ovld __cnfn as_half8(int3);
7315half8 __ovld __cnfn as_half8(int4);
7316half8 __ovld __cnfn as_half8(uint3);
7317half8 __ovld __cnfn as_half8(uint4);
7318half8 __ovld __cnfn as_half8(long2);
7319half8 __ovld __cnfn as_half8(ulong2);
7320half8 __ovld __cnfn as_half8(half8);
7321half8 __ovld __cnfn as_half8(float3);
7322half8 __ovld __cnfn as_half8(float4);
7323half16 __ovld __cnfn as_half16(short16);
7324half16 __ovld __cnfn as_half16(ushort16);
7325half16 __ovld __cnfn as_half16(int8);
7326half16 __ovld __cnfn as_half16(uint8);
7327half16 __ovld __cnfn as_half16(long3);
7328half16 __ovld __cnfn as_half16(long4);
7329half16 __ovld __cnfn as_half16(ulong3);
7330half16 __ovld __cnfn as_half16(ulong4);
7331half16 __ovld __cnfn as_half16(half16);
7332half16 __ovld __cnfn as_half16(float8);
7333float __ovld __cnfn as_float(half2);
7334float2 __ovld __cnfn as_float2(half3);
7335float2 __ovld __cnfn as_float2(half4);
7336float3 __ovld __cnfn as_float3(half8);
7337float4 __ovld __cnfn as_float4(half8);
7338float8 __ovld __cnfn as_float8(half16);
7339
7340#ifdef cl_khr_fp64
7341half3 __ovld __cnfn as_half3(double);
7342half4 __ovld __cnfn as_half4(double);
7343half8 __ovld __cnfn as_half8(double2);
7344half16 __ovld __cnfn as_half16(double3);
7345half16 __ovld __cnfn as_half16(double4);
7346double __ovld __cnfn as_double(half3);
7347double __ovld __cnfn as_double(half4);
7348double2 __ovld __cnfn as_double2(half8);
7349double3 __ovld __cnfn as_double3(half16);
7350double4 __ovld __cnfn as_double4(half16);
7351#endif //cl_khr_fp64
7352#endif //cl_khr_fp166666#endif //cl_khr_fp16
73536667
7354// OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers6668// OpenCL v1.1 s6.9, v1.2/2.0 s6.10 - Function qualifiers
...@@ -14389,10 +13703,10 @@ float __ovld atomic_xchg(volatile __local float *p, float val);...@@ -14389,10 +13703,10 @@ float __ovld atomic_xchg(volatile __local float *p, float val);
1438913703
14390#if defined(cl_khr_global_int32_base_atomics)13704#if defined(cl_khr_global_int32_base_atomics)
14391int __ovld atom_xchg(volatile __global int *p, int val);13705int __ovld atom_xchg(volatile __global int *p, int val);
14392int __ovld atom_xchg(volatile __local int *p, int val);13706unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val);
14393#endif13707#endif
14394#if defined(cl_khr_local_int32_base_atomics)13708#if defined(cl_khr_local_int32_base_atomics)
14395unsigned int __ovld atom_xchg(volatile __global unsigned int *p, unsigned int val);13709int __ovld atom_xchg(volatile __local int *p, int val);
14396unsigned int __ovld atom_xchg(volatile __local unsigned int *p, unsigned int val);13710unsigned int __ovld atom_xchg(volatile __local unsigned int *p, unsigned int val);
14397#endif13711#endif
1439813712
...@@ -14509,8 +13823,6 @@ unsigned int __ovld atom_min(volatile __local unsigned int *p, unsigned int val)...@@ -14509,8 +13823,6 @@ unsigned int __ovld atom_min(volatile __local unsigned int *p, unsigned int val)
14509#if defined(cl_khr_int64_extended_atomics)13823#if defined(cl_khr_int64_extended_atomics)
14510long __ovld atom_min(volatile __global long *p, long val);13824long __ovld atom_min(volatile __global long *p, long val);
14511unsigned long __ovld atom_min(volatile __global unsigned long *p, unsigned long val);13825unsigned long __ovld atom_min(volatile __global unsigned long *p, unsigned long val);
14512#endif
14513#if defined(cl_khr_local_int32_extended_atomics)
14514long __ovld atom_min(volatile __local long *p, long val);13826long __ovld atom_min(volatile __local long *p, long val);
14515unsigned long __ovld atom_min(volatile __local unsigned long *p, unsigned long val);13827unsigned long __ovld atom_min(volatile __local unsigned long *p, unsigned long val);
14516#endif13828#endif
...@@ -15650,6 +14962,7 @@ float __purefn __ovld read_imagef(read_only image2d_array_msaa_depth_t image, in...@@ -15650,6 +14962,7 @@ float __purefn __ovld read_imagef(read_only image2d_array_msaa_depth_t image, in
15650#endif //cl_khr_gl_msaa_sharing14962#endif //cl_khr_gl_msaa_sharing
1565114963
15652// OpenCL Extension v2.0 s9.18 - Mipmaps14964// OpenCL Extension v2.0 s9.18 - Mipmaps
14965#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
15653#ifdef cl_khr_mipmap_image14966#ifdef cl_khr_mipmap_image
1565414967
15655float4 __purefn __ovld read_imagef(read_only image1d_t image, sampler_t sampler, float coord, float lod);14968float4 __purefn __ovld read_imagef(read_only image1d_t image, sampler_t sampler, float coord, float lod);
...@@ -15725,6 +15038,7 @@ int4 __purefn __ovld read_imagei(read_only image3d_t image, sampler_t sampler, f...@@ -15725,6 +15038,7 @@ int4 __purefn __ovld read_imagei(read_only image3d_t image, sampler_t sampler, f
15725uint4 __purefn __ovld read_imageui(read_only image3d_t image, sampler_t sampler, float4 coord, float lod);15038uint4 __purefn __ovld read_imageui(read_only image3d_t image, sampler_t sampler, float4 coord, float lod);
1572615039
15727#endif //cl_khr_mipmap_image15040#endif //cl_khr_mipmap_image
15041#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1572815042
15729/**15043/**
15730* Sampler-less Image Access15044* Sampler-less Image Access
...@@ -15823,6 +15137,7 @@ float __purefn __ovld read_imagef(read_write image2d_msaa_depth_t image, int2 co...@@ -15823,6 +15137,7 @@ float __purefn __ovld read_imagef(read_write image2d_msaa_depth_t image, int2 co
15823float __purefn __ovld read_imagef(read_write image2d_array_msaa_depth_t image, int4 coord, int sample);15137float __purefn __ovld read_imagef(read_write image2d_array_msaa_depth_t image, int4 coord, int sample);
15824#endif //cl_khr_gl_msaa_sharing15138#endif //cl_khr_gl_msaa_sharing
1582515139
15140#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
15826#ifdef cl_khr_mipmap_image15141#ifdef cl_khr_mipmap_image
15827float4 __purefn __ovld read_imagef(read_write image1d_t image, sampler_t sampler, float coord, float lod);15142float4 __purefn __ovld read_imagef(read_write image1d_t image, sampler_t sampler, float coord, float lod);
15828int4 __purefn __ovld read_imagei(read_write image1d_t image, sampler_t sampler, float coord, float lod);15143int4 __purefn __ovld read_imagei(read_write image1d_t image, sampler_t sampler, float coord, float lod);
...@@ -15896,6 +15211,7 @@ float4 __purefn __ovld read_imagef(read_write image3d_t image, sampler_t sampler...@@ -15896,6 +15211,7 @@ float4 __purefn __ovld read_imagef(read_write image3d_t image, sampler_t sampler
15896int4 __purefn __ovld read_imagei(read_write image3d_t image, sampler_t sampler, float4 coord, float lod);15211int4 __purefn __ovld read_imagei(read_write image3d_t image, sampler_t sampler, float4 coord, float lod);
15897uint4 __purefn __ovld read_imageui(read_write image3d_t image, sampler_t sampler, float4 coord, float lod);15212uint4 __purefn __ovld read_imageui(read_write image3d_t image, sampler_t sampler, float4 coord, float lod);
15898#endif //cl_khr_mipmap_image15213#endif //cl_khr_mipmap_image
15214#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1589915215
15900// Image read functions returning half4 type15216// Image read functions returning half4 type
15901#ifdef cl_khr_fp1615217#ifdef cl_khr_fp16
...@@ -15995,9 +15311,11 @@ void __ovld write_imagef(write_only image1d_array_t image_array, int2 coord, flo...@@ -15995,9 +15311,11 @@ void __ovld write_imagef(write_only image1d_array_t image_array, int2 coord, flo
15995void __ovld write_imagei(write_only image1d_array_t image_array, int2 coord, int4 color);15311void __ovld write_imagei(write_only image1d_array_t image_array, int2 coord, int4 color);
15996void __ovld write_imageui(write_only image1d_array_t image_array, int2 coord, uint4 color);15312void __ovld write_imageui(write_only image1d_array_t image_array, int2 coord, uint4 color);
1599715313
15314#ifdef cl_khr_3d_image_writes
15998void __ovld write_imagef(write_only image3d_t image, int4 coord, float4 color);15315void __ovld write_imagef(write_only image3d_t image, int4 coord, float4 color);
15999void __ovld write_imagei(write_only image3d_t image, int4 coord, int4 color);15316void __ovld write_imagei(write_only image3d_t image, int4 coord, int4 color);
16000void __ovld write_imageui(write_only image3d_t image, int4 coord, uint4 color);15317void __ovld write_imageui(write_only image3d_t image, int4 coord, uint4 color);
15318#endif
1600115319
16002#ifdef cl_khr_depth_images15320#ifdef cl_khr_depth_images
16003void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, float color);15321void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, float color);
...@@ -16005,6 +15323,7 @@ void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, flo...@@ -16005,6 +15323,7 @@ void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, flo
16005#endif //cl_khr_depth_images15323#endif //cl_khr_depth_images
1600615324
16007// OpenCL Extension v2.0 s9.18 - Mipmaps15325// OpenCL Extension v2.0 s9.18 - Mipmaps
15326#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16008#ifdef cl_khr_mipmap_image15327#ifdef cl_khr_mipmap_image
16009void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color);15328void __ovld write_imagef(write_only image1d_t image, int coord, int lod, float4 color);
16010void __ovld write_imagei(write_only image1d_t image, int coord, int lod, int4 color);15329void __ovld write_imagei(write_only image1d_t image, int coord, int lod, int4 color);
...@@ -16025,16 +15344,21 @@ void __ovld write_imageui(write_only image2d_array_t image_array, int4 coord, in...@@ -16025,16 +15344,21 @@ void __ovld write_imageui(write_only image2d_array_t image_array, int4 coord, in
16025void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float color);15344void __ovld write_imagef(write_only image2d_depth_t image, int2 coord, int lod, float color);
16026void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float color);15345void __ovld write_imagef(write_only image2d_array_depth_t image, int4 coord, int lod, float color);
1602715346
15347#ifdef cl_khr_3d_image_writes
16028void __ovld write_imagef(write_only image3d_t image, int4 coord, int lod, float4 color);15348void __ovld write_imagef(write_only image3d_t image, int4 coord, int lod, float4 color);
16029void __ovld write_imagei(write_only image3d_t image, int4 coord, int lod, int4 color);15349void __ovld write_imagei(write_only image3d_t image, int4 coord, int lod, int4 color);
16030void __ovld write_imageui(write_only image3d_t image, int4 coord, int lod, uint4 color);15350void __ovld write_imageui(write_only image3d_t image, int4 coord, int lod, uint4 color);
15351#endif
16031#endif //cl_khr_mipmap_image15352#endif //cl_khr_mipmap_image
15353#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1603215354
16033// Image write functions for half4 type15355// Image write functions for half4 type
16034#ifdef cl_khr_fp1615356#ifdef cl_khr_fp16
16035void __ovld write_imageh(write_only image1d_t image, int coord, half4 color);15357void __ovld write_imageh(write_only image1d_t image, int coord, half4 color);
16036void __ovld write_imageh(write_only image2d_t image, int2 coord, half4 color);15358void __ovld write_imageh(write_only image2d_t image, int2 coord, half4 color);
15359#ifdef cl_khr_3d_image_writes
16037void __ovld write_imageh(write_only image3d_t image, int4 coord, half4 color);15360void __ovld write_imageh(write_only image3d_t image, int4 coord, half4 color);
15361#endif
16038void __ovld write_imageh(write_only image1d_array_t image, int2 coord, half4 color);15362void __ovld write_imageh(write_only image1d_array_t image, int2 coord, half4 color);
16039void __ovld write_imageh(write_only image2d_array_t image, int4 coord, half4 color);15363void __ovld write_imageh(write_only image2d_array_t image, int4 coord, half4 color);
16040void __ovld write_imageh(write_only image1d_buffer_t image, int coord, half4 color);15364void __ovld write_imageh(write_only image1d_buffer_t image, int coord, half4 color);
...@@ -16062,15 +15386,18 @@ void __ovld write_imagef(read_write image1d_array_t image_array, int2 coord, flo...@@ -16062,15 +15386,18 @@ void __ovld write_imagef(read_write image1d_array_t image_array, int2 coord, flo
16062void __ovld write_imagei(read_write image1d_array_t image_array, int2 coord, int4 color);15386void __ovld write_imagei(read_write image1d_array_t image_array, int2 coord, int4 color);
16063void __ovld write_imageui(read_write image1d_array_t image_array, int2 coord, uint4 color);15387void __ovld write_imageui(read_write image1d_array_t image_array, int2 coord, uint4 color);
1606415388
15389#ifdef cl_khr_3d_image_writes
16065void __ovld write_imagef(read_write image3d_t image, int4 coord, float4 color);15390void __ovld write_imagef(read_write image3d_t image, int4 coord, float4 color);
16066void __ovld write_imagei(read_write image3d_t image, int4 coord, int4 color);15391void __ovld write_imagei(read_write image3d_t image, int4 coord, int4 color);
16067void __ovld write_imageui(read_write image3d_t image, int4 coord, uint4 color);15392void __ovld write_imageui(read_write image3d_t image, int4 coord, uint4 color);
15393#endif
1606815394
16069#ifdef cl_khr_depth_images15395#ifdef cl_khr_depth_images
16070void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, float color);15396void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, float color);
16071void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, float color);15397void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, float color);
16072#endif //cl_khr_depth_images15398#endif //cl_khr_depth_images
1607315399
15400#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16074#ifdef cl_khr_mipmap_image15401#ifdef cl_khr_mipmap_image
16075void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color);15402void __ovld write_imagef(read_write image1d_t image, int coord, int lod, float4 color);
16076void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color);15403void __ovld write_imagei(read_write image1d_t image, int coord, int lod, int4 color);
...@@ -16091,16 +15418,21 @@ void __ovld write_imageui(read_write image2d_array_t image_array, int4 coord, in...@@ -16091,16 +15418,21 @@ void __ovld write_imageui(read_write image2d_array_t image_array, int4 coord, in
16091void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, int lod, float color);15418void __ovld write_imagef(read_write image2d_depth_t image, int2 coord, int lod, float color);
16092void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, int lod, float color);15419void __ovld write_imagef(read_write image2d_array_depth_t image, int4 coord, int lod, float color);
1609315420
15421#ifdef cl_khr_3d_image_writes
16094void __ovld write_imagef(read_write image3d_t image, int4 coord, int lod, float4 color);15422void __ovld write_imagef(read_write image3d_t image, int4 coord, int lod, float4 color);
16095void __ovld write_imagei(read_write image3d_t image, int4 coord, int lod, int4 color);15423void __ovld write_imagei(read_write image3d_t image, int4 coord, int lod, int4 color);
16096void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 color);15424void __ovld write_imageui(read_write image3d_t image, int4 coord, int lod, uint4 color);
15425#endif
16097#endif //cl_khr_mipmap_image15426#endif //cl_khr_mipmap_image
15427#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1609815428
16099// Image write functions for half4 type15429// Image write functions for half4 type
16100#ifdef cl_khr_fp1615430#ifdef cl_khr_fp16
16101void __ovld write_imageh(read_write image1d_t image, int coord, half4 color);15431void __ovld write_imageh(read_write image1d_t image, int coord, half4 color);
16102void __ovld write_imageh(read_write image2d_t image, int2 coord, half4 color);15432void __ovld write_imageh(read_write image2d_t image, int2 coord, half4 color);
15433#ifdef cl_khr_3d_image_writes
16103void __ovld write_imageh(read_write image3d_t image, int4 coord, half4 color);15434void __ovld write_imageh(read_write image3d_t image, int4 coord, half4 color);
15435#endif
16104void __ovld write_imageh(read_write image1d_array_t image, int2 coord, half4 color);15436void __ovld write_imageh(read_write image1d_array_t image, int2 coord, half4 color);
16105void __ovld write_imageh(read_write image2d_array_t image, int4 coord, half4 color);15437void __ovld write_imageh(read_write image2d_array_t image, int4 coord, half4 color);
16106void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 color);15438void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 color);
...@@ -16118,7 +15450,9 @@ void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 col...@@ -16118,7 +15450,9 @@ void __ovld write_imageh(read_write image1d_buffer_t image, int coord, half4 col
16118int __ovld __cnfn get_image_width(read_only image1d_t image);15450int __ovld __cnfn get_image_width(read_only image1d_t image);
16119int __ovld __cnfn get_image_width(read_only image1d_buffer_t image);15451int __ovld __cnfn get_image_width(read_only image1d_buffer_t image);
16120int __ovld __cnfn get_image_width(read_only image2d_t image);15452int __ovld __cnfn get_image_width(read_only image2d_t image);
15453#ifdef cl_khr_3d_image_writes
16121int __ovld __cnfn get_image_width(read_only image3d_t image);15454int __ovld __cnfn get_image_width(read_only image3d_t image);
15455#endif
16122int __ovld __cnfn get_image_width(read_only image1d_array_t image);15456int __ovld __cnfn get_image_width(read_only image1d_array_t image);
16123int __ovld __cnfn get_image_width(read_only image2d_array_t image);15457int __ovld __cnfn get_image_width(read_only image2d_array_t image);
16124#ifdef cl_khr_depth_images15458#ifdef cl_khr_depth_images
...@@ -16135,7 +15469,9 @@ int __ovld __cnfn get_image_width(read_only image2d_array_msaa_depth_t image);...@@ -16135,7 +15469,9 @@ int __ovld __cnfn get_image_width(read_only image2d_array_msaa_depth_t image);
16135int __ovld __cnfn get_image_width(write_only image1d_t image);15469int __ovld __cnfn get_image_width(write_only image1d_t image);
16136int __ovld __cnfn get_image_width(write_only image1d_buffer_t image);15470int __ovld __cnfn get_image_width(write_only image1d_buffer_t image);
16137int __ovld __cnfn get_image_width(write_only image2d_t image);15471int __ovld __cnfn get_image_width(write_only image2d_t image);
15472#ifdef cl_khr_3d_image_writes
16138int __ovld __cnfn get_image_width(write_only image3d_t image);15473int __ovld __cnfn get_image_width(write_only image3d_t image);
15474#endif
16139int __ovld __cnfn get_image_width(write_only image1d_array_t image);15475int __ovld __cnfn get_image_width(write_only image1d_array_t image);
16140int __ovld __cnfn get_image_width(write_only image2d_array_t image);15476int __ovld __cnfn get_image_width(write_only image2d_array_t image);
16141#ifdef cl_khr_depth_images15477#ifdef cl_khr_depth_images
...@@ -16186,7 +15522,9 @@ int __ovld __cnfn get_image_height(read_only image2d_array_msaa_depth_t image);...@@ -16186,7 +15522,9 @@ int __ovld __cnfn get_image_height(read_only image2d_array_msaa_depth_t image);
16186#endif //cl_khr_gl_msaa_sharing15522#endif //cl_khr_gl_msaa_sharing
1618715523
16188int __ovld __cnfn get_image_height(write_only image2d_t image);15524int __ovld __cnfn get_image_height(write_only image2d_t image);
15525#ifdef cl_khr_3d_image_writes
16189int __ovld __cnfn get_image_height(write_only image3d_t image);15526int __ovld __cnfn get_image_height(write_only image3d_t image);
15527#endif
16190int __ovld __cnfn get_image_height(write_only image2d_array_t image);15528int __ovld __cnfn get_image_height(write_only image2d_array_t image);
16191#ifdef cl_khr_depth_images15529#ifdef cl_khr_depth_images
16192int __ovld __cnfn get_image_height(write_only image2d_depth_t image);15530int __ovld __cnfn get_image_height(write_only image2d_depth_t image);
...@@ -16220,13 +15558,16 @@ int __ovld __cnfn get_image_height(read_write image2d_array_msaa_depth_t image);...@@ -16220,13 +15558,16 @@ int __ovld __cnfn get_image_height(read_write image2d_array_msaa_depth_t image);
16220 */15558 */
16221int __ovld __cnfn get_image_depth(read_only image3d_t image);15559int __ovld __cnfn get_image_depth(read_only image3d_t image);
1622215560
15561#ifdef cl_khr_3d_image_writes
16223int __ovld __cnfn get_image_depth(write_only image3d_t image);15562int __ovld __cnfn get_image_depth(write_only image3d_t image);
15563#endif
1622415564
16225#if __OPENCL_C_VERSION__ >= CL_VERSION_2_015565#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16226int __ovld __cnfn get_image_depth(read_write image3d_t image);15566int __ovld __cnfn get_image_depth(read_write image3d_t image);
16227#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_015567#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1622815568
16229// OpenCL Extension v2.0 s9.18 - Mipmaps15569// OpenCL Extension v2.0 s9.18 - Mipmaps
15570#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16230#ifdef cl_khr_mipmap_image15571#ifdef cl_khr_mipmap_image
16231/**15572/**
16232 * Return the image miplevels.15573 * Return the image miplevels.
...@@ -16238,13 +15579,13 @@ int __ovld get_image_num_mip_levels(read_only image3d_t image);...@@ -16238,13 +15579,13 @@ int __ovld get_image_num_mip_levels(read_only image3d_t image);
1623815579
16239int __ovld get_image_num_mip_levels(write_only image1d_t image);15580int __ovld get_image_num_mip_levels(write_only image1d_t image);
16240int __ovld get_image_num_mip_levels(write_only image2d_t image);15581int __ovld get_image_num_mip_levels(write_only image2d_t image);
15582#ifdef cl_khr_3d_image_writes
16241int __ovld get_image_num_mip_levels(write_only image3d_t image);15583int __ovld get_image_num_mip_levels(write_only image3d_t image);
15584#endif
1624215585
16243#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16244int __ovld get_image_num_mip_levels(read_write image1d_t image);15586int __ovld get_image_num_mip_levels(read_write image1d_t image);
16245int __ovld get_image_num_mip_levels(read_write image2d_t image);15587int __ovld get_image_num_mip_levels(read_write image2d_t image);
16246int __ovld get_image_num_mip_levels(read_write image3d_t image);15588int __ovld get_image_num_mip_levels(read_write image3d_t image);
16247#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1624815589
16249int __ovld get_image_num_mip_levels(read_only image1d_array_t image);15590int __ovld get_image_num_mip_levels(read_only image1d_array_t image);
16250int __ovld get_image_num_mip_levels(read_only image2d_array_t image);15591int __ovld get_image_num_mip_levels(read_only image2d_array_t image);
...@@ -16256,14 +15597,13 @@ int __ovld get_image_num_mip_levels(write_only image2d_array_t image);...@@ -16256,14 +15597,13 @@ int __ovld get_image_num_mip_levels(write_only image2d_array_t image);
16256int __ovld get_image_num_mip_levels(write_only image2d_array_depth_t image);15597int __ovld get_image_num_mip_levels(write_only image2d_array_depth_t image);
16257int __ovld get_image_num_mip_levels(write_only image2d_depth_t image);15598int __ovld get_image_num_mip_levels(write_only image2d_depth_t image);
1625815599
16259#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16260int __ovld get_image_num_mip_levels(read_write image1d_array_t image);15600int __ovld get_image_num_mip_levels(read_write image1d_array_t image);
16261int __ovld get_image_num_mip_levels(read_write image2d_array_t image);15601int __ovld get_image_num_mip_levels(read_write image2d_array_t image);
16262int __ovld get_image_num_mip_levels(read_write image2d_array_depth_t image);15602int __ovld get_image_num_mip_levels(read_write image2d_array_depth_t image);
16263int __ovld get_image_num_mip_levels(read_write image2d_depth_t image);15603int __ovld get_image_num_mip_levels(read_write image2d_depth_t image);
16264#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1626515604
16266#endif //cl_khr_mipmap_image15605#endif //cl_khr_mipmap_image
15606#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
1626715607
16268/**15608/**
16269 * Return the channel data type. Valid values are:15609 * Return the channel data type. Valid values are:
...@@ -16324,7 +15664,9 @@ int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_msaa_depth...@@ -16324,7 +15664,9 @@ int __ovld __cnfn get_image_channel_data_type(read_only image2d_array_msaa_depth
16324int __ovld __cnfn get_image_channel_data_type(write_only image1d_t image);15664int __ovld __cnfn get_image_channel_data_type(write_only image1d_t image);
16325int __ovld __cnfn get_image_channel_data_type(write_only image1d_buffer_t image);15665int __ovld __cnfn get_image_channel_data_type(write_only image1d_buffer_t image);
16326int __ovld __cnfn get_image_channel_data_type(write_only image2d_t image);15666int __ovld __cnfn get_image_channel_data_type(write_only image2d_t image);
15667#ifdef cl_khr_3d_image_writes
16327int __ovld __cnfn get_image_channel_data_type(write_only image3d_t image);15668int __ovld __cnfn get_image_channel_data_type(write_only image3d_t image);
15669#endif
16328int __ovld __cnfn get_image_channel_data_type(write_only image1d_array_t image);15670int __ovld __cnfn get_image_channel_data_type(write_only image1d_array_t image);
16329int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_t image);15671int __ovld __cnfn get_image_channel_data_type(write_only image2d_array_t image);
16330#ifdef cl_khr_depth_images15672#ifdef cl_khr_depth_images
...@@ -16418,7 +15760,9 @@ int __ovld __cnfn get_image_channel_order(read_only image2d_array_msaa_depth_t i...@@ -16418,7 +15760,9 @@ int __ovld __cnfn get_image_channel_order(read_only image2d_array_msaa_depth_t i
16418int __ovld __cnfn get_image_channel_order(write_only image1d_t image);15760int __ovld __cnfn get_image_channel_order(write_only image1d_t image);
16419int __ovld __cnfn get_image_channel_order(write_only image1d_buffer_t image);15761int __ovld __cnfn get_image_channel_order(write_only image1d_buffer_t image);
16420int __ovld __cnfn get_image_channel_order(write_only image2d_t image);15762int __ovld __cnfn get_image_channel_order(write_only image2d_t image);
15763#ifdef cl_khr_3d_image_writes
16421int __ovld __cnfn get_image_channel_order(write_only image3d_t image);15764int __ovld __cnfn get_image_channel_order(write_only image3d_t image);
15765#endif
16422int __ovld __cnfn get_image_channel_order(write_only image1d_array_t image);15766int __ovld __cnfn get_image_channel_order(write_only image1d_array_t image);
16423int __ovld __cnfn get_image_channel_order(write_only image2d_array_t image);15767int __ovld __cnfn get_image_channel_order(write_only image2d_array_t image);
16424#ifdef cl_khr_depth_images15768#ifdef cl_khr_depth_images
...@@ -16504,7 +15848,9 @@ int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_depth_t image);...@@ -16504,7 +15848,9 @@ int2 __ovld __cnfn get_image_dim(read_write image2d_array_msaa_depth_t image);
16504 * component and the w component is 0.15848 * component and the w component is 0.
16505 */15849 */
16506int4 __ovld __cnfn get_image_dim(read_only image3d_t image);15850int4 __ovld __cnfn get_image_dim(read_only image3d_t image);
15851#ifdef cl_khr_3d_image_writes
16507int4 __ovld __cnfn get_image_dim(write_only image3d_t image);15852int4 __ovld __cnfn get_image_dim(write_only image3d_t image);
15853#endif
16508#if __OPENCL_C_VERSION__ >= CL_VERSION_2_015854#if __OPENCL_C_VERSION__ >= CL_VERSION_2_0
16509int4 __ovld __cnfn get_image_dim(read_write image3d_t image);15855int4 __ovld __cnfn get_image_dim(read_write image3d_t image);
16510#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_015856#endif //__OPENCL_C_VERSION__ >= CL_VERSION_2_0
...@@ -16714,16 +16060,12 @@ typedef int clk_profiling_info;...@@ -16714,16 +16060,12 @@ typedef int clk_profiling_info;
1671416060
16715#define MAX_WORK_DIM 316061#define MAX_WORK_DIM 3
1671616062
16717// ToDo: Remove definition of ndrange_t in Clang as an opaque type and add back
16718// the following ndrange_t definition.
16719#if 0
16720typedef struct {16063typedef struct {
16721 unsigned int workDimension;16064 unsigned int workDimension;
16722 size_t globalWorkOffset[MAX_WORK_DIM];16065 size_t globalWorkOffset[MAX_WORK_DIM];
16723 size_t globalWorkSize[MAX_WORK_DIM];16066 size_t globalWorkSize[MAX_WORK_DIM];
16724 size_t localWorkSize[MAX_WORK_DIM];16067 size_t localWorkSize[MAX_WORK_DIM];
16725} ndrange_t;16068} ndrange_t;
16726#endif
1672716069
16728ndrange_t __ovld ndrange_1D(size_t);16070ndrange_t __ovld ndrange_1D(size_t);
16729ndrange_t __ovld ndrange_1D(size_t, size_t);16071ndrange_t __ovld ndrange_1D(size_t, size_t);
c_headers/pmmintrin.h+7-13
...@@ -31,9 +31,11 @@...@@ -31,9 +31,11 @@
31 __attribute__((__always_inline__, __nodebug__, __target__("sse3")))31 __attribute__((__always_inline__, __nodebug__, __target__("sse3")))
3232
33/// \brief Loads data from an unaligned memory location to elements in a 128-bit33/// \brief Loads data from an unaligned memory location to elements in a 128-bit
34/// vector. If the address of the data is not 16-byte aligned, the34/// vector.
35/// instruction may read two adjacent aligned blocks of memory to retrieve35///
36/// the requested data.36/// If the address of the data is not 16-byte aligned, the instruction may
37/// read two adjacent aligned blocks of memory to retrieve the requested
38/// data.
37///39///
38/// \headerfile <x86intrin.h>40/// \headerfile <x86intrin.h>
39///41///
...@@ -115,7 +117,7 @@ _mm_hsub_ps(__m128 __a, __m128 __b)...@@ -115,7 +117,7 @@ _mm_hsub_ps(__m128 __a, __m128 __b)
115117
116/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit118/// \brief Moves and duplicates high-order (odd-indexed) values from a 128-bit
117/// vector of [4 x float] to float values stored in a 128-bit vector of119/// vector of [4 x float] to float values stored in a 128-bit vector of
118/// [4 x float]. 120/// [4 x float].
119///121///
120/// \headerfile <x86intrin.h>122/// \headerfile <x86intrin.h>
121///123///
...@@ -136,7 +138,7 @@ _mm_movehdup_ps(__m128 __a)...@@ -136,7 +138,7 @@ _mm_movehdup_ps(__m128 __a)
136}138}
137139
138/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of140/// \brief Duplicates low-order (even-indexed) values from a 128-bit vector of
139/// [4 x float] to float values stored in a 128-bit vector of [4 x float]. 141/// [4 x float] to float values stored in a 128-bit vector of [4 x float].
140///142///
141/// \headerfile <x86intrin.h>143/// \headerfile <x86intrin.h>
142///144///
...@@ -257,14 +259,6 @@ _mm_movedup_pd(__m128d __a)...@@ -257,14 +259,6 @@ _mm_movedup_pd(__m128d __a)
257 return __builtin_shufflevector((__v2df)__a, (__v2df)__a, 0, 0);259 return __builtin_shufflevector((__v2df)__a, (__v2df)__a, 0, 0);
258}260}
259261
260#define _MM_DENORMALS_ZERO_ON (0x0040)
261#define _MM_DENORMALS_ZERO_OFF (0x0000)
262
263#define _MM_DENORMALS_ZERO_MASK (0x0040)
264
265#define _MM_GET_DENORMALS_ZERO_MODE() (_mm_getcsr() & _MM_DENORMALS_ZERO_MASK)
266#define _MM_SET_DENORMALS_ZERO_MODE(x) (_mm_setcsr((_mm_getcsr() & ~_MM_DENORMALS_ZERO_MASK) | (x)))
267
268/// \brief Establishes a linear address memory range to be monitored and puts262/// \brief Establishes a linear address memory range to be monitored and puts
269/// the processor in the monitor event pending state. Data stored in the263/// the processor in the monitor event pending state. Data stored in the
270/// monitored address range causes the processor to exit the pending state.264/// monitored address range causes the processor to exit the pending state.
c_headers/prfchwintrin.h+26
...@@ -29,12 +29,38 @@...@@ -29,12 +29,38 @@
29#define __PRFCHWINTRIN_H29#define __PRFCHWINTRIN_H
3030
31#if defined(__PRFCHW__) || defined(__3dNOW__)31#if defined(__PRFCHW__) || defined(__3dNOW__)
32/// \brief Loads a memory sequence containing the specified memory address into
33/// all data cache levels. The cache-coherency state is set to exclusive.
34/// Data can be read from and written to the cache line without additional
35/// delay.
36///
37/// \headerfile <x86intrin.h>
38///
39/// This intrinsic corresponds to the \c PREFETCHT0 instruction.
40///
41/// \param __P
42/// A pointer specifying the memory address to be prefetched.
32static __inline__ void __attribute__((__always_inline__, __nodebug__))43static __inline__ void __attribute__((__always_inline__, __nodebug__))
33_m_prefetch(void *__P)44_m_prefetch(void *__P)
34{45{
35 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);46 __builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
36}47}
3748
49/// \brief Loads a memory sequence containing the specified memory address into
50/// the L1 data cache and sets the cache-coherency to modified. This
51/// provides a hint to the processor that the cache line will be modified.
52/// It is intended for use when the cache line will be written to shortly
53/// after the prefetch is performed.
54///
55/// Note that the effect of this intrinsic is dependent on the processor
56/// implementation.
57///
58/// \headerfile <x86intrin.h>
59///
60/// This intrinsic corresponds to the \c PREFETCHW instruction.
61///
62/// \param __P
63/// A pointer specifying the memory address to be prefetched.
38static __inline__ void __attribute__((__always_inline__, __nodebug__))64static __inline__ void __attribute__((__always_inline__, __nodebug__))
39_m_prefetchw(void *__P)65_m_prefetchw(void *__P)
40{66{
c_headers/smmintrin.h+1959-1
...@@ -46,37 +46,379 @@...@@ -46,37 +46,379 @@
46#define _MM_FROUND_RINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_CUR_DIRECTION)46#define _MM_FROUND_RINT (_MM_FROUND_RAISE_EXC | _MM_FROUND_CUR_DIRECTION)
47#define _MM_FROUND_NEARBYINT (_MM_FROUND_NO_EXC | _MM_FROUND_CUR_DIRECTION)47#define _MM_FROUND_NEARBYINT (_MM_FROUND_NO_EXC | _MM_FROUND_CUR_DIRECTION)
4848
49/// \brief Rounds up each element of the 128-bit vector of [4 x float] to an
50/// integer and returns the rounded values in a 128-bit vector of
51/// [4 x float].
52///
53/// \headerfile <x86intrin.h>
54///
55/// \code
56/// __m128 _mm_ceil_ps(__m128 X);
57/// \endcode
58///
59/// This intrinsic corresponds to the <c> VROUNDPS / ROUNDPS </c> instruction.
60///
61/// \param X
62/// A 128-bit vector of [4 x float] values to be rounded up.
63/// \returns A 128-bit vector of [4 x float] containing the rounded values.
49#define _mm_ceil_ps(X) _mm_round_ps((X), _MM_FROUND_CEIL)64#define _mm_ceil_ps(X) _mm_round_ps((X), _MM_FROUND_CEIL)
65
66/// \brief Rounds up each element of the 128-bit vector of [2 x double] to an
67/// integer and returns the rounded values in a 128-bit vector of
68/// [2 x double].
69///
70/// \headerfile <x86intrin.h>
71///
72/// \code
73/// __m128d _mm_ceil_pd(__m128d X);
74/// \endcode
75///
76/// This intrinsic corresponds to the <c> VROUNDPD / ROUNDPD </c> instruction.
77///
78/// \param X
79/// A 128-bit vector of [2 x double] values to be rounded up.
80/// \returns A 128-bit vector of [2 x double] containing the rounded values.
50#define _mm_ceil_pd(X) _mm_round_pd((X), _MM_FROUND_CEIL)81#define _mm_ceil_pd(X) _mm_round_pd((X), _MM_FROUND_CEIL)
82
83/// \brief Copies three upper elements of the first 128-bit vector operand to
84/// the corresponding three upper elements of the 128-bit result vector of
85/// [4 x float]. Rounds up the lowest element of the second 128-bit vector
86/// operand to an integer and copies it to the lowest element of the 128-bit
87/// result vector of [4 x float].
88///
89/// \headerfile <x86intrin.h>
90///
91/// \code
92/// __m128 _mm_ceil_ss(__m128 X, __m128 Y);
93/// \endcode
94///
95/// This intrinsic corresponds to the <c> VROUNDSS / ROUNDSS </c> instruction.
96///
97/// \param X
98/// A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
99/// copied to the corresponding bits of the result.
100/// \param Y
101/// A 128-bit vector of [4 x float]. The value stored in bits [31:0] is
102/// rounded up to the nearest integer and copied to the corresponding bits
103/// of the result.
104/// \returns A 128-bit vector of [4 x float] containing the copied and rounded
105/// values.
51#define _mm_ceil_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_CEIL)106#define _mm_ceil_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_CEIL)
107
108/// \brief Copies the upper element of the first 128-bit vector operand to the
109/// corresponding upper element of the 128-bit result vector of [2 x double].
110/// Rounds up the lower element of the second 128-bit vector operand to an
111/// integer and copies it to the lower element of the 128-bit result vector
112/// of [2 x double].
113///
114/// \headerfile <x86intrin.h>
115///
116/// \code
117/// __m128d _mm_ceil_sd(__m128d X, __m128d Y);
118/// \endcode
119///
120/// This intrinsic corresponds to the <c> VROUNDSD / ROUNDSD </c> instruction.
121///
122/// \param X
123/// A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
124/// copied to the corresponding bits of the result.
125/// \param Y
126/// A 128-bit vector of [2 x double]. The value stored in bits [63:0] is
127/// rounded up to the nearest integer and copied to the corresponding bits
128/// of the result.
129/// \returns A 128-bit vector of [2 x double] containing the copied and rounded
130/// values.
52#define _mm_ceil_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_CEIL)131#define _mm_ceil_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_CEIL)
53132
133/// \brief Rounds down each element of the 128-bit vector of [4 x float] to an
134/// an integer and returns the rounded values in a 128-bit vector of
135/// [4 x float].
136///
137/// \headerfile <x86intrin.h>
138///
139/// \code
140/// __m128 _mm_floor_ps(__m128 X);
141/// \endcode
142///
143/// This intrinsic corresponds to the <c> VROUNDPS / ROUNDPS </c> instruction.
144///
145/// \param X
146/// A 128-bit vector of [4 x float] values to be rounded down.
147/// \returns A 128-bit vector of [4 x float] containing the rounded values.
54#define _mm_floor_ps(X) _mm_round_ps((X), _MM_FROUND_FLOOR)148#define _mm_floor_ps(X) _mm_round_ps((X), _MM_FROUND_FLOOR)
149
150/// \brief Rounds down each element of the 128-bit vector of [2 x double] to an
151/// integer and returns the rounded values in a 128-bit vector of
152/// [2 x double].
153///
154/// \headerfile <x86intrin.h>
155///
156/// \code
157/// __m128d _mm_floor_pd(__m128d X);
158/// \endcode
159///
160/// This intrinsic corresponds to the <c> VROUNDPD / ROUNDPD </c> instruction.
161///
162/// \param X
163/// A 128-bit vector of [2 x double].
164/// \returns A 128-bit vector of [2 x double] containing the rounded values.
55#define _mm_floor_pd(X) _mm_round_pd((X), _MM_FROUND_FLOOR)165#define _mm_floor_pd(X) _mm_round_pd((X), _MM_FROUND_FLOOR)
166
167/// \brief Copies three upper elements of the first 128-bit vector operand to
168/// the corresponding three upper elements of the 128-bit result vector of
169/// [4 x float]. Rounds down the lowest element of the second 128-bit vector
170/// operand to an integer and copies it to the lowest element of the 128-bit
171/// result vector of [4 x float].
172///
173/// \headerfile <x86intrin.h>
174///
175/// \code
176/// __m128 _mm_floor_ss(__m128 X, __m128 Y);
177/// \endcode
178///
179/// This intrinsic corresponds to the <c> VROUNDSS / ROUNDSS </c> instruction.
180///
181/// \param X
182/// A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
183/// copied to the corresponding bits of the result.
184/// \param Y
185/// A 128-bit vector of [4 x float]. The value stored in bits [31:0] is
186/// rounded down to the nearest integer and copied to the corresponding bits
187/// of the result.
188/// \returns A 128-bit vector of [4 x float] containing the copied and rounded
189/// values.
56#define _mm_floor_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_FLOOR)190#define _mm_floor_ss(X, Y) _mm_round_ss((X), (Y), _MM_FROUND_FLOOR)
191
192/// \brief Copies the upper element of the first 128-bit vector operand to the
193/// corresponding upper element of the 128-bit result vector of [2 x double].
194/// Rounds down the lower element of the second 128-bit vector operand to an
195/// integer and copies it to the lower element of the 128-bit result vector
196/// of [2 x double].
197///
198/// \headerfile <x86intrin.h>
199///
200/// \code
201/// __m128d _mm_floor_sd(__m128d X, __m128d Y);
202/// \endcode
203///
204/// This intrinsic corresponds to the <c> VROUNDSD / ROUNDSD </c> instruction.
205///
206/// \param X
207/// A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
208/// copied to the corresponding bits of the result.
209/// \param Y
210/// A 128-bit vector of [2 x double]. The value stored in bits [63:0] is
211/// rounded down to the nearest integer and copied to the corresponding bits
212/// of the result.
213/// \returns A 128-bit vector of [2 x double] containing the copied and rounded
214/// values.
57#define _mm_floor_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_FLOOR)215#define _mm_floor_sd(X, Y) _mm_round_sd((X), (Y), _MM_FROUND_FLOOR)
58216
217/// \brief Rounds each element of the 128-bit vector of [4 x float] to an
218/// integer value according to the rounding control specified by the second
219/// argument and returns the rounded values in a 128-bit vector of
220/// [4 x float].
221///
222/// \headerfile <x86intrin.h>
223///
224/// \code
225/// __m128 _mm_round_ps(__m128 X, const int M);
226/// \endcode
227///
228/// This intrinsic corresponds to the <c> VROUNDPS / ROUNDPS </c> instruction.
229///
230/// \param X
231/// A 128-bit vector of [4 x float].
232/// \param M
233/// An integer value that specifies the rounding operation. \n
234/// Bits [7:4] are reserved. \n
235/// Bit [3] is a precision exception value: \n
236/// 0: A normal PE exception is used \n
237/// 1: The PE field is not updated \n
238/// Bit [2] is the rounding control source: \n
239/// 0: Use bits [1:0] of \a M \n
240/// 1: Use the current MXCSR setting \n
241/// Bits [1:0] contain the rounding control definition: \n
242/// 00: Nearest \n
243/// 01: Downward (toward negative infinity) \n
244/// 10: Upward (toward positive infinity) \n
245/// 11: Truncated
246/// \returns A 128-bit vector of [4 x float] containing the rounded values.
59#define _mm_round_ps(X, M) __extension__ ({ \247#define _mm_round_ps(X, M) __extension__ ({ \
60 (__m128)__builtin_ia32_roundps((__v4sf)(__m128)(X), (M)); })248 (__m128)__builtin_ia32_roundps((__v4sf)(__m128)(X), (M)); })
61249
250/// \brief Copies three upper elements of the first 128-bit vector operand to
251/// the corresponding three upper elements of the 128-bit result vector of
252/// [4 x float]. Rounds the lowest element of the second 128-bit vector
253/// operand to an integer value according to the rounding control specified
254/// by the third argument and copies it to the lowest element of the 128-bit
255/// result vector of [4 x float].
256///
257/// \headerfile <x86intrin.h>
258///
259/// \code
260/// __m128 _mm_round_ss(__m128 X, __m128 Y, const int M);
261/// \endcode
262///
263/// This intrinsic corresponds to the <c> VROUNDSS / ROUNDSS </c> instruction.
264///
265/// \param X
266/// A 128-bit vector of [4 x float]. The values stored in bits [127:32] are
267/// copied to the corresponding bits of the result.
268/// \param Y
269/// A 128-bit vector of [4 x float]. The value stored in bits [31:0] is
270/// rounded to the nearest integer using the specified rounding control and
271/// copied to the corresponding bits of the result.
272/// \param M
273/// An integer value that specifies the rounding operation. \n
274/// Bits [7:4] are reserved. \n
275/// Bit [3] is a precision exception value: \n
276/// 0: A normal PE exception is used \n
277/// 1: The PE field is not updated \n
278/// Bit [2] is the rounding control source: \n
279/// 0: Use bits [1:0] of \a M \n
280/// 1: Use the current MXCSR setting \n
281/// Bits [1:0] contain the rounding control definition: \n
282/// 00: Nearest \n
283/// 01: Downward (toward negative infinity) \n
284/// 10: Upward (toward positive infinity) \n
285/// 11: Truncated
286/// \returns A 128-bit vector of [4 x float] containing the copied and rounded
287/// values.
62#define _mm_round_ss(X, Y, M) __extension__ ({ \288#define _mm_round_ss(X, Y, M) __extension__ ({ \
63 (__m128)__builtin_ia32_roundss((__v4sf)(__m128)(X), \289 (__m128)__builtin_ia32_roundss((__v4sf)(__m128)(X), \
64 (__v4sf)(__m128)(Y), (M)); })290 (__v4sf)(__m128)(Y), (M)); })
65291
292/// \brief Rounds each element of the 128-bit vector of [2 x double] to an
293/// integer value according to the rounding control specified by the second
294/// argument and returns the rounded values in a 128-bit vector of
295/// [2 x double].
296///
297/// \headerfile <x86intrin.h>
298///
299/// \code
300/// __m128d _mm_round_pd(__m128d X, const int M);
301/// \endcode
302///
303/// This intrinsic corresponds to the <c> VROUNDPD / ROUNDPD </c> instruction.
304///
305/// \param X
306/// A 128-bit vector of [2 x double].
307/// \param M
308/// An integer value that specifies the rounding operation. \n
309/// Bits [7:4] are reserved. \n
310/// Bit [3] is a precision exception value: \n
311/// 0: A normal PE exception is used \n
312/// 1: The PE field is not updated \n
313/// Bit [2] is the rounding control source: \n
314/// 0: Use bits [1:0] of \a M \n
315/// 1: Use the current MXCSR setting \n
316/// Bits [1:0] contain the rounding control definition: \n
317/// 00: Nearest \n
318/// 01: Downward (toward negative infinity) \n
319/// 10: Upward (toward positive infinity) \n
320/// 11: Truncated
321/// \returns A 128-bit vector of [2 x double] containing the rounded values.
66#define _mm_round_pd(X, M) __extension__ ({ \322#define _mm_round_pd(X, M) __extension__ ({ \
67 (__m128d)__builtin_ia32_roundpd((__v2df)(__m128d)(X), (M)); })323 (__m128d)__builtin_ia32_roundpd((__v2df)(__m128d)(X), (M)); })
68324
325/// \brief Copies the upper element of the first 128-bit vector operand to the
326/// corresponding upper element of the 128-bit result vector of [2 x double].
327/// Rounds the lower element of the second 128-bit vector operand to an
328/// integer value according to the rounding control specified by the third
329/// argument and copies it to the lower element of the 128-bit result vector
330/// of [2 x double].
331///
332/// \headerfile <x86intrin.h>
333///
334/// \code
335/// __m128d _mm_round_sd(__m128d X, __m128d Y, const int M);
336/// \endcode
337///
338/// This intrinsic corresponds to the <c> VROUNDSD / ROUNDSD </c> instruction.
339///
340/// \param X
341/// A 128-bit vector of [2 x double]. The value stored in bits [127:64] is
342/// copied to the corresponding bits of the result.
343/// \param Y
344/// A 128-bit vector of [2 x double]. The value stored in bits [63:0] is
345/// rounded to the nearest integer using the specified rounding control and
346/// copied to the corresponding bits of the result.
347/// \param M
348/// An integer value that specifies the rounding operation. \n
349/// Bits [7:4] are reserved. \n
350/// Bit [3] is a precision exception value: \n
351/// 0: A normal PE exception is used \n
352/// 1: The PE field is not updated \n
353/// Bit [2] is the rounding control source: \n
354/// 0: Use bits [1:0] of \a M \n
355/// 1: Use the current MXCSR setting \n
356/// Bits [1:0] contain the rounding control definition: \n
357/// 00: Nearest \n
358/// 01: Downward (toward negative infinity) \n
359/// 10: Upward (toward positive infinity) \n
360/// 11: Truncated
361/// \returns A 128-bit vector of [2 x double] containing the copied and rounded
362/// values.
69#define _mm_round_sd(X, Y, M) __extension__ ({ \363#define _mm_round_sd(X, Y, M) __extension__ ({ \
70 (__m128d)__builtin_ia32_roundsd((__v2df)(__m128d)(X), \364 (__m128d)__builtin_ia32_roundsd((__v2df)(__m128d)(X), \
71 (__v2df)(__m128d)(Y), (M)); })365 (__v2df)(__m128d)(Y), (M)); })
72366
73/* SSE4 Packed Blending Intrinsics. */367/* SSE4 Packed Blending Intrinsics. */
368/// \brief Returns a 128-bit vector of [2 x double] where the values are
369/// selected from either the first or second operand as specified by the
370/// third operand, the control mask.
371///
372/// \headerfile <x86intrin.h>
373///
374/// \code
375/// __m128d _mm_blend_pd(__m128d V1, __m128d V2, const int M);
376/// \endcode
377///
378/// This intrinsic corresponds to the <c> VBLENDPD / BLENDPD </c> instruction.
379///
380/// \param V1
381/// A 128-bit vector of [2 x double].
382/// \param V2
383/// A 128-bit vector of [2 x double].
384/// \param M
385/// An immediate integer operand, with mask bits [1:0] specifying how the
386/// values are to be copied. The position of the mask bit corresponds to the
387/// index of a copied value. When a mask bit is 0, the corresponding 64-bit
388/// element in operand \a V1 is copied to the same position in the result.
389/// When a mask bit is 1, the corresponding 64-bit element in operand \a V2
390/// is copied to the same position in the result.
391/// \returns A 128-bit vector of [2 x double] containing the copied values.
74#define _mm_blend_pd(V1, V2, M) __extension__ ({ \392#define _mm_blend_pd(V1, V2, M) __extension__ ({ \
75 (__m128d)__builtin_shufflevector((__v2df)(__m128d)(V1), \393 (__m128d)__builtin_shufflevector((__v2df)(__m128d)(V1), \
76 (__v2df)(__m128d)(V2), \394 (__v2df)(__m128d)(V2), \
77 (((M) & 0x01) ? 2 : 0), \395 (((M) & 0x01) ? 2 : 0), \
78 (((M) & 0x02) ? 3 : 1)); })396 (((M) & 0x02) ? 3 : 1)); })
79397
398/// \brief Returns a 128-bit vector of [4 x float] where the values are selected
399/// from either the first or second operand as specified by the third
400/// operand, the control mask.
401///
402/// \headerfile <x86intrin.h>
403///
404/// \code
405/// __m128 _mm_blend_ps(__m128 V1, __m128 V2, const int M);
406/// \endcode
407///
408/// This intrinsic corresponds to the <c> VBLENDPS / BLENDPS </c> instruction.
409///
410/// \param V1
411/// A 128-bit vector of [4 x float].
412/// \param V2
413/// A 128-bit vector of [4 x float].
414/// \param M
415/// An immediate integer operand, with mask bits [3:0] specifying how the
416/// values are to be copied. The position of the mask bit corresponds to the
417/// index of a copied value. When a mask bit is 0, the corresponding 32-bit
418/// element in operand \a V1 is copied to the same position in the result.
419/// When a mask bit is 1, the corresponding 32-bit element in operand \a V2
420/// is copied to the same position in the result.
421/// \returns A 128-bit vector of [4 x float] containing the copied values.
80#define _mm_blend_ps(V1, V2, M) __extension__ ({ \422#define _mm_blend_ps(V1, V2, M) __extension__ ({ \
81 (__m128)__builtin_shufflevector((__v4sf)(__m128)(V1), (__v4sf)(__m128)(V2), \423 (__m128)__builtin_shufflevector((__v4sf)(__m128)(V1), (__v4sf)(__m128)(V2), \
82 (((M) & 0x01) ? 4 : 0), \424 (((M) & 0x01) ? 4 : 0), \
...@@ -84,6 +426,26 @@...@@ -84,6 +426,26 @@
84 (((M) & 0x04) ? 6 : 2), \426 (((M) & 0x04) ? 6 : 2), \
85 (((M) & 0x08) ? 7 : 3)); })427 (((M) & 0x08) ? 7 : 3)); })
86428
429/// \brief Returns a 128-bit vector of [2 x double] where the values are
430/// selected from either the first or second operand as specified by the
431/// third operand, the control mask.
432///
433/// \headerfile <x86intrin.h>
434///
435/// This intrinsic corresponds to the <c> VBLENDVPD / BLENDVPD </c> instruction.
436///
437/// \param __V1
438/// A 128-bit vector of [2 x double].
439/// \param __V2
440/// A 128-bit vector of [2 x double].
441/// \param __M
442/// A 128-bit vector operand, with mask bits 127 and 63 specifying how the
443/// values are to be copied. The position of the mask bit corresponds to the
444/// most significant bit of a copied value. When a mask bit is 0, the
445/// corresponding 64-bit element in operand \a __V1 is copied to the same
446/// position in the result. When a mask bit is 1, the corresponding 64-bit
447/// element in operand \a __V2 is copied to the same position in the result.
448/// \returns A 128-bit vector of [2 x double] containing the copied values.
87static __inline__ __m128d __DEFAULT_FN_ATTRS449static __inline__ __m128d __DEFAULT_FN_ATTRS
88_mm_blendv_pd (__m128d __V1, __m128d __V2, __m128d __M)450_mm_blendv_pd (__m128d __V1, __m128d __V2, __m128d __M)
89{451{
...@@ -91,6 +453,26 @@ _mm_blendv_pd (__m128d __V1, __m128d __V2, __m128d __M)...@@ -91,6 +453,26 @@ _mm_blendv_pd (__m128d __V1, __m128d __V2, __m128d __M)
91 (__v2df)__M);453 (__v2df)__M);
92}454}
93455
456/// \brief Returns a 128-bit vector of [4 x float] where the values are
457/// selected from either the first or second operand as specified by the
458/// third operand, the control mask.
459///
460/// \headerfile <x86intrin.h>
461///
462/// This intrinsic corresponds to the <c> VBLENDVPS / BLENDVPS </c> instruction.
463///
464/// \param __V1
465/// A 128-bit vector of [4 x float].
466/// \param __V2
467/// A 128-bit vector of [4 x float].
468/// \param __M
469/// A 128-bit vector operand, with mask bits 127, 95, 63, and 31 specifying
470/// how the values are to be copied. The position of the mask bit corresponds
471/// to the most significant bit of a copied value. When a mask bit is 0, the
472/// corresponding 32-bit element in operand \a __V1 is copied to the same
473/// position in the result. When a mask bit is 1, the corresponding 32-bit
474/// element in operand \a __V2 is copied to the same position in the result.
475/// \returns A 128-bit vector of [4 x float] containing the copied values.
94static __inline__ __m128 __DEFAULT_FN_ATTRS476static __inline__ __m128 __DEFAULT_FN_ATTRS
95_mm_blendv_ps (__m128 __V1, __m128 __V2, __m128 __M)477_mm_blendv_ps (__m128 __V1, __m128 __V2, __m128 __M)
96{478{
...@@ -98,6 +480,26 @@ _mm_blendv_ps (__m128 __V1, __m128 __V2, __m128 __M)...@@ -98,6 +480,26 @@ _mm_blendv_ps (__m128 __V1, __m128 __V2, __m128 __M)
98 (__v4sf)__M);480 (__v4sf)__M);
99}481}
100482
483/// \brief Returns a 128-bit vector of [16 x i8] where the values are selected
484/// from either of the first or second operand as specified by the third
485/// operand, the control mask.
486///
487/// \headerfile <x86intrin.h>
488///
489/// This intrinsic corresponds to the <c> VPBLENDVB / PBLENDVB </c> instruction.
490///
491/// \param __V1
492/// A 128-bit vector of [16 x i8].
493/// \param __V2
494/// A 128-bit vector of [16 x i8].
495/// \param __M
496/// A 128-bit vector operand, with mask bits 127, 119, 111 ... 7 specifying
497/// how the values are to be copied. The position of the mask bit corresponds
498/// to the most significant bit of a copied value. When a mask bit is 0, the
499/// corresponding 8-bit element in operand \a __V1 is copied to the same
500/// position in the result. When a mask bit is 1, the corresponding 8-bit
501/// element in operand \a __V2 is copied to the same position in the result.
502/// \returns A 128-bit vector of [16 x i8] containing the copied values.
101static __inline__ __m128i __DEFAULT_FN_ATTRS503static __inline__ __m128i __DEFAULT_FN_ATTRS
102_mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)504_mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)
103{505{
...@@ -105,6 +507,30 @@ _mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)...@@ -105,6 +507,30 @@ _mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)
105 (__v16qi)__M);507 (__v16qi)__M);
106}508}
107509
510/// \brief Returns a 128-bit vector of [8 x i16] where the values are selected
511/// from either of the first or second operand as specified by the third
512/// operand, the control mask.
513///
514/// \headerfile <x86intrin.h>
515///
516/// \code
517/// __m128i _mm_blend_epi16(__m128i V1, __m128i V2, const int M);
518/// \endcode
519///
520/// This intrinsic corresponds to the <c> VPBLENDW / PBLENDW </c> instruction.
521///
522/// \param V1
523/// A 128-bit vector of [8 x i16].
524/// \param V2
525/// A 128-bit vector of [8 x i16].
526/// \param M
527/// An immediate integer operand, with mask bits [7:0] specifying how the
528/// values are to be copied. The position of the mask bit corresponds to the
529/// index of a copied value. When a mask bit is 0, the corresponding 16-bit
530/// element in operand \a V1 is copied to the same position in the result.
531/// When a mask bit is 1, the corresponding 16-bit element in operand \a V2
532/// is copied to the same position in the result.
533/// \returns A 128-bit vector of [8 x i16] containing the copied values.
108#define _mm_blend_epi16(V1, V2, M) __extension__ ({ \534#define _mm_blend_epi16(V1, V2, M) __extension__ ({ \
109 (__m128i)__builtin_shufflevector((__v8hi)(__m128i)(V1), \535 (__m128i)__builtin_shufflevector((__v8hi)(__m128i)(V1), \
110 (__v8hi)(__m128i)(V2), \536 (__v8hi)(__m128i)(V2), \
...@@ -118,12 +544,39 @@ _mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)...@@ -118,12 +544,39 @@ _mm_blendv_epi8 (__m128i __V1, __m128i __V2, __m128i __M)
118 (((M) & 0x80) ? 15 : 7)); })544 (((M) & 0x80) ? 15 : 7)); })
119545
120/* SSE4 Dword Multiply Instructions. */546/* SSE4 Dword Multiply Instructions. */
547/// \brief Multiples corresponding elements of two 128-bit vectors of [4 x i32]
548/// and returns the lower 32 bits of the each product in a 128-bit vector of
549/// [4 x i32].
550///
551/// \headerfile <x86intrin.h>
552///
553/// This intrinsic corresponds to the <c> VPMULLD / PMULLD </c> instruction.
554///
555/// \param __V1
556/// A 128-bit integer vector.
557/// \param __V2
558/// A 128-bit integer vector.
559/// \returns A 128-bit integer vector containing the products of both operands.
121static __inline__ __m128i __DEFAULT_FN_ATTRS560static __inline__ __m128i __DEFAULT_FN_ATTRS
122_mm_mullo_epi32 (__m128i __V1, __m128i __V2)561_mm_mullo_epi32 (__m128i __V1, __m128i __V2)
123{562{
124 return (__m128i) ((__v4su)__V1 * (__v4su)__V2);563 return (__m128i) ((__v4su)__V1 * (__v4su)__V2);
125}564}
126565
566/// \brief Multiplies corresponding even-indexed elements of two 128-bit
567/// vectors of [4 x i32] and returns a 128-bit vector of [2 x i64]
568/// containing the products.
569///
570/// \headerfile <x86intrin.h>
571///
572/// This intrinsic corresponds to the <c> VPMULDQ / PMULDQ </c> instruction.
573///
574/// \param __V1
575/// A 128-bit vector of [4 x i32].
576/// \param __V2
577/// A 128-bit vector of [4 x i32].
578/// \returns A 128-bit vector of [2 x i64] containing the products of both
579/// operands.
127static __inline__ __m128i __DEFAULT_FN_ATTRS580static __inline__ __m128i __DEFAULT_FN_ATTRS
128_mm_mul_epi32 (__m128i __V1, __m128i __V2)581_mm_mul_epi32 (__m128i __V1, __m128i __V2)
129{582{
...@@ -131,64 +584,243 @@ _mm_mul_epi32 (__m128i __V1, __m128i __V2)...@@ -131,64 +584,243 @@ _mm_mul_epi32 (__m128i __V1, __m128i __V2)
131}584}
132585
133/* SSE4 Floating Point Dot Product Instructions. */586/* SSE4 Floating Point Dot Product Instructions. */
587/// \brief Computes the dot product of the two 128-bit vectors of [4 x float]
588/// and returns it in the elements of the 128-bit result vector of
589/// [4 x float].
590///
591/// The immediate integer operand controls which input elements
592/// will contribute to the dot product, and where the final results are
593/// returned.
594///
595/// \headerfile <x86intrin.h>
596///
597/// \code
598/// __m128 _mm_dp_ps(__m128 X, __m128 Y, const int M);
599/// \endcode
600///
601/// This intrinsic corresponds to the <c> VDPPS / DPPS </c> instruction.
602///
603/// \param X
604/// A 128-bit vector of [4 x float].
605/// \param Y
606/// A 128-bit vector of [4 x float].
607/// \param M
608/// An immediate integer operand. Mask bits [7:4] determine which elements
609/// of the input vectors are used, with bit [4] corresponding to the lowest
610/// element and bit [7] corresponding to the highest element of each [4 x
611/// float] vector. If a bit is set, the corresponding elements from the two
612/// input vectors are used as an input for dot product; otherwise that input
613/// is treated as zero. Bits [3:0] determine which elements of the result
614/// will receive a copy of the final dot product, with bit [0] corresponding
615/// to the lowest element and bit [3] corresponding to the highest element of
616/// each [4 x float] subvector. If a bit is set, the dot product is returned
617/// in the corresponding element; otherwise that element is set to zero.
618/// \returns A 128-bit vector of [4 x float] containing the dot product.
134#define _mm_dp_ps(X, Y, M) __extension__ ({ \619#define _mm_dp_ps(X, Y, M) __extension__ ({ \
135 (__m128) __builtin_ia32_dpps((__v4sf)(__m128)(X), \620 (__m128) __builtin_ia32_dpps((__v4sf)(__m128)(X), \
136 (__v4sf)(__m128)(Y), (M)); })621 (__v4sf)(__m128)(Y), (M)); })
137622
623/// \brief Computes the dot product of the two 128-bit vectors of [2 x double]
624/// and returns it in the elements of the 128-bit result vector of
625/// [2 x double].
626///
627/// The immediate integer operand controls which input
628/// elements will contribute to the dot product, and where the final results
629/// are returned.
630///
631/// \headerfile <x86intrin.h>
632///
633/// \code
634/// __m128d _mm_dp_pd(__m128d X, __m128d Y, const int M);
635/// \endcode
636///
637/// This intrinsic corresponds to the <c> VDPPD / DPPD </c> instruction.
638///
639/// \param X
640/// A 128-bit vector of [2 x double].
641/// \param Y
642/// A 128-bit vector of [2 x double].
643/// \param M
644/// An immediate integer operand. Mask bits [5:4] determine which elements
645/// of the input vectors are used, with bit [4] corresponding to the lowest
646/// element and bit [5] corresponding to the highest element of each of [2 x
647/// double] vector. If a bit is set, the corresponding elements from the two
648/// input vectors are used as an input for dot product; otherwise that input
649/// is treated as zero. Bits [1:0] determine which elements of the result
650/// will receive a copy of the final dot product, with bit [0] corresponding
651/// to the lowest element and bit [3] corresponding to the highest element of
652/// each [2 x double] vector. If a bit is set, the dot product is returned in
653/// the corresponding element; otherwise that element is set to zero.
138#define _mm_dp_pd(X, Y, M) __extension__ ({\654#define _mm_dp_pd(X, Y, M) __extension__ ({\
139 (__m128d) __builtin_ia32_dppd((__v2df)(__m128d)(X), \655 (__m128d) __builtin_ia32_dppd((__v2df)(__m128d)(X), \
140 (__v2df)(__m128d)(Y), (M)); })656 (__v2df)(__m128d)(Y), (M)); })
141657
142/* SSE4 Streaming Load Hint Instruction. */658/* SSE4 Streaming Load Hint Instruction. */
659/// \brief Loads integer values from a 128-bit aligned memory location to a
660/// 128-bit integer vector.
661///
662/// \headerfile <x86intrin.h>
663///
664/// This intrinsic corresponds to the <c> VMOVNTDQA / MOVNTDQA </c> instruction.
665///
666/// \param __V
667/// A pointer to a 128-bit aligned memory location that contains the integer
668/// values.
669/// \returns A 128-bit integer vector containing the data stored at the
670/// specified memory location.
143static __inline__ __m128i __DEFAULT_FN_ATTRS671static __inline__ __m128i __DEFAULT_FN_ATTRS
144_mm_stream_load_si128 (__m128i const *__V)672_mm_stream_load_si128 (__m128i const *__V)
145{673{
146 return (__m128i) __builtin_ia32_movntdqa ((const __v2di *) __V);674 return (__m128i) __builtin_nontemporal_load ((const __v2di *) __V);
147}675}
148676
149/* SSE4 Packed Integer Min/Max Instructions. */677/* SSE4 Packed Integer Min/Max Instructions. */
678/// \brief Compares the corresponding elements of two 128-bit vectors of
679/// [16 x i8] and returns a 128-bit vector of [16 x i8] containing the lesser
680/// of the two values.
681///
682/// \headerfile <x86intrin.h>
683///
684/// This intrinsic corresponds to the <c> VPMINSB / PMINSB </c> instruction.
685///
686/// \param __V1
687/// A 128-bit vector of [16 x i8].
688/// \param __V2
689/// A 128-bit vector of [16 x i8]
690/// \returns A 128-bit vector of [16 x i8] containing the lesser values.
150static __inline__ __m128i __DEFAULT_FN_ATTRS691static __inline__ __m128i __DEFAULT_FN_ATTRS
151_mm_min_epi8 (__m128i __V1, __m128i __V2)692_mm_min_epi8 (__m128i __V1, __m128i __V2)
152{693{
153 return (__m128i) __builtin_ia32_pminsb128 ((__v16qi) __V1, (__v16qi) __V2);694 return (__m128i) __builtin_ia32_pminsb128 ((__v16qi) __V1, (__v16qi) __V2);
154}695}
155696
697/// \brief Compares the corresponding elements of two 128-bit vectors of
698/// [16 x i8] and returns a 128-bit vector of [16 x i8] containing the
699/// greater value of the two.
700///
701/// \headerfile <x86intrin.h>
702///
703/// This intrinsic corresponds to the <c> VPMAXSB / PMAXSB </c> instruction.
704///
705/// \param __V1
706/// A 128-bit vector of [16 x i8].
707/// \param __V2
708/// A 128-bit vector of [16 x i8].
709/// \returns A 128-bit vector of [16 x i8] containing the greater values.
156static __inline__ __m128i __DEFAULT_FN_ATTRS710static __inline__ __m128i __DEFAULT_FN_ATTRS
157_mm_max_epi8 (__m128i __V1, __m128i __V2)711_mm_max_epi8 (__m128i __V1, __m128i __V2)
158{712{
159 return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi) __V1, (__v16qi) __V2);713 return (__m128i) __builtin_ia32_pmaxsb128 ((__v16qi) __V1, (__v16qi) __V2);
160}714}
161715
716/// \brief Compares the corresponding elements of two 128-bit vectors of
717/// [8 x u16] and returns a 128-bit vector of [8 x u16] containing the lesser
718/// value of the two.
719///
720/// \headerfile <x86intrin.h>
721///
722/// This intrinsic corresponds to the <c> VPMINUW / PMINUW </c> instruction.
723///
724/// \param __V1
725/// A 128-bit vector of [8 x u16].
726/// \param __V2
727/// A 128-bit vector of [8 x u16].
728/// \returns A 128-bit vector of [8 x u16] containing the lesser values.
162static __inline__ __m128i __DEFAULT_FN_ATTRS729static __inline__ __m128i __DEFAULT_FN_ATTRS
163_mm_min_epu16 (__m128i __V1, __m128i __V2)730_mm_min_epu16 (__m128i __V1, __m128i __V2)
164{731{
165 return (__m128i) __builtin_ia32_pminuw128 ((__v8hi) __V1, (__v8hi) __V2);732 return (__m128i) __builtin_ia32_pminuw128 ((__v8hi) __V1, (__v8hi) __V2);
166}733}
167734
735/// \brief Compares the corresponding elements of two 128-bit vectors of
736/// [8 x u16] and returns a 128-bit vector of [8 x u16] containing the
737/// greater value of the two.
738///
739/// \headerfile <x86intrin.h>
740///
741/// This intrinsic corresponds to the <c> VPMAXUW / PMAXUW </c> instruction.
742///
743/// \param __V1
744/// A 128-bit vector of [8 x u16].
745/// \param __V2
746/// A 128-bit vector of [8 x u16].
747/// \returns A 128-bit vector of [8 x u16] containing the greater values.
168static __inline__ __m128i __DEFAULT_FN_ATTRS748static __inline__ __m128i __DEFAULT_FN_ATTRS
169_mm_max_epu16 (__m128i __V1, __m128i __V2)749_mm_max_epu16 (__m128i __V1, __m128i __V2)
170{750{
171 return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi) __V1, (__v8hi) __V2);751 return (__m128i) __builtin_ia32_pmaxuw128 ((__v8hi) __V1, (__v8hi) __V2);
172}752}
173753
754/// \brief Compares the corresponding elements of two 128-bit vectors of
755/// [4 x i32] and returns a 128-bit vector of [4 x i32] containing the lesser
756/// value of the two.
757///
758/// \headerfile <x86intrin.h>
759///
760/// This intrinsic corresponds to the <c> VPMINSD / PMINSD </c> instruction.
761///
762/// \param __V1
763/// A 128-bit vector of [4 x i32].
764/// \param __V2
765/// A 128-bit vector of [4 x i32].
766/// \returns A 128-bit vector of [4 x i32] containing the lesser values.
174static __inline__ __m128i __DEFAULT_FN_ATTRS767static __inline__ __m128i __DEFAULT_FN_ATTRS
175_mm_min_epi32 (__m128i __V1, __m128i __V2)768_mm_min_epi32 (__m128i __V1, __m128i __V2)
176{769{
177 return (__m128i) __builtin_ia32_pminsd128 ((__v4si) __V1, (__v4si) __V2);770 return (__m128i) __builtin_ia32_pminsd128 ((__v4si) __V1, (__v4si) __V2);
178}771}
179772
773/// \brief Compares the corresponding elements of two 128-bit vectors of
774/// [4 x i32] and returns a 128-bit vector of [4 x i32] containing the
775/// greater value of the two.
776///
777/// \headerfile <x86intrin.h>
778///
779/// This intrinsic corresponds to the <c> VPMAXSD / PMAXSD </c> instruction.
780///
781/// \param __V1
782/// A 128-bit vector of [4 x i32].
783/// \param __V2
784/// A 128-bit vector of [4 x i32].
785/// \returns A 128-bit vector of [4 x i32] containing the greater values.
180static __inline__ __m128i __DEFAULT_FN_ATTRS786static __inline__ __m128i __DEFAULT_FN_ATTRS
181_mm_max_epi32 (__m128i __V1, __m128i __V2)787_mm_max_epi32 (__m128i __V1, __m128i __V2)
182{788{
183 return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si) __V1, (__v4si) __V2);789 return (__m128i) __builtin_ia32_pmaxsd128 ((__v4si) __V1, (__v4si) __V2);
184}790}
185791
792/// \brief Compares the corresponding elements of two 128-bit vectors of
793/// [4 x u32] and returns a 128-bit vector of [4 x u32] containing the lesser
794/// value of the two.
795///
796/// \headerfile <x86intrin.h>
797///
798/// This intrinsic corresponds to the <c> VPMINUD / PMINUD </c> instruction.
799///
800/// \param __V1
801/// A 128-bit vector of [4 x u32].
802/// \param __V2
803/// A 128-bit vector of [4 x u32].
804/// \returns A 128-bit vector of [4 x u32] containing the lesser values.
186static __inline__ __m128i __DEFAULT_FN_ATTRS805static __inline__ __m128i __DEFAULT_FN_ATTRS
187_mm_min_epu32 (__m128i __V1, __m128i __V2)806_mm_min_epu32 (__m128i __V1, __m128i __V2)
188{807{
189 return (__m128i) __builtin_ia32_pminud128((__v4si) __V1, (__v4si) __V2);808 return (__m128i) __builtin_ia32_pminud128((__v4si) __V1, (__v4si) __V2);
190}809}
191810
811/// \brief Compares the corresponding elements of two 128-bit vectors of
812/// [4 x u32] and returns a 128-bit vector of [4 x u32] containing the
813/// greater value of the two.
814///
815/// \headerfile <x86intrin.h>
816///
817/// This intrinsic corresponds to the <c> VPMAXUD / PMAXUD </c> instruction.
818///
819/// \param __V1
820/// A 128-bit vector of [4 x u32].
821/// \param __V2
822/// A 128-bit vector of [4 x u32].
823/// \returns A 128-bit vector of [4 x u32] containing the greater values.
192static __inline__ __m128i __DEFAULT_FN_ATTRS824static __inline__ __m128i __DEFAULT_FN_ATTRS
193_mm_max_epu32 (__m128i __V1, __m128i __V2)825_mm_max_epu32 (__m128i __V1, __m128i __V2)
194{826{
...@@ -196,7 +828,70 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)...@@ -196,7 +828,70 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)
196}828}
197829
198/* SSE4 Insertion and Extraction from XMM Register Instructions. */830/* SSE4 Insertion and Extraction from XMM Register Instructions. */
831/// \brief Takes the first argument \a X and inserts an element from the second
832/// argument \a Y as selected by the third argument \a N. That result then
833/// has elements zeroed out also as selected by the third argument \a N. The
834/// resulting 128-bit vector of [4 x float] is then returned.
835///
836/// \headerfile <x86intrin.h>
837///
838/// \code
839/// __m128 _mm_insert_ps(__m128 X, __m128 Y, const int N);
840/// \endcode
841///
842/// This intrinsic corresponds to the <c> VINSERTPS </c> instruction.
843///
844/// \param X
845/// A 128-bit vector source operand of [4 x float]. With the exception of
846/// those bits in the result copied from parameter \a Y and zeroed by bits
847/// [3:0] of \a N, all bits from this parameter are copied to the result.
848/// \param Y
849/// A 128-bit vector source operand of [4 x float]. One single-precision
850/// floating-point element from this source, as determined by the immediate
851/// parameter, is copied to the result.
852/// \param N
853/// Specifies which bits from operand \a Y will be copied, which bits in the
854/// result they will be be copied to, and which bits in the result will be
855/// cleared. The following assignments are made: \n
856/// Bits [7:6] specify the bits to copy from operand \a Y: \n
857/// 00: Selects bits [31:0] from operand \a Y. \n
858/// 01: Selects bits [63:32] from operand \a Y. \n
859/// 10: Selects bits [95:64] from operand \a Y. \n
860/// 11: Selects bits [127:96] from operand \a Y. \n
861/// Bits [5:4] specify the bits in the result to which the selected bits
862/// from operand \a Y are copied: \n
863/// 00: Copies the selected bits from \a Y to result bits [31:0]. \n
864/// 01: Copies the selected bits from \a Y to result bits [63:32]. \n
865/// 10: Copies the selected bits from \a Y to result bits [95:64]. \n
866/// 11: Copies the selected bits from \a Y to result bits [127:96]. \n
867/// Bits[3:0]: If any of these bits are set, the corresponding result
868/// element is cleared.
869/// \returns A 128-bit vector of [4 x float] containing the copied single-
870/// precision floating point elements from the operands.
199#define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))871#define _mm_insert_ps(X, Y, N) __builtin_ia32_insertps128((X), (Y), (N))
872
873/// \brief Extracts a 32-bit integer from a 128-bit vector of [4 x float] and
874/// returns it, using the immediate value parameter \a N as a selector.
875///
876/// \headerfile <x86intrin.h>
877///
878/// \code
879/// int _mm_extract_ps(__m128 X, const int N);
880/// \endcode
881///
882/// This intrinsic corresponds to the <c> VEXTRACTPS / EXTRACTPS </c>
883/// instruction.
884///
885/// \param X
886/// A 128-bit vector of [4 x float].
887/// \param N
888/// An immediate value. Bits [1:0] determines which bits from the argument
889/// \a X are extracted and returned: \n
890/// 00: Bits [31:0] of parameter \a X are returned. \n
891/// 01: Bits [63:32] of parameter \a X are returned. \n
892/// 10: Bits [95:64] of parameter \a X are returned. \n
893/// 11: Bits [127:96] of parameter \a X are returned.
894/// \returns A 32-bit integer containing the extracted 32 bits of float data.
200#define _mm_extract_ps(X, N) (__extension__ \895#define _mm_extract_ps(X, N) (__extension__ \
201 ({ union { int __i; float __f; } __t; \896 ({ union { int __i; float __f; } __t; \
202 __v4sf __a = (__v4sf)(__m128)(X); \897 __v4sf __a = (__v4sf)(__m128)(X); \
...@@ -217,15 +912,111 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)...@@ -217,15 +912,111 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)
217 _MM_MK_INSERTPS_NDX((N), 0, 0x0e))912 _MM_MK_INSERTPS_NDX((N), 0, 0x0e))
218913
219/* Insert int into packed integer array at index. */914/* Insert int into packed integer array at index. */
915/// \brief Constructs a 128-bit vector of [16 x i8] by first making a copy of
916/// the 128-bit integer vector parameter, and then inserting the lower 8 bits
917/// of an integer parameter \a I into an offset specified by the immediate
918/// value parameter \a N.
919///
920/// \headerfile <x86intrin.h>
921///
922/// \code
923/// __m128i _mm_insert_epi8(__m128i X, int I, const int N);
924/// \endcode
925///
926/// This intrinsic corresponds to the <c> VPINSRB / PINSRB </c> instruction.
927///
928/// \param X
929/// A 128-bit integer vector of [16 x i8]. This vector is copied to the
930/// result and then one of the sixteen elements in the result vector is
931/// replaced by the lower 8 bits of \a I.
932/// \param I
933/// An integer. The lower 8 bits of this operand are written to the result
934/// beginning at the offset specified by \a N.
935/// \param N
936/// An immediate value. Bits [3:0] specify the bit offset in the result at
937/// which the lower 8 bits of \a I are written. \n
938/// 0000: Bits [7:0] of the result are used for insertion. \n
939/// 0001: Bits [15:8] of the result are used for insertion. \n
940/// 0010: Bits [23:16] of the result are used for insertion. \n
941/// 0011: Bits [31:24] of the result are used for insertion. \n
942/// 0100: Bits [39:32] of the result are used for insertion. \n
943/// 0101: Bits [47:40] of the result are used for insertion. \n
944/// 0110: Bits [55:48] of the result are used for insertion. \n
945/// 0111: Bits [63:56] of the result are used for insertion. \n
946/// 1000: Bits [71:64] of the result are used for insertion. \n
947/// 1001: Bits [79:72] of the result are used for insertion. \n
948/// 1010: Bits [87:80] of the result are used for insertion. \n
949/// 1011: Bits [95:88] of the result are used for insertion. \n
950/// 1100: Bits [103:96] of the result are used for insertion. \n
951/// 1101: Bits [111:104] of the result are used for insertion. \n
952/// 1110: Bits [119:112] of the result are used for insertion. \n
953/// 1111: Bits [127:120] of the result are used for insertion.
954/// \returns A 128-bit integer vector containing the constructed values.
220#define _mm_insert_epi8(X, I, N) (__extension__ \955#define _mm_insert_epi8(X, I, N) (__extension__ \
221 ({ __v16qi __a = (__v16qi)(__m128i)(X); \956 ({ __v16qi __a = (__v16qi)(__m128i)(X); \
222 __a[(N) & 15] = (I); \957 __a[(N) & 15] = (I); \
223 (__m128i)__a;}))958 (__m128i)__a;}))
959
960/// \brief Constructs a 128-bit vector of [4 x i32] by first making a copy of
961/// the 128-bit integer vector parameter, and then inserting the 32-bit
962/// integer parameter \a I at the offset specified by the immediate value
963/// parameter \a N.
964///
965/// \headerfile <x86intrin.h>
966///
967/// \code
968/// __m128i _mm_insert_epi32(__m128i X, int I, const int N);
969/// \endcode
970///
971/// This intrinsic corresponds to the <c> VPINSRD / PINSRD </c> instruction.
972///
973/// \param X
974/// A 128-bit integer vector of [4 x i32]. This vector is copied to the
975/// result and then one of the four elements in the result vector is
976/// replaced by \a I.
977/// \param I
978/// A 32-bit integer that is written to the result beginning at the offset
979/// specified by \a N.
980/// \param N
981/// An immediate value. Bits [1:0] specify the bit offset in the result at
982/// which the integer \a I is written. \n
983/// 00: Bits [31:0] of the result are used for insertion. \n
984/// 01: Bits [63:32] of the result are used for insertion. \n
985/// 10: Bits [95:64] of the result are used for insertion. \n
986/// 11: Bits [127:96] of the result are used for insertion.
987/// \returns A 128-bit integer vector containing the constructed values.
224#define _mm_insert_epi32(X, I, N) (__extension__ \988#define _mm_insert_epi32(X, I, N) (__extension__ \
225 ({ __v4si __a = (__v4si)(__m128i)(X); \989 ({ __v4si __a = (__v4si)(__m128i)(X); \
226 __a[(N) & 3] = (I); \990 __a[(N) & 3] = (I); \
227 (__m128i)__a;}))991 (__m128i)__a;}))
992
228#ifdef __x86_64__993#ifdef __x86_64__
994/// \brief Constructs a 128-bit vector of [2 x i64] by first making a copy of
995/// the 128-bit integer vector parameter, and then inserting the 64-bit
996/// integer parameter \a I, using the immediate value parameter \a N as an
997/// insertion location selector.
998///
999/// \headerfile <x86intrin.h>
1000///
1001/// \code
1002/// __m128i _mm_insert_epi64(__m128i X, long long I, const int N);
1003/// \endcode
1004///
1005/// This intrinsic corresponds to the <c> VPINSRQ / PINSRQ </c> instruction.
1006///
1007/// \param X
1008/// A 128-bit integer vector of [2 x i64]. This vector is copied to the
1009/// result and then one of the two elements in the result vector is replaced
1010/// by \a I.
1011/// \param I
1012/// A 64-bit integer that is written to the result beginning at the offset
1013/// specified by \a N.
1014/// \param N
1015/// An immediate value. Bit [0] specifies the bit offset in the result at
1016/// which the integer \a I is written. \n
1017/// 0: Bits [63:0] of the result are used for insertion. \n
1018/// 1: Bits [127:64] of the result are used for insertion. \n
1019/// \returns A 128-bit integer vector containing the constructed values.
229#define _mm_insert_epi64(X, I, N) (__extension__ \1020#define _mm_insert_epi64(X, I, N) (__extension__ \
230 ({ __v2di __a = (__v2di)(__m128i)(X); \1021 ({ __v2di __a = (__v2di)(__m128i)(X); \
231 __a[(N) & 1] = (I); \1022 __a[(N) & 1] = (I); \
...@@ -235,42 +1026,219 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)...@@ -235,42 +1026,219 @@ _mm_max_epu32 (__m128i __V1, __m128i __V2)
235/* Extract int from packed integer array at index. This returns the element1026/* Extract int from packed integer array at index. This returns the element
236 * as a zero extended value, so it is unsigned.1027 * as a zero extended value, so it is unsigned.
237 */1028 */
1029/// \brief Extracts an 8-bit element from the 128-bit integer vector of
1030/// [16 x i8], using the immediate value parameter \a N as a selector.
1031///
1032/// \headerfile <x86intrin.h>
1033///
1034/// \code
1035/// int _mm_extract_epi8(__m128i X, const int N);
1036/// \endcode
1037///
1038/// This intrinsic corresponds to the <c> VPEXTRB / PEXTRB </c> instruction.
1039///
1040/// \param X
1041/// A 128-bit integer vector.
1042/// \param N
1043/// An immediate value. Bits [3:0] specify which 8-bit vector element from
1044/// the argument \a X to extract and copy to the result. \n
1045/// 0000: Bits [7:0] of parameter \a X are extracted. \n
1046/// 0001: Bits [15:8] of the parameter \a X are extracted. \n
1047/// 0010: Bits [23:16] of the parameter \a X are extracted. \n
1048/// 0011: Bits [31:24] of the parameter \a X are extracted. \n
1049/// 0100: Bits [39:32] of the parameter \a X are extracted. \n
1050/// 0101: Bits [47:40] of the parameter \a X are extracted. \n
1051/// 0110: Bits [55:48] of the parameter \a X are extracted. \n
1052/// 0111: Bits [63:56] of the parameter \a X are extracted. \n
1053/// 1000: Bits [71:64] of the parameter \a X are extracted. \n
1054/// 1001: Bits [79:72] of the parameter \a X are extracted. \n
1055/// 1010: Bits [87:80] of the parameter \a X are extracted. \n
1056/// 1011: Bits [95:88] of the parameter \a X are extracted. \n
1057/// 1100: Bits [103:96] of the parameter \a X are extracted. \n
1058/// 1101: Bits [111:104] of the parameter \a X are extracted. \n
1059/// 1110: Bits [119:112] of the parameter \a X are extracted. \n
1060/// 1111: Bits [127:120] of the parameter \a X are extracted.
1061/// \returns An unsigned integer, whose lower 8 bits are selected from the
1062/// 128-bit integer vector parameter and the remaining bits are assigned
1063/// zeros.
238#define _mm_extract_epi8(X, N) (__extension__ \1064#define _mm_extract_epi8(X, N) (__extension__ \
239 ({ __v16qi __a = (__v16qi)(__m128i)(X); \1065 ({ __v16qi __a = (__v16qi)(__m128i)(X); \
240 (int)(unsigned char) __a[(N) & 15];}))1066 (int)(unsigned char) __a[(N) & 15];}))
1067
1068/// \brief Extracts a 32-bit element from the 128-bit integer vector of
1069/// [4 x i32], using the immediate value parameter \a N as a selector.
1070///
1071/// \headerfile <x86intrin.h>
1072///
1073/// \code
1074/// int _mm_extract_epi32(__m128i X, const int N);
1075/// \endcode
1076///
1077/// This intrinsic corresponds to the <c> VPEXTRD / PEXTRD </c> instruction.
1078///
1079/// \param X
1080/// A 128-bit integer vector.
1081/// \param N
1082/// An immediate value. Bits [1:0] specify which 32-bit vector element from
1083/// the argument \a X to extract and copy to the result. \n
1084/// 00: Bits [31:0] of the parameter \a X are extracted. \n
1085/// 01: Bits [63:32] of the parameter \a X are extracted. \n
1086/// 10: Bits [95:64] of the parameter \a X are extracted. \n
1087/// 11: Bits [127:96] of the parameter \a X are exracted.
1088/// \returns An integer, whose lower 32 bits are selected from the 128-bit
1089/// integer vector parameter and the remaining bits are assigned zeros.
241#define _mm_extract_epi32(X, N) (__extension__ \1090#define _mm_extract_epi32(X, N) (__extension__ \
242 ({ __v4si __a = (__v4si)(__m128i)(X); \1091 ({ __v4si __a = (__v4si)(__m128i)(X); \
243 (int)__a[(N) & 3];}))1092 (int)__a[(N) & 3];}))
1093
244#ifdef __x86_64__1094#ifdef __x86_64__
1095/// \brief Extracts a 64-bit element from the 128-bit integer vector of
1096/// [2 x i64], using the immediate value parameter \a N as a selector.
1097///
1098/// \headerfile <x86intrin.h>
1099///
1100/// \code
1101/// long long _mm_extract_epi64(__m128i X, const int N);
1102/// \endcode
1103///
1104/// This intrinsic corresponds to the <c> VPEXTRQ / PEXTRQ </c> instruction.
1105///
1106/// \param X
1107/// A 128-bit integer vector.
1108/// \param N
1109/// An immediate value. Bit [0] specifies which 64-bit vector element from
1110/// the argument \a X to return. \n
1111/// 0: Bits [63:0] are returned. \n
1112/// 1: Bits [127:64] are returned. \n
1113/// \returns A 64-bit integer.
245#define _mm_extract_epi64(X, N) (__extension__ \1114#define _mm_extract_epi64(X, N) (__extension__ \
246 ({ __v2di __a = (__v2di)(__m128i)(X); \1115 ({ __v2di __a = (__v2di)(__m128i)(X); \
247 (long long)__a[(N) & 1];}))1116 (long long)__a[(N) & 1];}))
248#endif /* __x86_64 */1117#endif /* __x86_64 */
2491118
250/* SSE4 128-bit Packed Integer Comparisons. */1119/* SSE4 128-bit Packed Integer Comparisons. */
1120/// \brief Tests whether the specified bits in a 128-bit integer vector are all
1121/// zeros.
1122///
1123/// \headerfile <x86intrin.h>
1124///
1125/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1126///
1127/// \param __M
1128/// A 128-bit integer vector containing the bits to be tested.
1129/// \param __V
1130/// A 128-bit integer vector selecting which bits to test in operand \a __M.
1131/// \returns TRUE if the specified bits are all zeros; FALSE otherwise.
251static __inline__ int __DEFAULT_FN_ATTRS1132static __inline__ int __DEFAULT_FN_ATTRS
252_mm_testz_si128(__m128i __M, __m128i __V)1133_mm_testz_si128(__m128i __M, __m128i __V)
253{1134{
254 return __builtin_ia32_ptestz128((__v2di)__M, (__v2di)__V);1135 return __builtin_ia32_ptestz128((__v2di)__M, (__v2di)__V);
255}1136}
2561137
1138/// \brief Tests whether the specified bits in a 128-bit integer vector are all
1139/// ones.
1140///
1141/// \headerfile <x86intrin.h>
1142///
1143/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1144///
1145/// \param __M
1146/// A 128-bit integer vector containing the bits to be tested.
1147/// \param __V
1148/// A 128-bit integer vector selecting which bits to test in operand \a __M.
1149/// \returns TRUE if the specified bits are all ones; FALSE otherwise.
257static __inline__ int __DEFAULT_FN_ATTRS1150static __inline__ int __DEFAULT_FN_ATTRS
258_mm_testc_si128(__m128i __M, __m128i __V)1151_mm_testc_si128(__m128i __M, __m128i __V)
259{1152{
260 return __builtin_ia32_ptestc128((__v2di)__M, (__v2di)__V);1153 return __builtin_ia32_ptestc128((__v2di)__M, (__v2di)__V);
261}1154}
2621155
1156/// \brief Tests whether the specified bits in a 128-bit integer vector are
1157/// neither all zeros nor all ones.
1158///
1159/// \headerfile <x86intrin.h>
1160///
1161/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1162///
1163/// \param __M
1164/// A 128-bit integer vector containing the bits to be tested.
1165/// \param __V
1166/// A 128-bit integer vector selecting which bits to test in operand \a __M.
1167/// \returns TRUE if the specified bits are neither all zeros nor all ones;
1168/// FALSE otherwise.
263static __inline__ int __DEFAULT_FN_ATTRS1169static __inline__ int __DEFAULT_FN_ATTRS
264_mm_testnzc_si128(__m128i __M, __m128i __V)1170_mm_testnzc_si128(__m128i __M, __m128i __V)
265{1171{
266 return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V);1172 return __builtin_ia32_ptestnzc128((__v2di)__M, (__v2di)__V);
267}1173}
2681174
1175/// \brief Tests whether the specified bits in a 128-bit integer vector are all
1176/// ones.
1177///
1178/// \headerfile <x86intrin.h>
1179///
1180/// \code
1181/// int _mm_test_all_ones(__m128i V);
1182/// \endcode
1183///
1184/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1185///
1186/// \param V
1187/// A 128-bit integer vector containing the bits to be tested.
1188/// \returns TRUE if the bits specified in the operand are all set to 1; FALSE
1189/// otherwise.
269#define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V)))1190#define _mm_test_all_ones(V) _mm_testc_si128((V), _mm_cmpeq_epi32((V), (V)))
1191
1192/// \brief Tests whether the specified bits in a 128-bit integer vector are
1193/// neither all zeros nor all ones.
1194///
1195/// \headerfile <x86intrin.h>
1196///
1197/// \code
1198/// int _mm_test_mix_ones_zeros(__m128i M, __m128i V);
1199/// \endcode
1200///
1201/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1202///
1203/// \param M
1204/// A 128-bit integer vector containing the bits to be tested.
1205/// \param V
1206/// A 128-bit integer vector selecting which bits to test in operand \a M.
1207/// \returns TRUE if the specified bits are neither all zeros nor all ones;
1208/// FALSE otherwise.
270#define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V))1209#define _mm_test_mix_ones_zeros(M, V) _mm_testnzc_si128((M), (V))
1210
1211/// \brief Tests whether the specified bits in a 128-bit integer vector are all
1212/// zeros.
1213///
1214/// \headerfile <x86intrin.h>
1215///
1216/// \code
1217/// int _mm_test_all_zeros(__m128i M, __m128i V);
1218/// \endcode
1219///
1220/// This intrinsic corresponds to the <c> VPTEST / PTEST </c> instruction.
1221///
1222/// \param M
1223/// A 128-bit integer vector containing the bits to be tested.
1224/// \param V
1225/// A 128-bit integer vector selecting which bits to test in operand \a M.
1226/// \returns TRUE if the specified bits are all zeros; FALSE otherwise.
271#define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V))1227#define _mm_test_all_zeros(M, V) _mm_testz_si128 ((M), (V))
2721228
273/* SSE4 64-bit Packed Integer Comparisons. */1229/* SSE4 64-bit Packed Integer Comparisons. */
1230/// \brief Compares each of the corresponding 64-bit values of the 128-bit
1231/// integer vectors for equality.
1232///
1233/// \headerfile <x86intrin.h>
1234///
1235/// This intrinsic corresponds to the <c> VPCMPEQQ / PCMPEQQ </c> instruction.
1236///
1237/// \param __V1
1238/// A 128-bit integer vector.
1239/// \param __V2
1240/// A 128-bit integer vector.
1241/// \returns A 128-bit integer vector containing the comparison results.
274static __inline__ __m128i __DEFAULT_FN_ATTRS1242static __inline__ __m128i __DEFAULT_FN_ATTRS
275_mm_cmpeq_epi64(__m128i __V1, __m128i __V2)1243_mm_cmpeq_epi64(__m128i __V1, __m128i __V2)
276{1244{
...@@ -278,6 +1246,19 @@ _mm_cmpeq_epi64(__m128i __V1, __m128i __V2)...@@ -278,6 +1246,19 @@ _mm_cmpeq_epi64(__m128i __V1, __m128i __V2)
278}1246}
2791247
280/* SSE4 Packed Integer Sign-Extension. */1248/* SSE4 Packed Integer Sign-Extension. */
1249/// \brief Sign-extends each of the lower eight 8-bit integer elements of a
1250/// 128-bit vector of [16 x i8] to 16-bit values and returns them in a
1251/// 128-bit vector of [8 x i16]. The upper eight elements of the input vector
1252/// are unused.
1253///
1254/// \headerfile <x86intrin.h>
1255///
1256/// This intrinsic corresponds to the <c> VPMOVSXBW / PMOVSXBW </c> instruction.
1257///
1258/// \param __V
1259/// A 128-bit vector of [16 x i8]. The lower eight 8-bit elements are sign-
1260/// extended to 16-bit values.
1261/// \returns A 128-bit vector of [8 x i16] containing the sign-extended values.
281static __inline__ __m128i __DEFAULT_FN_ATTRS1262static __inline__ __m128i __DEFAULT_FN_ATTRS
282_mm_cvtepi8_epi16(__m128i __V)1263_mm_cvtepi8_epi16(__m128i __V)
283{1264{
...@@ -286,6 +1267,19 @@ _mm_cvtepi8_epi16(__m128i __V)...@@ -286,6 +1267,19 @@ _mm_cvtepi8_epi16(__m128i __V)
286 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);1267 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);
287}1268}
2881269
1270/// \brief Sign-extends each of the lower four 8-bit integer elements of a
1271/// 128-bit vector of [16 x i8] to 32-bit values and returns them in a
1272/// 128-bit vector of [4 x i32]. The upper twelve elements of the input
1273/// vector are unused.
1274///
1275/// \headerfile <x86intrin.h>
1276///
1277/// This intrinsic corresponds to the <c> VPMOVSXBD / PMOVSXBD </c> instruction.
1278///
1279/// \param __V
1280/// A 128-bit vector of [16 x i8]. The lower four 8-bit elements are sign-
1281/// extended to 32-bit values.
1282/// \returns A 128-bit vector of [4 x i32] containing the sign-extended values.
289static __inline__ __m128i __DEFAULT_FN_ATTRS1283static __inline__ __m128i __DEFAULT_FN_ATTRS
290_mm_cvtepi8_epi32(__m128i __V)1284_mm_cvtepi8_epi32(__m128i __V)
291{1285{
...@@ -294,6 +1288,19 @@ _mm_cvtepi8_epi32(__m128i __V)...@@ -294,6 +1288,19 @@ _mm_cvtepi8_epi32(__m128i __V)
294 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3), __v4si);1288 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1, 2, 3), __v4si);
295}1289}
2961290
1291/// \brief Sign-extends each of the lower two 8-bit integer elements of a
1292/// 128-bit integer vector of [16 x i8] to 64-bit values and returns them in
1293/// a 128-bit vector of [2 x i64]. The upper fourteen elements of the input
1294/// vector are unused.
1295///
1296/// \headerfile <x86intrin.h>
1297///
1298/// This intrinsic corresponds to the <c> VPMOVSXBQ / PMOVSXBQ </c> instruction.
1299///
1300/// \param __V
1301/// A 128-bit vector of [16 x i8]. The lower two 8-bit elements are sign-
1302/// extended to 64-bit values.
1303/// \returns A 128-bit vector of [2 x i64] containing the sign-extended values.
297static __inline__ __m128i __DEFAULT_FN_ATTRS1304static __inline__ __m128i __DEFAULT_FN_ATTRS
298_mm_cvtepi8_epi64(__m128i __V)1305_mm_cvtepi8_epi64(__m128i __V)
299{1306{
...@@ -302,18 +1309,57 @@ _mm_cvtepi8_epi64(__m128i __V)...@@ -302,18 +1309,57 @@ _mm_cvtepi8_epi64(__m128i __V)
302 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1), __v2di);1309 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qs)__V, (__v16qs)__V, 0, 1), __v2di);
303}1310}
3041311
1312/// \brief Sign-extends each of the lower four 16-bit integer elements of a
1313/// 128-bit integer vector of [8 x i16] to 32-bit values and returns them in
1314/// a 128-bit vector of [4 x i32]. The upper four elements of the input
1315/// vector are unused.
1316///
1317/// \headerfile <x86intrin.h>
1318///
1319/// This intrinsic corresponds to the <c> VPMOVSXWD / PMOVSXWD </c> instruction.
1320///
1321/// \param __V
1322/// A 128-bit vector of [8 x i16]. The lower four 16-bit elements are sign-
1323/// extended to 32-bit values.
1324/// \returns A 128-bit vector of [4 x i32] containing the sign-extended values.
305static __inline__ __m128i __DEFAULT_FN_ATTRS1325static __inline__ __m128i __DEFAULT_FN_ATTRS
306_mm_cvtepi16_epi32(__m128i __V)1326_mm_cvtepi16_epi32(__m128i __V)
307{1327{
308 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1, 2, 3), __v4si);1328 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1, 2, 3), __v4si);
309}1329}
3101330
1331/// \brief Sign-extends each of the lower two 16-bit integer elements of a
1332/// 128-bit integer vector of [8 x i16] to 64-bit values and returns them in
1333/// a 128-bit vector of [2 x i64]. The upper six elements of the input
1334/// vector are unused.
1335///
1336/// \headerfile <x86intrin.h>
1337///
1338/// This intrinsic corresponds to the <c> VPMOVSXWQ / PMOVSXWQ </c> instruction.
1339///
1340/// \param __V
1341/// A 128-bit vector of [8 x i16]. The lower two 16-bit elements are sign-
1342/// extended to 64-bit values.
1343/// \returns A 128-bit vector of [2 x i64] containing the sign-extended values.
311static __inline__ __m128i __DEFAULT_FN_ATTRS1344static __inline__ __m128i __DEFAULT_FN_ATTRS
312_mm_cvtepi16_epi64(__m128i __V)1345_mm_cvtepi16_epi64(__m128i __V)
313{1346{
314 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1), __v2di);1347 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hi)__V, (__v8hi)__V, 0, 1), __v2di);
315}1348}
3161349
1350/// \brief Sign-extends each of the lower two 32-bit integer elements of a
1351/// 128-bit integer vector of [4 x i32] to 64-bit values and returns them in
1352/// a 128-bit vector of [2 x i64]. The upper two elements of the input vector
1353/// are unused.
1354///
1355/// \headerfile <x86intrin.h>
1356///
1357/// This intrinsic corresponds to the <c> VPMOVSXDQ / PMOVSXDQ </c> instruction.
1358///
1359/// \param __V
1360/// A 128-bit vector of [4 x i32]. The lower two 32-bit elements are sign-
1361/// extended to 64-bit values.
1362/// \returns A 128-bit vector of [2 x i64] containing the sign-extended values.
317static __inline__ __m128i __DEFAULT_FN_ATTRS1363static __inline__ __m128i __DEFAULT_FN_ATTRS
318_mm_cvtepi32_epi64(__m128i __V)1364_mm_cvtepi32_epi64(__m128i __V)
319{1365{
...@@ -321,36 +1367,114 @@ _mm_cvtepi32_epi64(__m128i __V)...@@ -321,36 +1367,114 @@ _mm_cvtepi32_epi64(__m128i __V)
321}1367}
3221368
323/* SSE4 Packed Integer Zero-Extension. */1369/* SSE4 Packed Integer Zero-Extension. */
1370/// \brief Zero-extends each of the lower eight 8-bit integer elements of a
1371/// 128-bit vector of [16 x i8] to 16-bit values and returns them in a
1372/// 128-bit vector of [8 x i16]. The upper eight elements of the input vector
1373/// are unused.
1374///
1375/// \headerfile <x86intrin.h>
1376///
1377/// This intrinsic corresponds to the <c> VPMOVZXBW / PMOVZXBW </c> instruction.
1378///
1379/// \param __V
1380/// A 128-bit vector of [16 x i8]. The lower eight 8-bit elements are zero-
1381/// extended to 16-bit values.
1382/// \returns A 128-bit vector of [8 x i16] containing the zero-extended values.
324static __inline__ __m128i __DEFAULT_FN_ATTRS1383static __inline__ __m128i __DEFAULT_FN_ATTRS
325_mm_cvtepu8_epi16(__m128i __V)1384_mm_cvtepu8_epi16(__m128i __V)
326{1385{
327 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);1386 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3, 4, 5, 6, 7), __v8hi);
328}1387}
3291388
1389/// \brief Zero-extends each of the lower four 8-bit integer elements of a
1390/// 128-bit vector of [16 x i8] to 32-bit values and returns them in a
1391/// 128-bit vector of [4 x i32]. The upper twelve elements of the input
1392/// vector are unused.
1393///
1394/// \headerfile <x86intrin.h>
1395///
1396/// This intrinsic corresponds to the <c> VPMOVZXBD / PMOVZXBD </c> instruction.
1397///
1398/// \param __V
1399/// A 128-bit vector of [16 x i8]. The lower four 8-bit elements are zero-
1400/// extended to 32-bit values.
1401/// \returns A 128-bit vector of [4 x i32] containing the zero-extended values.
330static __inline__ __m128i __DEFAULT_FN_ATTRS1402static __inline__ __m128i __DEFAULT_FN_ATTRS
331_mm_cvtepu8_epi32(__m128i __V)1403_mm_cvtepu8_epi32(__m128i __V)
332{1404{
333 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3), __v4si);1405 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1, 2, 3), __v4si);
334}1406}
3351407
1408/// \brief Zero-extends each of the lower two 8-bit integer elements of a
1409/// 128-bit integer vector of [16 x i8] to 64-bit values and returns them in
1410/// a 128-bit vector of [2 x i64]. The upper fourteen elements of the input
1411/// vector are unused.
1412///
1413/// \headerfile <x86intrin.h>
1414///
1415/// This intrinsic corresponds to the <c> VPMOVZXBQ / PMOVZXBQ </c> instruction.
1416///
1417/// \param __V
1418/// A 128-bit vector of [16 x i8]. The lower two 8-bit elements are zero-
1419/// extended to 64-bit values.
1420/// \returns A 128-bit vector of [2 x i64] containing the zero-extended values.
336static __inline__ __m128i __DEFAULT_FN_ATTRS1421static __inline__ __m128i __DEFAULT_FN_ATTRS
337_mm_cvtepu8_epi64(__m128i __V)1422_mm_cvtepu8_epi64(__m128i __V)
338{1423{
339 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1), __v2di);1424 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v16qu)__V, (__v16qu)__V, 0, 1), __v2di);
340}1425}
3411426
1427/// \brief Zero-extends each of the lower four 16-bit integer elements of a
1428/// 128-bit integer vector of [8 x i16] to 32-bit values and returns them in
1429/// a 128-bit vector of [4 x i32]. The upper four elements of the input
1430/// vector are unused.
1431///
1432/// \headerfile <x86intrin.h>
1433///
1434/// This intrinsic corresponds to the <c> VPMOVZXWD / PMOVZXWD </c> instruction.
1435///
1436/// \param __V
1437/// A 128-bit vector of [8 x i16]. The lower four 16-bit elements are zero-
1438/// extended to 32-bit values.
1439/// \returns A 128-bit vector of [4 x i32] containing the zero-extended values.
342static __inline__ __m128i __DEFAULT_FN_ATTRS1440static __inline__ __m128i __DEFAULT_FN_ATTRS
343_mm_cvtepu16_epi32(__m128i __V)1441_mm_cvtepu16_epi32(__m128i __V)
344{1442{
345 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1, 2, 3), __v4si);1443 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1, 2, 3), __v4si);
346}1444}
3471445
1446/// \brief Zero-extends each of the lower two 16-bit integer elements of a
1447/// 128-bit integer vector of [8 x i16] to 64-bit values and returns them in
1448/// a 128-bit vector of [2 x i64]. The upper six elements of the input vector
1449/// are unused.
1450///
1451/// \headerfile <x86intrin.h>
1452///
1453/// This intrinsic corresponds to the <c> VPMOVZXWQ / PMOVZXWQ </c> instruction.
1454///
1455/// \param __V
1456/// A 128-bit vector of [8 x i16]. The lower two 16-bit elements are zero-
1457/// extended to 64-bit values.
1458/// \returns A 128-bit vector of [2 x i64] containing the zero-extended values.
348static __inline__ __m128i __DEFAULT_FN_ATTRS1459static __inline__ __m128i __DEFAULT_FN_ATTRS
349_mm_cvtepu16_epi64(__m128i __V)1460_mm_cvtepu16_epi64(__m128i __V)
350{1461{
351 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1), __v2di);1462 return (__m128i)__builtin_convertvector(__builtin_shufflevector((__v8hu)__V, (__v8hu)__V, 0, 1), __v2di);
352}1463}
3531464
1465/// \brief Zero-extends each of the lower two 32-bit integer elements of a
1466/// 128-bit integer vector of [4 x i32] to 64-bit values and returns them in
1467/// a 128-bit vector of [2 x i64]. The upper two elements of the input vector
1468/// are unused.
1469///
1470/// \headerfile <x86intrin.h>
1471///
1472/// This intrinsic corresponds to the <c> VPMOVZXDQ / PMOVZXDQ </c> instruction.
1473///
1474/// \param __V
1475/// A 128-bit vector of [4 x i32]. The lower two 32-bit elements are zero-
1476/// extended to 64-bit values.
1477/// \returns A 128-bit vector of [2 x i64] containing the zero-extended values.
354static __inline__ __m128i __DEFAULT_FN_ATTRS1478static __inline__ __m128i __DEFAULT_FN_ATTRS
355_mm_cvtepu32_epi64(__m128i __V)1479_mm_cvtepu32_epi64(__m128i __V)
356{1480{
...@@ -358,6 +1482,28 @@ _mm_cvtepu32_epi64(__m128i __V)...@@ -358,6 +1482,28 @@ _mm_cvtepu32_epi64(__m128i __V)
358}1482}
3591483
360/* SSE4 Pack with Unsigned Saturation. */1484/* SSE4 Pack with Unsigned Saturation. */
1485/// \brief Converts 32-bit signed integers from both 128-bit integer vector
1486/// operands into 16-bit unsigned integers, and returns the packed result.
1487/// Values greater than 0xFFFF are saturated to 0xFFFF. Values less than
1488/// 0x0000 are saturated to 0x0000.
1489///
1490/// \headerfile <x86intrin.h>
1491///
1492/// This intrinsic corresponds to the <c> VPACKUSDW / PACKUSDW </c> instruction.
1493///
1494/// \param __V1
1495/// A 128-bit vector of [4 x i32]. Each 32-bit element is treated as a
1496/// signed integer and is converted to a 16-bit unsigned integer with
1497/// saturation. Values greater than 0xFFFF are saturated to 0xFFFF. Values
1498/// less than 0x0000 are saturated to 0x0000. The converted [4 x i16] values
1499/// are written to the lower 64 bits of the result.
1500/// \param __V2
1501/// A 128-bit vector of [4 x i32]. Each 32-bit element is treated as a
1502/// signed integer and is converted to a 16-bit unsigned integer with
1503/// saturation. Values greater than 0xFFFF are saturated to 0xFFFF. Values
1504/// less than 0x0000 are saturated to 0x0000. The converted [4 x i16] values
1505/// are written to the higher 64 bits of the result.
1506/// \returns A 128-bit vector of [8 x i16] containing the converted values.
361static __inline__ __m128i __DEFAULT_FN_ATTRS1507static __inline__ __m128i __DEFAULT_FN_ATTRS
362_mm_packus_epi32(__m128i __V1, __m128i __V2)1508_mm_packus_epi32(__m128i __V1, __m128i __V2)
363{1509{
...@@ -365,10 +1511,58 @@ _mm_packus_epi32(__m128i __V1, __m128i __V2)...@@ -365,10 +1511,58 @@ _mm_packus_epi32(__m128i __V1, __m128i __V2)
365}1511}
3661512
367/* SSE4 Multiple Packed Sums of Absolute Difference. */1513/* SSE4 Multiple Packed Sums of Absolute Difference. */
1514/// \brief Subtracts 8-bit unsigned integer values and computes the absolute
1515/// values of the differences to the corresponding bits in the destination.
1516/// Then sums of the absolute differences are returned according to the bit
1517/// fields in the immediate operand.
1518///
1519/// \headerfile <x86intrin.h>
1520///
1521/// \code
1522/// __m128i _mm_mpsadbw_epu8(__m128i X, __m128i Y, const int M);
1523/// \endcode
1524///
1525/// This intrinsic corresponds to the <c> VMPSADBW / MPSADBW </c> instruction.
1526///
1527/// \param X
1528/// A 128-bit vector of [16 x i8].
1529/// \param Y
1530/// A 128-bit vector of [16 x i8].
1531/// \param M
1532/// An 8-bit immediate operand specifying how the absolute differences are to
1533/// be calculated, according to the following algorithm:
1534/// \code
1535/// // M2 represents bit 2 of the immediate operand
1536/// // M10 represents bits [1:0] of the immediate operand
1537/// i = M2 * 4
1538/// j = M10 * 4
1539/// for (k = 0; k < 8; k = k + 1) {
1540/// d0 = abs(X[i + k + 0] - Y[j + 0])
1541/// d1 = abs(X[i + k + 1] - Y[j + 1])
1542/// d2 = abs(X[i + k + 2] - Y[j + 2])
1543/// d3 = abs(X[i + k + 3] - Y[j + 3])
1544/// r[k] = d0 + d1 + d2 + d3
1545/// }
1546/// \endcode
1547/// \returns A 128-bit integer vector containing the sums of the sets of
1548/// absolute differences between both operands.
368#define _mm_mpsadbw_epu8(X, Y, M) __extension__ ({ \1549#define _mm_mpsadbw_epu8(X, Y, M) __extension__ ({ \
369 (__m128i) __builtin_ia32_mpsadbw128((__v16qi)(__m128i)(X), \1550 (__m128i) __builtin_ia32_mpsadbw128((__v16qi)(__m128i)(X), \
370 (__v16qi)(__m128i)(Y), (M)); })1551 (__v16qi)(__m128i)(Y), (M)); })
3711552
1553/// \brief Finds the minimum unsigned 16-bit element in the input 128-bit
1554/// vector of [8 x u16] and returns it and along with its index.
1555///
1556/// \headerfile <x86intrin.h>
1557///
1558/// This intrinsic corresponds to the <c> VPHMINPOSUW / PHMINPOSUW </c>
1559/// instruction.
1560///
1561/// \param __V
1562/// A 128-bit vector of [8 x u16].
1563/// \returns A 128-bit value where bits [15:0] contain the minimum value found
1564/// in parameter \a __V, bits [18:16] contain the index of the minimum value
1565/// and the remaining bits are set to 0.
372static __inline__ __m128i __DEFAULT_FN_ATTRS1566static __inline__ __m128i __DEFAULT_FN_ATTRS
373_mm_minpos_epu16(__m128i __V)1567_mm_minpos_epu16(__m128i __V)
374{1568{
...@@ -410,61 +1604,769 @@ _mm_minpos_epu16(__m128i __V)...@@ -410,61 +1604,769 @@ _mm_minpos_epu16(__m128i __V)
410#define _SIDD_UNIT_MASK 0x401604#define _SIDD_UNIT_MASK 0x40
4111605
412/* SSE4.2 Packed Comparison Intrinsics. */1606/* SSE4.2 Packed Comparison Intrinsics. */
1607/// \brief Uses the immediate operand \a M to perform a comparison of string
1608/// data with implicitly defined lengths that is contained in source operands
1609/// \a A and \a B. Returns a 128-bit integer vector representing the result
1610/// mask of the comparison.
1611///
1612/// \headerfile <x86intrin.h>
1613///
1614/// \code
1615/// __m128i _mm_cmpistrm(__m128i A, __m128i B, const int M);
1616/// \endcode
1617///
1618/// This intrinsic corresponds to the <c> VPCMPISTRM / PCMPISTRM </c>
1619/// instruction.
1620///
1621/// \param A
1622/// A 128-bit integer vector containing one of the source operands to be
1623/// compared.
1624/// \param B
1625/// A 128-bit integer vector containing one of the source operands to be
1626/// compared.
1627/// \param M
1628/// An 8-bit immediate operand specifying whether the characters are bytes or
1629/// words, the type of comparison to perform, and the format of the return
1630/// value. \n
1631/// Bits [1:0]: Determine source data format. \n
1632/// 00: 16 unsigned bytes \n
1633/// 01: 8 unsigned words \n
1634/// 10: 16 signed bytes \n
1635/// 11: 8 signed words \n
1636/// Bits [3:2]: Determine comparison type and aggregation method. \n
1637/// 00: Subset: Each character in \a B is compared for equality with all
1638/// the characters in \a A. \n
1639/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1640/// basis is greater than or equal for even-indexed elements in \a A,
1641/// and less than or equal for odd-indexed elements in \a A. \n
1642/// 10: Match: Compare each pair of corresponding characters in \a A and
1643/// \a B for equality. \n
1644/// 11: Substring: Search \a B for substring matches of \a A. \n
1645/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1646/// mask of the comparison results. \n
1647/// 00: No effect. \n
1648/// 01: Negate the bit mask. \n
1649/// 10: No effect. \n
1650/// 11: Negate the bit mask only for bits with an index less than or equal
1651/// to the size of \a A or \a B. \n
1652/// Bit [6]: Determines whether the result is zero-extended or expanded to 16
1653/// bytes. \n
1654/// 0: The result is zero-extended to 16 bytes. \n
1655/// 1: The result is expanded to 16 bytes (this expansion is performed by
1656/// repeating each bit 8 or 16 times).
1657/// \returns Returns a 128-bit integer vector representing the result mask of
1658/// the comparison.
413#define _mm_cmpistrm(A, B, M) \1659#define _mm_cmpistrm(A, B, M) \
414 (__m128i)__builtin_ia32_pcmpistrm128((__v16qi)(__m128i)(A), \1660 (__m128i)__builtin_ia32_pcmpistrm128((__v16qi)(__m128i)(A), \
415 (__v16qi)(__m128i)(B), (int)(M))1661 (__v16qi)(__m128i)(B), (int)(M))
1662
1663/// \brief Uses the immediate operand \a M to perform a comparison of string
1664/// data with implicitly defined lengths that is contained in source operands
1665/// \a A and \a B. Returns an integer representing the result index of the
1666/// comparison.
1667///
1668/// \headerfile <x86intrin.h>
1669///
1670/// \code
1671/// int _mm_cmpistri(__m128i A, __m128i B, const int M);
1672/// \endcode
1673///
1674/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
1675/// instruction.
1676///
1677/// \param A
1678/// A 128-bit integer vector containing one of the source operands to be
1679/// compared.
1680/// \param B
1681/// A 128-bit integer vector containing one of the source operands to be
1682/// compared.
1683/// \param M
1684/// An 8-bit immediate operand specifying whether the characters are bytes or
1685/// words, the type of comparison to perform, and the format of the return
1686/// value. \n
1687/// Bits [1:0]: Determine source data format. \n
1688/// 00: 16 unsigned bytes \n
1689/// 01: 8 unsigned words \n
1690/// 10: 16 signed bytes \n
1691/// 11: 8 signed words \n
1692/// Bits [3:2]: Determine comparison type and aggregation method. \n
1693/// 00: Subset: Each character in \a B is compared for equality with all
1694/// the characters in \a A. \n
1695/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1696/// basis is greater than or equal for even-indexed elements in \a A,
1697/// and less than or equal for odd-indexed elements in \a A. \n
1698/// 10: Match: Compare each pair of corresponding characters in \a A and
1699/// \a B for equality. \n
1700/// 11: Substring: Search B for substring matches of \a A. \n
1701/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1702/// mask of the comparison results. \n
1703/// 00: No effect. \n
1704/// 01: Negate the bit mask. \n
1705/// 10: No effect. \n
1706/// 11: Negate the bit mask only for bits with an index less than or equal
1707/// to the size of \a A or \a B. \n
1708/// Bit [6]: Determines whether the index of the lowest set bit or the
1709/// highest set bit is returned. \n
1710/// 0: The index of the least significant set bit. \n
1711/// 1: The index of the most significant set bit. \n
1712/// \returns Returns an integer representing the result index of the comparison.
416#define _mm_cmpistri(A, B, M) \1713#define _mm_cmpistri(A, B, M) \
417 (int)__builtin_ia32_pcmpistri128((__v16qi)(__m128i)(A), \1714 (int)__builtin_ia32_pcmpistri128((__v16qi)(__m128i)(A), \
418 (__v16qi)(__m128i)(B), (int)(M))1715 (__v16qi)(__m128i)(B), (int)(M))
4191716
1717/// \brief Uses the immediate operand \a M to perform a comparison of string
1718/// data with explicitly defined lengths that is contained in source operands
1719/// \a A and \a B. Returns a 128-bit integer vector representing the result
1720/// mask of the comparison.
1721///
1722/// \headerfile <x86intrin.h>
1723///
1724/// \code
1725/// __m128i _mm_cmpestrm(__m128i A, int LA, __m128i B, int LB, const int M);
1726/// \endcode
1727///
1728/// This intrinsic corresponds to the <c> VPCMPESTRM / PCMPESTRM </c>
1729/// instruction.
1730///
1731/// \param A
1732/// A 128-bit integer vector containing one of the source operands to be
1733/// compared.
1734/// \param LA
1735/// An integer that specifies the length of the string in \a A.
1736/// \param B
1737/// A 128-bit integer vector containing one of the source operands to be
1738/// compared.
1739/// \param LB
1740/// An integer that specifies the length of the string in \a B.
1741/// \param M
1742/// An 8-bit immediate operand specifying whether the characters are bytes or
1743/// words, the type of comparison to perform, and the format of the return
1744/// value. \n
1745/// Bits [1:0]: Determine source data format. \n
1746/// 00: 16 unsigned bytes \n
1747/// 01: 8 unsigned words \n
1748/// 10: 16 signed bytes \n
1749/// 11: 8 signed words \n
1750/// Bits [3:2]: Determine comparison type and aggregation method. \n
1751/// 00: Subset: Each character in \a B is compared for equality with all
1752/// the characters in \a A. \n
1753/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1754/// basis is greater than or equal for even-indexed elements in \a A,
1755/// and less than or equal for odd-indexed elements in \a A. \n
1756/// 10: Match: Compare each pair of corresponding characters in \a A and
1757/// \a B for equality. \n
1758/// 11: Substring: Search \a B for substring matches of \a A. \n
1759/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1760/// mask of the comparison results. \n
1761/// 00: No effect. \n
1762/// 01: Negate the bit mask. \n
1763/// 10: No effect. \n
1764/// 11: Negate the bit mask only for bits with an index less than or equal
1765/// to the size of \a A or \a B. \n
1766/// Bit [6]: Determines whether the result is zero-extended or expanded to 16
1767/// bytes. \n
1768/// 0: The result is zero-extended to 16 bytes. \n
1769/// 1: The result is expanded to 16 bytes (this expansion is performed by
1770/// repeating each bit 8 or 16 times). \n
1771/// \returns Returns a 128-bit integer vector representing the result mask of
1772/// the comparison.
420#define _mm_cmpestrm(A, LA, B, LB, M) \1773#define _mm_cmpestrm(A, LA, B, LB, M) \
421 (__m128i)__builtin_ia32_pcmpestrm128((__v16qi)(__m128i)(A), (int)(LA), \1774 (__m128i)__builtin_ia32_pcmpestrm128((__v16qi)(__m128i)(A), (int)(LA), \
422 (__v16qi)(__m128i)(B), (int)(LB), \1775 (__v16qi)(__m128i)(B), (int)(LB), \
423 (int)(M))1776 (int)(M))
1777
1778/// \brief Uses the immediate operand \a M to perform a comparison of string
1779/// data with explicitly defined lengths that is contained in source operands
1780/// \a A and \a B. Returns an integer representing the result index of the
1781/// comparison.
1782///
1783/// \headerfile <x86intrin.h>
1784///
1785/// \code
1786/// int _mm_cmpestri(__m128i A, int LA, __m128i B, int LB, const int M);
1787/// \endcode
1788///
1789/// This intrinsic corresponds to the <c> VPCMPESTRI / PCMPESTRI </c>
1790/// instruction.
1791///
1792/// \param A
1793/// A 128-bit integer vector containing one of the source operands to be
1794/// compared.
1795/// \param LA
1796/// An integer that specifies the length of the string in \a A.
1797/// \param B
1798/// A 128-bit integer vector containing one of the source operands to be
1799/// compared.
1800/// \param LB
1801/// An integer that specifies the length of the string in \a B.
1802/// \param M
1803/// An 8-bit immediate operand specifying whether the characters are bytes or
1804/// words, the type of comparison to perform, and the format of the return
1805/// value. \n
1806/// Bits [1:0]: Determine source data format. \n
1807/// 00: 16 unsigned bytes \n
1808/// 01: 8 unsigned words \n
1809/// 10: 16 signed bytes \n
1810/// 11: 8 signed words \n
1811/// Bits [3:2]: Determine comparison type and aggregation method. \n
1812/// 00: Subset: Each character in \a B is compared for equality with all
1813/// the characters in \a A. \n
1814/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1815/// basis is greater than or equal for even-indexed elements in \a A,
1816/// and less than or equal for odd-indexed elements in \a A. \n
1817/// 10: Match: Compare each pair of corresponding characters in \a A and
1818/// \a B for equality. \n
1819/// 11: Substring: Search B for substring matches of \a A. \n
1820/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1821/// mask of the comparison results. \n
1822/// 00: No effect. \n
1823/// 01: Negate the bit mask. \n
1824/// 10: No effect. \n
1825/// 11: Negate the bit mask only for bits with an index less than or equal
1826/// to the size of \a A or \a B. \n
1827/// Bit [6]: Determines whether the index of the lowest set bit or the
1828/// highest set bit is returned. \n
1829/// 0: The index of the least significant set bit. \n
1830/// 1: The index of the most significant set bit. \n
1831/// \returns Returns an integer representing the result index of the comparison.
424#define _mm_cmpestri(A, LA, B, LB, M) \1832#define _mm_cmpestri(A, LA, B, LB, M) \
425 (int)__builtin_ia32_pcmpestri128((__v16qi)(__m128i)(A), (int)(LA), \1833 (int)__builtin_ia32_pcmpestri128((__v16qi)(__m128i)(A), (int)(LA), \
426 (__v16qi)(__m128i)(B), (int)(LB), \1834 (__v16qi)(__m128i)(B), (int)(LB), \
427 (int)(M))1835 (int)(M))
4281836
429/* SSE4.2 Packed Comparison Intrinsics and EFlag Reading. */1837/* SSE4.2 Packed Comparison Intrinsics and EFlag Reading. */
1838/// \brief Uses the immediate operand \a M to perform a comparison of string
1839/// data with implicitly defined lengths that is contained in source operands
1840/// \a A and \a B. Returns 1 if the bit mask is zero and the length of the
1841/// string in \a B is the maximum, otherwise, returns 0.
1842///
1843/// \headerfile <x86intrin.h>
1844///
1845/// \code
1846/// int _mm_cmpistra(__m128i A, __m128i B, const int M);
1847/// \endcode
1848///
1849/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
1850/// instruction.
1851///
1852/// \param A
1853/// A 128-bit integer vector containing one of the source operands to be
1854/// compared.
1855/// \param B
1856/// A 128-bit integer vector containing one of the source operands to be
1857/// compared.
1858/// \param M
1859/// An 8-bit immediate operand specifying whether the characters are bytes or
1860/// words and the type of comparison to perform. \n
1861/// Bits [1:0]: Determine source data format. \n
1862/// 00: 16 unsigned bytes \n
1863/// 01: 8 unsigned words \n
1864/// 10: 16 signed bytes \n
1865/// 11: 8 signed words \n
1866/// Bits [3:2]: Determine comparison type and aggregation method. \n
1867/// 00: Subset: Each character in \a B is compared for equality with all
1868/// the characters in \a A. \n
1869/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1870/// basis is greater than or equal for even-indexed elements in \a A,
1871/// and less than or equal for odd-indexed elements in \a A. \n
1872/// 10: Match: Compare each pair of corresponding characters in \a A and
1873/// \a B for equality. \n
1874/// 11: Substring: Search \a B for substring matches of \a A. \n
1875/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1876/// mask of the comparison results. \n
1877/// 00: No effect. \n
1878/// 01: Negate the bit mask. \n
1879/// 10: No effect. \n
1880/// 11: Negate the bit mask only for bits with an index less than or equal
1881/// to the size of \a A or \a B. \n
1882/// \returns Returns 1 if the bit mask is zero and the length of the string in
1883/// \a B is the maximum; otherwise, returns 0.
430#define _mm_cmpistra(A, B, M) \1884#define _mm_cmpistra(A, B, M) \
431 (int)__builtin_ia32_pcmpistria128((__v16qi)(__m128i)(A), \1885 (int)__builtin_ia32_pcmpistria128((__v16qi)(__m128i)(A), \
432 (__v16qi)(__m128i)(B), (int)(M))1886 (__v16qi)(__m128i)(B), (int)(M))
1887
1888/// \brief Uses the immediate operand \a M to perform a comparison of string
1889/// data with implicitly defined lengths that is contained in source operands
1890/// \a A and \a B. Returns 1 if the bit mask is non-zero, otherwise, returns
1891/// 0.
1892///
1893/// \headerfile <x86intrin.h>
1894///
1895/// \code
1896/// int _mm_cmpistrc(__m128i A, __m128i B, const int M);
1897/// \endcode
1898///
1899/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
1900/// instruction.
1901///
1902/// \param A
1903/// A 128-bit integer vector containing one of the source operands to be
1904/// compared.
1905/// \param B
1906/// A 128-bit integer vector containing one of the source operands to be
1907/// compared.
1908/// \param M
1909/// An 8-bit immediate operand specifying whether the characters are bytes or
1910/// words and the type of comparison to perform. \n
1911/// Bits [1:0]: Determine source data format. \n
1912/// 00: 16 unsigned bytes \n
1913/// 01: 8 unsigned words \n
1914/// 10: 16 signed bytes \n
1915/// 11: 8 signed words \n
1916/// Bits [3:2]: Determine comparison type and aggregation method. \n
1917/// 00: Subset: Each character in \a B is compared for equality with all
1918/// the characters in \a A. \n
1919/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1920/// basis is greater than or equal for even-indexed elements in \a A,
1921/// and less than or equal for odd-indexed elements in \a A. \n
1922/// 10: Match: Compare each pair of corresponding characters in \a A and
1923/// \a B for equality. \n
1924/// 11: Substring: Search B for substring matches of \a A. \n
1925/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1926/// mask of the comparison results. \n
1927/// 00: No effect. \n
1928/// 01: Negate the bit mask. \n
1929/// 10: No effect. \n
1930/// 11: Negate the bit mask only for bits with an index less than or equal
1931/// to the size of \a A or \a B.
1932/// \returns Returns 1 if the bit mask is non-zero, otherwise, returns 0.
433#define _mm_cmpistrc(A, B, M) \1933#define _mm_cmpistrc(A, B, M) \
434 (int)__builtin_ia32_pcmpistric128((__v16qi)(__m128i)(A), \1934 (int)__builtin_ia32_pcmpistric128((__v16qi)(__m128i)(A), \
435 (__v16qi)(__m128i)(B), (int)(M))1935 (__v16qi)(__m128i)(B), (int)(M))
1936
1937/// \brief Uses the immediate operand \a M to perform a comparison of string
1938/// data with implicitly defined lengths that is contained in source operands
1939/// \a A and \a B. Returns bit 0 of the resulting bit mask.
1940///
1941/// \headerfile <x86intrin.h>
1942///
1943/// \code
1944/// int _mm_cmpistro(__m128i A, __m128i B, const int M);
1945/// \endcode
1946///
1947/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
1948/// instruction.
1949///
1950/// \param A
1951/// A 128-bit integer vector containing one of the source operands to be
1952/// compared.
1953/// \param B
1954/// A 128-bit integer vector containing one of the source operands to be
1955/// compared.
1956/// \param M
1957/// An 8-bit immediate operand specifying whether the characters are bytes or
1958/// words and the type of comparison to perform. \n
1959/// Bits [1:0]: Determine source data format. \n
1960/// 00: 16 unsigned bytes \n
1961/// 01: 8 unsigned words \n
1962/// 10: 16 signed bytes \n
1963/// 11: 8 signed words \n
1964/// Bits [3:2]: Determine comparison type and aggregation method. \n
1965/// 00: Subset: Each character in \a B is compared for equality with all
1966/// the characters in \a A. \n
1967/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
1968/// basis is greater than or equal for even-indexed elements in \a A,
1969/// and less than or equal for odd-indexed elements in \a A. \n
1970/// 10: Match: Compare each pair of corresponding characters in \a A and
1971/// \a B for equality. \n
1972/// 11: Substring: Search B for substring matches of \a A. \n
1973/// Bits [5:4]: Determine whether to perform a one's complement on the bit
1974/// mask of the comparison results. \n
1975/// 00: No effect. \n
1976/// 01: Negate the bit mask. \n
1977/// 10: No effect. \n
1978/// 11: Negate the bit mask only for bits with an index less than or equal
1979/// to the size of \a A or \a B. \n
1980/// \returns Returns bit 0 of the resulting bit mask.
436#define _mm_cmpistro(A, B, M) \1981#define _mm_cmpistro(A, B, M) \
437 (int)__builtin_ia32_pcmpistrio128((__v16qi)(__m128i)(A), \1982 (int)__builtin_ia32_pcmpistrio128((__v16qi)(__m128i)(A), \
438 (__v16qi)(__m128i)(B), (int)(M))1983 (__v16qi)(__m128i)(B), (int)(M))
1984
1985/// \brief Uses the immediate operand \a M to perform a comparison of string
1986/// data with implicitly defined lengths that is contained in source operands
1987/// \a A and \a B. Returns 1 if the length of the string in \a A is less than
1988/// the maximum, otherwise, returns 0.
1989///
1990/// \headerfile <x86intrin.h>
1991///
1992/// \code
1993/// int _mm_cmpistrs(__m128i A, __m128i B, const int M);
1994/// \endcode
1995///
1996/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
1997/// instruction.
1998///
1999/// \param A
2000/// A 128-bit integer vector containing one of the source operands to be
2001/// compared.
2002/// \param B
2003/// A 128-bit integer vector containing one of the source operands to be
2004/// compared.
2005/// \param M
2006/// An 8-bit immediate operand specifying whether the characters are bytes or
2007/// words and the type of comparison to perform. \n
2008/// Bits [1:0]: Determine source data format. \n
2009/// 00: 16 unsigned bytes \n
2010/// 01: 8 unsigned words \n
2011/// 10: 16 signed bytes \n
2012/// 11: 8 signed words \n
2013/// Bits [3:2]: Determine comparison type and aggregation method. \n
2014/// 00: Subset: Each character in \a B is compared for equality with all
2015/// the characters in \a A. \n
2016/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2017/// basis is greater than or equal for even-indexed elements in \a A,
2018/// and less than or equal for odd-indexed elements in \a A. \n
2019/// 10: Match: Compare each pair of corresponding characters in \a A and
2020/// \a B for equality. \n
2021/// 11: Substring: Search \a B for substring matches of \a A. \n
2022/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2023/// mask of the comparison results. \n
2024/// 00: No effect. \n
2025/// 01: Negate the bit mask. \n
2026/// 10: No effect. \n
2027/// 11: Negate the bit mask only for bits with an index less than or equal
2028/// to the size of \a A or \a B. \n
2029/// \returns Returns 1 if the length of the string in \a A is less than the
2030/// maximum, otherwise, returns 0.
439#define _mm_cmpistrs(A, B, M) \2031#define _mm_cmpistrs(A, B, M) \
440 (int)__builtin_ia32_pcmpistris128((__v16qi)(__m128i)(A), \2032 (int)__builtin_ia32_pcmpistris128((__v16qi)(__m128i)(A), \
441 (__v16qi)(__m128i)(B), (int)(M))2033 (__v16qi)(__m128i)(B), (int)(M))
2034
2035/// \brief Uses the immediate operand \a M to perform a comparison of string
2036/// data with implicitly defined lengths that is contained in source operands
2037/// \a A and \a B. Returns 1 if the length of the string in \a B is less than
2038/// the maximum, otherwise, returns 0.
2039///
2040/// \headerfile <x86intrin.h>
2041///
2042/// \code
2043/// int _mm_cmpistrz(__m128i A, __m128i B, const int M);
2044/// \endcode
2045///
2046/// This intrinsic corresponds to the <c> VPCMPISTRI / PCMPISTRI </c>
2047/// instruction.
2048///
2049/// \param A
2050/// A 128-bit integer vector containing one of the source operands to be
2051/// compared.
2052/// \param B
2053/// A 128-bit integer vector containing one of the source operands to be
2054/// compared.
2055/// \param M
2056/// An 8-bit immediate operand specifying whether the characters are bytes or
2057/// words and the type of comparison to perform. \n
2058/// Bits [1:0]: Determine source data format. \n
2059/// 00: 16 unsigned bytes \n
2060/// 01: 8 unsigned words \n
2061/// 10: 16 signed bytes \n
2062/// 11: 8 signed words \n
2063/// Bits [3:2]: Determine comparison type and aggregation method. \n
2064/// 00: Subset: Each character in \a B is compared for equality with all
2065/// the characters in \a A. \n
2066/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2067/// basis is greater than or equal for even-indexed elements in \a A,
2068/// and less than or equal for odd-indexed elements in \a A. \n
2069/// 10: Match: Compare each pair of corresponding characters in \a A and
2070/// \a B for equality. \n
2071/// 11: Substring: Search \a B for substring matches of \a A. \n
2072/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2073/// mask of the comparison results. \n
2074/// 00: No effect. \n
2075/// 01: Negate the bit mask. \n
2076/// 10: No effect. \n
2077/// 11: Negate the bit mask only for bits with an index less than or equal
2078/// to the size of \a A or \a B.
2079/// \returns Returns 1 if the length of the string in \a B is less than the
2080/// maximum, otherwise, returns 0.
442#define _mm_cmpistrz(A, B, M) \2081#define _mm_cmpistrz(A, B, M) \
443 (int)__builtin_ia32_pcmpistriz128((__v16qi)(__m128i)(A), \2082 (int)__builtin_ia32_pcmpistriz128((__v16qi)(__m128i)(A), \
444 (__v16qi)(__m128i)(B), (int)(M))2083 (__v16qi)(__m128i)(B), (int)(M))
4452084
2085/// \brief Uses the immediate operand \a M to perform a comparison of string
2086/// data with explicitly defined lengths that is contained in source operands
2087/// \a A and \a B. Returns 1 if the bit mask is zero and the length of the
2088/// string in \a B is the maximum, otherwise, returns 0.
2089///
2090/// \headerfile <x86intrin.h>
2091///
2092/// \code
2093/// int _mm_cmpestra(__m128i A, int LA, __m128i B, int LB, const int M);
2094/// \endcode
2095///
2096/// This intrinsic corresponds to the <c> VPCMPESTRI / PCMPESTRI </c>
2097/// instruction.
2098///
2099/// \param A
2100/// A 128-bit integer vector containing one of the source operands to be
2101/// compared.
2102/// \param LA
2103/// An integer that specifies the length of the string in \a A.
2104/// \param B
2105/// A 128-bit integer vector containing one of the source operands to be
2106/// compared.
2107/// \param LB
2108/// An integer that specifies the length of the string in \a B.
2109/// \param M
2110/// An 8-bit immediate operand specifying whether the characters are bytes or
2111/// words and the type of comparison to perform. \n
2112/// Bits [1:0]: Determine source data format. \n
2113/// 00: 16 unsigned bytes \n
2114/// 01: 8 unsigned words \n
2115/// 10: 16 signed bytes \n
2116/// 11: 8 signed words \n
2117/// Bits [3:2]: Determine comparison type and aggregation method. \n
2118/// 00: Subset: Each character in \a B is compared for equality with all
2119/// the characters in \a A. \n
2120/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2121/// basis is greater than or equal for even-indexed elements in \a A,
2122/// and less than or equal for odd-indexed elements in \a A. \n
2123/// 10: Match: Compare each pair of corresponding characters in \a A and
2124/// \a B for equality. \n
2125/// 11: Substring: Search \a B for substring matches of \a A. \n
2126/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2127/// mask of the comparison results. \n
2128/// 00: No effect. \n
2129/// 01: Negate the bit mask. \n
2130/// 10: No effect. \n
2131/// 11: Negate the bit mask only for bits with an index less than or equal
2132/// to the size of \a A or \a B.
2133/// \returns Returns 1 if the bit mask is zero and the length of the string in
2134/// \a B is the maximum, otherwise, returns 0.
446#define _mm_cmpestra(A, LA, B, LB, M) \2135#define _mm_cmpestra(A, LA, B, LB, M) \
447 (int)__builtin_ia32_pcmpestria128((__v16qi)(__m128i)(A), (int)(LA), \2136 (int)__builtin_ia32_pcmpestria128((__v16qi)(__m128i)(A), (int)(LA), \
448 (__v16qi)(__m128i)(B), (int)(LB), \2137 (__v16qi)(__m128i)(B), (int)(LB), \
449 (int)(M))2138 (int)(M))
2139
2140/// \brief Uses the immediate operand \a M to perform a comparison of string
2141/// data with explicitly defined lengths that is contained in source operands
2142/// \a A and \a B. Returns 1 if the resulting mask is non-zero, otherwise,
2143/// returns 0.
2144///
2145/// \headerfile <x86intrin.h>
2146///
2147/// \code
2148/// int _mm_cmpestrc(__m128i A, int LA, __m128i B, int LB, const int M);
2149/// \endcode
2150///
2151/// This intrinsic corresponds to the <c> VPCMPESTRI / PCMPESTRI </c>
2152/// instruction.
2153///
2154/// \param A
2155/// A 128-bit integer vector containing one of the source operands to be
2156/// compared.
2157/// \param LA
2158/// An integer that specifies the length of the string in \a A.
2159/// \param B
2160/// A 128-bit integer vector containing one of the source operands to be
2161/// compared.
2162/// \param LB
2163/// An integer that specifies the length of the string in \a B.
2164/// \param M
2165/// An 8-bit immediate operand specifying whether the characters are bytes or
2166/// words and the type of comparison to perform. \n
2167/// Bits [1:0]: Determine source data format. \n
2168/// 00: 16 unsigned bytes \n
2169/// 01: 8 unsigned words \n
2170/// 10: 16 signed bytes \n
2171/// 11: 8 signed words \n
2172/// Bits [3:2]: Determine comparison type and aggregation method. \n
2173/// 00: Subset: Each character in \a B is compared for equality with all
2174/// the characters in \a A. \n
2175/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2176/// basis is greater than or equal for even-indexed elements in \a A,
2177/// and less than or equal for odd-indexed elements in \a A. \n
2178/// 10: Match: Compare each pair of corresponding characters in \a A and
2179/// \a B for equality. \n
2180/// 11: Substring: Search \a B for substring matches of \a A. \n
2181/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2182/// mask of the comparison results. \n
2183/// 00: No effect. \n
2184/// 01: Negate the bit mask. \n
2185/// 10: No effect. \n
2186/// 11: Negate the bit mask only for bits with an index less than or equal
2187/// to the size of \a A or \a B. \n
2188/// \returns Returns 1 if the resulting mask is non-zero, otherwise, returns 0.
450#define _mm_cmpestrc(A, LA, B, LB, M) \2189#define _mm_cmpestrc(A, LA, B, LB, M) \
451 (int)__builtin_ia32_pcmpestric128((__v16qi)(__m128i)(A), (int)(LA), \2190 (int)__builtin_ia32_pcmpestric128((__v16qi)(__m128i)(A), (int)(LA), \
452 (__v16qi)(__m128i)(B), (int)(LB), \2191 (__v16qi)(__m128i)(B), (int)(LB), \
453 (int)(M))2192 (int)(M))
2193
2194/// \brief Uses the immediate operand \a M to perform a comparison of string
2195/// data with explicitly defined lengths that is contained in source operands
2196/// \a A and \a B. Returns bit 0 of the resulting bit mask.
2197///
2198/// \headerfile <x86intrin.h>
2199///
2200/// \code
2201/// int _mm_cmpestro(__m128i A, int LA, __m128i B, int LB, const int M);
2202/// \endcode
2203///
2204/// This intrinsic corresponds to the <c> VPCMPESTRI / PCMPESTRI </c>
2205/// instruction.
2206///
2207/// \param A
2208/// A 128-bit integer vector containing one of the source operands to be
2209/// compared.
2210/// \param LA
2211/// An integer that specifies the length of the string in \a A.
2212/// \param B
2213/// A 128-bit integer vector containing one of the source operands to be
2214/// compared.
2215/// \param LB
2216/// An integer that specifies the length of the string in \a B.
2217/// \param M
2218/// An 8-bit immediate operand specifying whether the characters are bytes or
2219/// words and the type of comparison to perform. \n
2220/// Bits [1:0]: Determine source data format. \n
2221/// 00: 16 unsigned bytes \n
2222/// 01: 8 unsigned words \n
2223/// 10: 16 signed bytes \n
2224/// 11: 8 signed words \n
2225/// Bits [3:2]: Determine comparison type and aggregation method. \n
2226/// 00: Subset: Each character in \a B is compared for equality with all
2227/// the characters in \a A. \n
2228/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2229/// basis is greater than or equal for even-indexed elements in \a A,
2230/// and less than or equal for odd-indexed elements in \a A. \n
2231/// 10: Match: Compare each pair of corresponding characters in \a A and
2232/// \a B for equality. \n
2233/// 11: Substring: Search \a B for substring matches of \a A. \n
2234/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2235/// mask of the comparison results. \n
2236/// 00: No effect. \n
2237/// 01: Negate the bit mask. \n
2238/// 10: No effect. \n
2239/// 11: Negate the bit mask only for bits with an index less than or equal
2240/// to the size of \a A or \a B.
2241/// \returns Returns bit 0 of the resulting bit mask.
454#define _mm_cmpestro(A, LA, B, LB, M) \2242#define _mm_cmpestro(A, LA, B, LB, M) \
455 (int)__builtin_ia32_pcmpestrio128((__v16qi)(__m128i)(A), (int)(LA), \2243 (int)__builtin_ia32_pcmpestrio128((__v16qi)(__m128i)(A), (int)(LA), \
456 (__v16qi)(__m128i)(B), (int)(LB), \2244 (__v16qi)(__m128i)(B), (int)(LB), \
457 (int)(M))2245 (int)(M))
2246
2247/// \brief Uses the immediate operand \a M to perform a comparison of string
2248/// data with explicitly defined lengths that is contained in source operands
2249/// \a A and \a B. Returns 1 if the length of the string in \a A is less than
2250/// the maximum, otherwise, returns 0.
2251///
2252/// \headerfile <x86intrin.h>
2253///
2254/// \code
2255/// int _mm_cmpestrs(__m128i A, int LA, __m128i B, int LB, const int M);
2256/// \endcode
2257///
2258/// This intrinsic corresponds to the <c> VPCMPESTRI / PCMPESTRI </c>
2259/// instruction.
2260///
2261/// \param A
2262/// A 128-bit integer vector containing one of the source operands to be
2263/// compared.
2264/// \param LA
2265/// An integer that specifies the length of the string in \a A.
2266/// \param B
2267/// A 128-bit integer vector containing one of the source operands to be
2268/// compared.
2269/// \param LB
2270/// An integer that specifies the length of the string in \a B.
2271/// \param M
2272/// An 8-bit immediate operand specifying whether the characters are bytes or
2273/// words and the type of comparison to perform. \n
2274/// Bits [1:0]: Determine source data format. \n
2275/// 00: 16 unsigned bytes \n
2276/// 01: 8 unsigned words \n
2277/// 10: 16 signed bytes \n
2278/// 11: 8 signed words \n
2279/// Bits [3:2]: Determine comparison type and aggregation method. \n
2280/// 00: Subset: Each character in \a B is compared for equality with all
2281/// the characters in \a A. \n
2282/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2283/// basis is greater than or equal for even-indexed elements in \a A,
2284/// and less than or equal for odd-indexed elements in \a A. \n
2285/// 10: Match: Compare each pair of corresponding characters in \a A and
2286/// \a B for equality. \n
2287/// 11: Substring: Search \a B for substring matches of \a A. \n
2288/// Bits [5:4]: Determine whether to perform a one's complement in the bit
2289/// mask of the comparison results. \n
2290/// 00: No effect. \n
2291/// 01: Negate the bit mask. \n
2292/// 10: No effect. \n
2293/// 11: Negate the bit mask only for bits with an index less than or equal
2294/// to the size of \a A or \a B. \n
2295/// \returns Returns 1 if the length of the string in \a A is less than the
2296/// maximum, otherwise, returns 0.
458#define _mm_cmpestrs(A, LA, B, LB, M) \2297#define _mm_cmpestrs(A, LA, B, LB, M) \
459 (int)__builtin_ia32_pcmpestris128((__v16qi)(__m128i)(A), (int)(LA), \2298 (int)__builtin_ia32_pcmpestris128((__v16qi)(__m128i)(A), (int)(LA), \
460 (__v16qi)(__m128i)(B), (int)(LB), \2299 (__v16qi)(__m128i)(B), (int)(LB), \
461 (int)(M))2300 (int)(M))
2301
2302/// \brief Uses the immediate operand \a M to perform a comparison of string
2303/// data with explicitly defined lengths that is contained in source operands
2304/// \a A and \a B. Returns 1 if the length of the string in \a B is less than
2305/// the maximum, otherwise, returns 0.
2306///
2307/// \headerfile <x86intrin.h>
2308///
2309/// \code
2310/// int _mm_cmpestrz(__m128i A, int LA, __m128i B, int LB, const int M);
2311/// \endcode
2312///
2313/// This intrinsic corresponds to the <c> VPCMPESTRI </c> instruction.
2314///
2315/// \param A
2316/// A 128-bit integer vector containing one of the source operands to be
2317/// compared.
2318/// \param LA
2319/// An integer that specifies the length of the string in \a A.
2320/// \param B
2321/// A 128-bit integer vector containing one of the source operands to be
2322/// compared.
2323/// \param LB
2324/// An integer that specifies the length of the string in \a B.
2325/// \param M
2326/// An 8-bit immediate operand specifying whether the characters are bytes or
2327/// words and the type of comparison to perform. \n
2328/// Bits [1:0]: Determine source data format. \n
2329/// 00: 16 unsigned bytes \n
2330/// 01: 8 unsigned words \n
2331/// 10: 16 signed bytes \n
2332/// 11: 8 signed words \n
2333/// Bits [3:2]: Determine comparison type and aggregation method. \n
2334/// 00: Subset: Each character in \a B is compared for equality with all
2335/// the characters in \a A. \n
2336/// 01: Ranges: Each character in \a B is compared to \a A. The comparison
2337/// basis is greater than or equal for even-indexed elements in \a A,
2338/// and less than or equal for odd-indexed elements in \a A. \n
2339/// 10: Match: Compare each pair of corresponding characters in \a A and
2340/// \a B for equality. \n
2341/// 11: Substring: Search \a B for substring matches of \a A. \n
2342/// Bits [5:4]: Determine whether to perform a one's complement on the bit
2343/// mask of the comparison results. \n
2344/// 00: No effect. \n
2345/// 01: Negate the bit mask. \n
2346/// 10: No effect. \n
2347/// 11: Negate the bit mask only for bits with an index less than or equal
2348/// to the size of \a A or \a B.
2349/// \returns Returns 1 if the length of the string in \a B is less than the
2350/// maximum, otherwise, returns 0.
462#define _mm_cmpestrz(A, LA, B, LB, M) \2351#define _mm_cmpestrz(A, LA, B, LB, M) \
463 (int)__builtin_ia32_pcmpestriz128((__v16qi)(__m128i)(A), (int)(LA), \2352 (int)__builtin_ia32_pcmpestriz128((__v16qi)(__m128i)(A), (int)(LA), \
464 (__v16qi)(__m128i)(B), (int)(LB), \2353 (__v16qi)(__m128i)(B), (int)(LB), \
465 (int)(M))2354 (int)(M))
4662355
467/* SSE4.2 Compare Packed Data -- Greater Than. */2356/* SSE4.2 Compare Packed Data -- Greater Than. */
2357/// \brief Compares each of the corresponding 64-bit values of the 128-bit
2358/// integer vectors to determine if the values in the first operand are
2359/// greater than those in the second operand.
2360///
2361/// \headerfile <x86intrin.h>
2362///
2363/// This intrinsic corresponds to the <c> VPCMPGTQ / PCMPGTQ </c> instruction.
2364///
2365/// \param __V1
2366/// A 128-bit integer vector.
2367/// \param __V2
2368/// A 128-bit integer vector.
2369/// \returns A 128-bit integer vector containing the comparison results.
468static __inline__ __m128i __DEFAULT_FN_ATTRS2370static __inline__ __m128i __DEFAULT_FN_ATTRS
469_mm_cmpgt_epi64(__m128i __V1, __m128i __V2)2371_mm_cmpgt_epi64(__m128i __V1, __m128i __V2)
470{2372{
...@@ -472,18 +2374,60 @@ _mm_cmpgt_epi64(__m128i __V1, __m128i __V2)...@@ -472,18 +2374,60 @@ _mm_cmpgt_epi64(__m128i __V1, __m128i __V2)
472}2374}
4732375
474/* SSE4.2 Accumulate CRC32. */2376/* SSE4.2 Accumulate CRC32. */
2377/// \brief Adds the unsigned integer operand to the CRC-32C checksum of the
2378/// unsigned char operand.
2379///
2380/// \headerfile <x86intrin.h>
2381///
2382/// This intrinsic corresponds to the <c> CRC32B </c> instruction.
2383///
2384/// \param __C
2385/// An unsigned integer operand to add to the CRC-32C checksum of operand
2386/// \a __D.
2387/// \param __D
2388/// An unsigned 8-bit integer operand used to compute the CRC-32C checksum.
2389/// \returns The result of adding operand \a __C to the CRC-32C checksum of
2390/// operand \a __D.
475static __inline__ unsigned int __DEFAULT_FN_ATTRS2391static __inline__ unsigned int __DEFAULT_FN_ATTRS
476_mm_crc32_u8(unsigned int __C, unsigned char __D)2392_mm_crc32_u8(unsigned int __C, unsigned char __D)
477{2393{
478 return __builtin_ia32_crc32qi(__C, __D);2394 return __builtin_ia32_crc32qi(__C, __D);
479}2395}
4802396
2397/// \brief Adds the unsigned integer operand to the CRC-32C checksum of the
2398/// unsigned short operand.
2399///
2400/// \headerfile <x86intrin.h>
2401///
2402/// This intrinsic corresponds to the <c> CRC32W </c> instruction.
2403///
2404/// \param __C
2405/// An unsigned integer operand to add to the CRC-32C checksum of operand
2406/// \a __D.
2407/// \param __D
2408/// An unsigned 16-bit integer operand used to compute the CRC-32C checksum.
2409/// \returns The result of adding operand \a __C to the CRC-32C checksum of
2410/// operand \a __D.
481static __inline__ unsigned int __DEFAULT_FN_ATTRS2411static __inline__ unsigned int __DEFAULT_FN_ATTRS
482_mm_crc32_u16(unsigned int __C, unsigned short __D)2412_mm_crc32_u16(unsigned int __C, unsigned short __D)
483{2413{
484 return __builtin_ia32_crc32hi(__C, __D);2414 return __builtin_ia32_crc32hi(__C, __D);
485}2415}
4862416
2417/// \brief Adds the first unsigned integer operand to the CRC-32C checksum of
2418/// the second unsigned integer operand.
2419///
2420/// \headerfile <x86intrin.h>
2421///
2422/// This intrinsic corresponds to the <c> CRC32L </c> instruction.
2423///
2424/// \param __C
2425/// An unsigned integer operand to add to the CRC-32C checksum of operand
2426/// \a __D.
2427/// \param __D
2428/// An unsigned 32-bit integer operand used to compute the CRC-32C checksum.
2429/// \returns The result of adding operand \a __C to the CRC-32C checksum of
2430/// operand \a __D.
487static __inline__ unsigned int __DEFAULT_FN_ATTRS2431static __inline__ unsigned int __DEFAULT_FN_ATTRS
488_mm_crc32_u32(unsigned int __C, unsigned int __D)2432_mm_crc32_u32(unsigned int __C, unsigned int __D)
489{2433{
...@@ -491,6 +2435,20 @@ _mm_crc32_u32(unsigned int __C, unsigned int __D)...@@ -491,6 +2435,20 @@ _mm_crc32_u32(unsigned int __C, unsigned int __D)
491}2435}
4922436
493#ifdef __x86_64__2437#ifdef __x86_64__
2438/// \brief Adds the unsigned integer operand to the CRC-32C checksum of the
2439/// unsigned 64-bit integer operand.
2440///
2441/// \headerfile <x86intrin.h>
2442///
2443/// This intrinsic corresponds to the <c> CRC32Q </c> instruction.
2444///
2445/// \param __C
2446/// An unsigned integer operand to add to the CRC-32C checksum of operand
2447/// \a __D.
2448/// \param __D
2449/// An unsigned 64-bit integer operand used to compute the CRC-32C checksum.
2450/// \returns The result of adding operand \a __C to the CRC-32C checksum of
2451/// operand \a __D.
494static __inline__ unsigned long long __DEFAULT_FN_ATTRS2452static __inline__ unsigned long long __DEFAULT_FN_ATTRS
495_mm_crc32_u64(unsigned long long __C, unsigned long long __D)2453_mm_crc32_u64(unsigned long long __C, unsigned long long __D)
496{2454{
c_headers/stdarg.h+1-3
...@@ -43,14 +43,12 @@ typedef __builtin_va_list va_list;...@@ -43,14 +43,12 @@ typedef __builtin_va_list va_list;
43#define va_copy(dest, src) __builtin_va_copy(dest, src)43#define va_copy(dest, src) __builtin_va_copy(dest, src)
44#endif44#endif
4545
46/* Hack required to make standard headers work, at least on Ubuntu */
47#ifndef __GNUC_VA_LIST46#ifndef __GNUC_VA_LIST
48#define __GNUC_VA_LIST 147#define __GNUC_VA_LIST 1
49#endif
50typedef __builtin_va_list __gnuc_va_list;48typedef __builtin_va_list __gnuc_va_list;
51
52/* zig: added because glibc stdio.h was duplicately defining va_list49/* zig: added because glibc stdio.h was duplicately defining va_list
53 */50 */
54#define _VA_LIST_DEFINED51#define _VA_LIST_DEFINED
52#endif
5553
56#endif /* __STDARG_H */54#endif /* __STDARG_H */
c_headers/stdatomic.h+10-10
...@@ -40,16 +40,16 @@ extern "C" {...@@ -40,16 +40,16 @@ extern "C" {
4040
41/* 7.17.1 Introduction */41/* 7.17.1 Introduction */
4242
43#define ATOMIC_BOOL_LOCK_FREE __GCC_ATOMIC_BOOL_LOCK_FREE43#define ATOMIC_BOOL_LOCK_FREE __CLANG_ATOMIC_BOOL_LOCK_FREE
44#define ATOMIC_CHAR_LOCK_FREE __GCC_ATOMIC_CHAR_LOCK_FREE44#define ATOMIC_CHAR_LOCK_FREE __CLANG_ATOMIC_CHAR_LOCK_FREE
45#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE45#define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
46#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE46#define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE
47#define ATOMIC_WCHAR_T_LOCK_FREE __GCC_ATOMIC_WCHAR_T_LOCK_FREE47#define ATOMIC_WCHAR_T_LOCK_FREE __CLANG_ATOMIC_WCHAR_T_LOCK_FREE
48#define ATOMIC_SHORT_LOCK_FREE __GCC_ATOMIC_SHORT_LOCK_FREE48#define ATOMIC_SHORT_LOCK_FREE __CLANG_ATOMIC_SHORT_LOCK_FREE
49#define ATOMIC_INT_LOCK_FREE __GCC_ATOMIC_INT_LOCK_FREE49#define ATOMIC_INT_LOCK_FREE __CLANG_ATOMIC_INT_LOCK_FREE
50#define ATOMIC_LONG_LOCK_FREE __GCC_ATOMIC_LONG_LOCK_FREE50#define ATOMIC_LONG_LOCK_FREE __CLANG_ATOMIC_LONG_LOCK_FREE
51#define ATOMIC_LLONG_LOCK_FREE __GCC_ATOMIC_LLONG_LOCK_FREE51#define ATOMIC_LLONG_LOCK_FREE __CLANG_ATOMIC_LLONG_LOCK_FREE
52#define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE52#define ATOMIC_POINTER_LOCK_FREE __CLANG_ATOMIC_POINTER_LOCK_FREE
5353
54/* 7.17.2 Initialization */54/* 7.17.2 Initialization */
5555
c_headers/stdint.h+13-16
...@@ -255,19 +255,16 @@ typedef __uint_least8_t uint_fast8_t;...@@ -255,19 +255,16 @@ typedef __uint_least8_t uint_fast8_t;
255 */255 */
256#define __stdint_join3(a,b,c) a ## b ## c256#define __stdint_join3(a,b,c) a ## b ## c
257257
258#define __intn_t(n) __stdint_join3( int, n, _t)
259#define __uintn_t(n) __stdint_join3(uint, n, _t)
260
261#ifndef _INTPTR_T258#ifndef _INTPTR_T
262#ifndef __intptr_t_defined259#ifndef __intptr_t_defined
263typedef __intn_t(__INTPTR_WIDTH__) intptr_t;260typedef __INTPTR_TYPE__ intptr_t;
264#define __intptr_t_defined261#define __intptr_t_defined
265#define _INTPTR_T262#define _INTPTR_T
266#endif263#endif
267#endif264#endif
268265
269#ifndef _UINTPTR_T266#ifndef _UINTPTR_T
270typedef __uintn_t(__INTPTR_WIDTH__) uintptr_t;267typedef __UINTPTR_TYPE__ uintptr_t;
271#define _UINTPTR_T268#define _UINTPTR_T
272#endif269#endif
273270
...@@ -659,12 +656,12 @@ typedef __UINTMAX_TYPE__ uintmax_t;...@@ -659,12 +656,12 @@ typedef __UINTMAX_TYPE__ uintmax_t;
659/* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */656/* C99 7.18.2.4 Limits of integer types capable of holding object pointers. */
660/* C99 7.18.3 Limits of other integer types. */657/* C99 7.18.3 Limits of other integer types. */
661658
662#define INTPTR_MIN __INTN_MIN(__INTPTR_WIDTH__)659#define INTPTR_MIN (-__INTPTR_MAX__-1)
663#define INTPTR_MAX __INTN_MAX(__INTPTR_WIDTH__)660#define INTPTR_MAX __INTPTR_MAX__
664#define UINTPTR_MAX __UINTN_MAX(__INTPTR_WIDTH__)661#define UINTPTR_MAX __UINTPTR_MAX__
665#define PTRDIFF_MIN __INTN_MIN(__PTRDIFF_WIDTH__)662#define PTRDIFF_MIN (-__PTRDIFF_MAX__-1)
666#define PTRDIFF_MAX __INTN_MAX(__PTRDIFF_WIDTH__)663#define PTRDIFF_MAX __PTRDIFF_MAX__
667#define SIZE_MAX __UINTN_MAX(__SIZE_WIDTH__)664#define SIZE_MAX __SIZE_MAX__
668665
669/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__666/* ISO9899:2011 7.20 (C11 Annex K): Define RSIZE_MAX if __STDC_WANT_LIB_EXT1__
670 * is enabled. */667 * is enabled. */
...@@ -673,9 +670,9 @@ typedef __UINTMAX_TYPE__ uintmax_t;...@@ -673,9 +670,9 @@ typedef __UINTMAX_TYPE__ uintmax_t;
673#endif670#endif
674671
675/* C99 7.18.2.5 Limits of greatest-width integer types. */672/* C99 7.18.2.5 Limits of greatest-width integer types. */
676#define INTMAX_MIN __INTN_MIN(__INTMAX_WIDTH__)673#define INTMAX_MIN (-__INTMAX_MAX__-1)
677#define INTMAX_MAX __INTN_MAX(__INTMAX_WIDTH__)674#define INTMAX_MAX __INTMAX_MAX__
678#define UINTMAX_MAX __UINTN_MAX(__INTMAX_WIDTH__)675#define UINTMAX_MAX __UINTMAX_MAX__
679676
680/* C99 7.18.3 Limits of other integer types. */677/* C99 7.18.3 Limits of other integer types. */
681#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)678#define SIG_ATOMIC_MIN __INTN_MIN(__SIG_ATOMIC_WIDTH__)
...@@ -700,8 +697,8 @@ typedef __UINTMAX_TYPE__ uintmax_t;...@@ -700,8 +697,8 @@ typedef __UINTMAX_TYPE__ uintmax_t;
700#endif697#endif
701698
702/* 7.18.4.2 Macros for greatest-width integer constants. */699/* 7.18.4.2 Macros for greatest-width integer constants. */
703#define INTMAX_C(v) __INTN_C(__INTMAX_WIDTH__, v)700#define INTMAX_C(v) __int_c(v, __INTMAX_C_SUFFIX__)
704#define UINTMAX_C(v) __UINTN_C(__INTMAX_WIDTH__, v)701#define UINTMAX_C(v) __int_c(v, __UINTMAX_C_SUFFIX__)
705702
706#endif /* __STDC_HOSTED__ */703#endif /* __STDC_HOSTED__ */
707#endif /* __CLANG_STDINT_H */704#endif /* __CLANG_STDINT_H */
c_headers/tgmath.h+13-3
...@@ -22,12 +22,21 @@...@@ -22,12 +22,21 @@
22 *22 *
23\*===----------------------------------------------------------------------===*/23\*===----------------------------------------------------------------------===*/
2424
25#ifndef __TGMATH_H25#ifndef __CLANG_TGMATH_H
26#define __TGMATH_H26#define __CLANG_TGMATH_H
2727
28/* C99 7.22 Type-generic math <tgmath.h>. */28/* C99 7.22 Type-generic math <tgmath.h>. */
29#include <math.h>29#include <math.h>
3030
31/*
32 * Allow additional definitions and implementation-defined values on Apple
33 * platforms. This is done after #include <math.h> to avoid depcycle conflicts
34 * between libcxx and darwin in C++ modules builds.
35 */
36#if defined(__APPLE__) && __STDC_HOSTED__ && __has_include_next(<tgmath.h>)
37# include_next <tgmath.h>
38#else
39
31/* C++ handles type genericity with overloading in math.h. */40/* C++ handles type genericity with overloading in math.h. */
32#ifndef __cplusplus41#ifndef __cplusplus
33#include <complex.h>42#include <complex.h>
...@@ -1371,4 +1380,5 @@ static long double...@@ -1371,4 +1380,5 @@ static long double
1371#undef _TG_ATTRS1380#undef _TG_ATTRS
13721381
1373#endif /* __cplusplus */1382#endif /* __cplusplus */
1374#endif /* __TGMATH_H */1383#endif /* __has_include_next */
1384#endif /* __CLANG_TGMATH_H */
c_headers/tmmintrin.h+48-40
...@@ -469,10 +469,11 @@ _mm_hsubs_pi16(__m64 __a, __m64 __b)...@@ -469,10 +469,11 @@ _mm_hsubs_pi16(__m64 __a, __m64 __b)
469/// values contained in the first source operand and packed 8-bit signed469/// values contained in the first source operand and packed 8-bit signed
470/// integer values contained in the second source operand, adds pairs of470/// integer values contained in the second source operand, adds pairs of
471/// contiguous products with signed saturation, and writes the 16-bit sums to471/// contiguous products with signed saturation, and writes the 16-bit sums to
472/// the corresponding bits in the destination. For example, bits [7:0] of472/// the corresponding bits in the destination.
473/// both operands are multiplied, bits [15:8] of both operands are473///
474/// multiplied, and the sum of both results is written to bits [15:0] of the474/// For example, bits [7:0] of both operands are multiplied, bits [15:8] of
475/// destination.475/// both operands are multiplied, and the sum of both results is written to
476/// bits [15:0] of the destination.
476///477///
477/// \headerfile <x86intrin.h>478/// \headerfile <x86intrin.h>
478///479///
...@@ -502,10 +503,11 @@ _mm_maddubs_epi16(__m128i __a, __m128i __b)...@@ -502,10 +503,11 @@ _mm_maddubs_epi16(__m128i __a, __m128i __b)
502/// values contained in the first source operand and packed 8-bit signed503/// values contained in the first source operand and packed 8-bit signed
503/// integer values contained in the second source operand, adds pairs of504/// integer values contained in the second source operand, adds pairs of
504/// contiguous products with signed saturation, and writes the 16-bit sums to505/// contiguous products with signed saturation, and writes the 16-bit sums to
505/// the corresponding bits in the destination. For example, bits [7:0] of506/// the corresponding bits in the destination.
506/// both operands are multiplied, bits [15:8] of both operands are507///
507/// multiplied, and the sum of both results is written to bits [15:0] of the508/// For example, bits [7:0] of both operands are multiplied, bits [15:8] of
508/// destination.509/// both operands are multiplied, and the sum of both results is written to
510/// bits [15:0] of the destination.
509///511///
510/// \headerfile <x86intrin.h>512/// \headerfile <x86intrin.h>
511///513///
...@@ -619,13 +621,14 @@ _mm_shuffle_pi8(__m64 __a, __m64 __b)...@@ -619,13 +621,14 @@ _mm_shuffle_pi8(__m64 __a, __m64 __b)
619}621}
620622
621/// \brief For each 8-bit integer in the first source operand, perform one of623/// \brief For each 8-bit integer in the first source operand, perform one of
622/// the following actions as specified by the second source operand: If the624/// the following actions as specified by the second source operand.
623/// byte in the second source is negative, calculate the two's complement of625///
624/// the corresponding byte in the first source, and write that value to the626/// If the byte in the second source is negative, calculate the two's
625/// destination. If the byte in the second source is positive, copy the627/// complement of the corresponding byte in the first source, and write that
626/// corresponding byte from the first source to the destination. If the byte628/// value to the destination. If the byte in the second source is positive,
627/// in the second source is zero, clear the corresponding byte in the629/// copy the corresponding byte from the first source to the destination. If
628/// destination.630/// the byte in the second source is zero, clear the corresponding byte in
631/// the destination.
629///632///
630/// \headerfile <x86intrin.h>633/// \headerfile <x86intrin.h>
631///634///
...@@ -644,13 +647,14 @@ _mm_sign_epi8(__m128i __a, __m128i __b)...@@ -644,13 +647,14 @@ _mm_sign_epi8(__m128i __a, __m128i __b)
644}647}
645648
646/// \brief For each 16-bit integer in the first source operand, perform one of649/// \brief For each 16-bit integer in the first source operand, perform one of
647/// the following actions as specified by the second source operand: If the650/// the following actions as specified by the second source operand.
648/// word in the second source is negative, calculate the two's complement of651///
649/// the corresponding word in the first source, and write that value to the652/// If the word in the second source is negative, calculate the two's
650/// destination. If the word in the second source is positive, copy the653/// complement of the corresponding word in the first source, and write that
651/// corresponding word from the first source to the destination. If the word654/// value to the destination. If the word in the second source is positive,
652/// in the second source is zero, clear the corresponding word in the655/// copy the corresponding word from the first source to the destination. If
653/// destination.656/// the word in the second source is zero, clear the corresponding word in
657/// the destination.
654///658///
655/// \headerfile <x86intrin.h>659/// \headerfile <x86intrin.h>
656///660///
...@@ -669,8 +673,9 @@ _mm_sign_epi16(__m128i __a, __m128i __b)...@@ -669,8 +673,9 @@ _mm_sign_epi16(__m128i __a, __m128i __b)
669}673}
670674
671/// \brief For each 32-bit integer in the first source operand, perform one of675/// \brief For each 32-bit integer in the first source operand, perform one of
672/// the following actions as specified by the second source operand: If the676/// the following actions as specified by the second source operand.
673/// doubleword in the second source is negative, calculate the two's677///
678/// If the doubleword in the second source is negative, calculate the two's
674/// complement of the corresponding word in the first source, and write that679/// complement of the corresponding word in the first source, and write that
675/// value to the destination. If the doubleword in the second source is680/// value to the destination. If the doubleword in the second source is
676/// positive, copy the corresponding word from the first source to the681/// positive, copy the corresponding word from the first source to the
...@@ -694,13 +699,14 @@ _mm_sign_epi32(__m128i __a, __m128i __b)...@@ -694,13 +699,14 @@ _mm_sign_epi32(__m128i __a, __m128i __b)
694}699}
695700
696/// \brief For each 8-bit integer in the first source operand, perform one of701/// \brief For each 8-bit integer in the first source operand, perform one of
697/// the following actions as specified by the second source operand: If the702/// the following actions as specified by the second source operand.
698/// byte in the second source is negative, calculate the two's complement of703///
699/// the corresponding byte in the first source, and write that value to the704/// If the byte in the second source is negative, calculate the two's
700/// destination. If the byte in the second source is positive, copy the705/// complement of the corresponding byte in the first source, and write that
701/// corresponding byte from the first source to the destination. If the byte706/// value to the destination. If the byte in the second source is positive,
702/// in the second source is zero, clear the corresponding byte in the707/// copy the corresponding byte from the first source to the destination. If
703/// destination.708/// the byte in the second source is zero, clear the corresponding byte in
709/// the destination.
704///710///
705/// \headerfile <x86intrin.h>711/// \headerfile <x86intrin.h>
706///712///
...@@ -719,13 +725,14 @@ _mm_sign_pi8(__m64 __a, __m64 __b)...@@ -719,13 +725,14 @@ _mm_sign_pi8(__m64 __a, __m64 __b)
719}725}
720726
721/// \brief For each 16-bit integer in the first source operand, perform one of727/// \brief For each 16-bit integer in the first source operand, perform one of
722/// the following actions as specified by the second source operand: If the728/// the following actions as specified by the second source operand.
723/// word in the second source is negative, calculate the two's complement of729///
724/// the corresponding word in the first source, and write that value to the730/// If the word in the second source is negative, calculate the two's
725/// destination. If the word in the second source is positive, copy the731/// complement of the corresponding word in the first source, and write that
726/// corresponding word from the first source to the destination. If the word732/// value to the destination. If the word in the second source is positive,
727/// in the second source is zero, clear the corresponding word in the733/// copy the corresponding word from the first source to the destination. If
728/// destination.734/// the word in the second source is zero, clear the corresponding word in
735/// the destination.
729///736///
730/// \headerfile <x86intrin.h>737/// \headerfile <x86intrin.h>
731///738///
...@@ -744,8 +751,9 @@ _mm_sign_pi16(__m64 __a, __m64 __b)...@@ -744,8 +751,9 @@ _mm_sign_pi16(__m64 __a, __m64 __b)
744}751}
745752
746/// \brief For each 32-bit integer in the first source operand, perform one of753/// \brief For each 32-bit integer in the first source operand, perform one of
747/// the following actions as specified by the second source operand: If the754/// the following actions as specified by the second source operand.
748/// doubleword in the second source is negative, calculate the two's755///
756/// If the doubleword in the second source is negative, calculate the two's
749/// complement of the corresponding doubleword in the first source, and757/// complement of the corresponding doubleword in the first source, and
750/// write that value to the destination. If the doubleword in the second758/// write that value to the destination. If the doubleword in the second
751/// source is positive, copy the corresponding doubleword from the first759/// source is positive, copy the corresponding doubleword from the first
c_headers/vecintrin.h+1548-24
...@@ -116,6 +116,13 @@ vec_extract(vector unsigned long long __vec, int __index) {...@@ -116,6 +116,13 @@ vec_extract(vector unsigned long long __vec, int __index) {
116 return __vec[__index & 1];116 return __vec[__index & 1];
117}117}
118118
119#if __ARCH__ >= 12
120static inline __ATTRS_o_ai float
121vec_extract(vector float __vec, int __index) {
122 return __vec[__index & 3];
123}
124#endif
125
119static inline __ATTRS_o_ai double126static inline __ATTRS_o_ai double
120vec_extract(vector double __vec, int __index) {127vec_extract(vector double __vec, int __index) {
121 return __vec[__index & 1];128 return __vec[__index & 1];
...@@ -129,6 +136,7 @@ vec_insert(signed char __scalar, vector signed char __vec, int __index) {...@@ -129,6 +136,7 @@ vec_insert(signed char __scalar, vector signed char __vec, int __index) {
129 return __vec;136 return __vec;
130}137}
131138
139// This prototype is deprecated.
132static inline __ATTRS_o_ai vector unsigned char140static inline __ATTRS_o_ai vector unsigned char
133vec_insert(unsigned char __scalar, vector bool char __vec, int __index) {141vec_insert(unsigned char __scalar, vector bool char __vec, int __index) {
134 vector unsigned char __newvec = (vector unsigned char)__vec;142 vector unsigned char __newvec = (vector unsigned char)__vec;
...@@ -148,6 +156,7 @@ vec_insert(signed short __scalar, vector signed short __vec, int __index) {...@@ -148,6 +156,7 @@ vec_insert(signed short __scalar, vector signed short __vec, int __index) {
148 return __vec;156 return __vec;
149}157}
150158
159// This prototype is deprecated.
151static inline __ATTRS_o_ai vector unsigned short160static inline __ATTRS_o_ai vector unsigned short
152vec_insert(unsigned short __scalar, vector bool short __vec, int __index) {161vec_insert(unsigned short __scalar, vector bool short __vec, int __index) {
153 vector unsigned short __newvec = (vector unsigned short)__vec;162 vector unsigned short __newvec = (vector unsigned short)__vec;
...@@ -167,6 +176,7 @@ vec_insert(signed int __scalar, vector signed int __vec, int __index) {...@@ -167,6 +176,7 @@ vec_insert(signed int __scalar, vector signed int __vec, int __index) {
167 return __vec;176 return __vec;
168}177}
169178
179// This prototype is deprecated.
170static inline __ATTRS_o_ai vector unsigned int180static inline __ATTRS_o_ai vector unsigned int
171vec_insert(unsigned int __scalar, vector bool int __vec, int __index) {181vec_insert(unsigned int __scalar, vector bool int __vec, int __index) {
172 vector unsigned int __newvec = (vector unsigned int)__vec;182 vector unsigned int __newvec = (vector unsigned int)__vec;
...@@ -187,6 +197,7 @@ vec_insert(signed long long __scalar, vector signed long long __vec,...@@ -187,6 +197,7 @@ vec_insert(signed long long __scalar, vector signed long long __vec,
187 return __vec;197 return __vec;
188}198}
189199
200// This prototype is deprecated.
190static inline __ATTRS_o_ai vector unsigned long long201static inline __ATTRS_o_ai vector unsigned long long
191vec_insert(unsigned long long __scalar, vector bool long long __vec,202vec_insert(unsigned long long __scalar, vector bool long long __vec,
192 int __index) {203 int __index) {
...@@ -202,6 +213,14 @@ vec_insert(unsigned long long __scalar, vector unsigned long long __vec,...@@ -202,6 +213,14 @@ vec_insert(unsigned long long __scalar, vector unsigned long long __vec,
202 return __vec;213 return __vec;
203}214}
204215
216#if __ARCH__ >= 12
217static inline __ATTRS_o_ai vector float
218vec_insert(float __scalar, vector float __vec, int __index) {
219 __vec[__index & 1] = __scalar;
220 return __vec;
221}
222#endif
223
205static inline __ATTRS_o_ai vector double224static inline __ATTRS_o_ai vector double
206vec_insert(double __scalar, vector double __vec, int __index) {225vec_insert(double __scalar, vector double __vec, int __index) {
207 __vec[__index & 1] = __scalar;226 __vec[__index & 1] = __scalar;
...@@ -282,6 +301,16 @@ vec_promote(unsigned long long __scalar, int __index) {...@@ -282,6 +301,16 @@ vec_promote(unsigned long long __scalar, int __index) {
282 return __vec;301 return __vec;
283}302}
284303
304#if __ARCH__ >= 12
305static inline __ATTRS_o_ai vector float
306vec_promote(float __scalar, int __index) {
307 const vector float __zero = (vector float)0;
308 vector float __vec = __builtin_shufflevector(__zero, __zero, -1, -1, -1, -1);
309 __vec[__index & 3] = __scalar;
310 return __vec;
311}
312#endif
313
285static inline __ATTRS_o_ai vector double314static inline __ATTRS_o_ai vector double
286vec_promote(double __scalar, int __index) {315vec_promote(double __scalar, int __index) {
287 const vector double __zero = (vector double)0;316 const vector double __zero = (vector double)0;
...@@ -348,6 +377,15 @@ vec_insert_and_zero(const unsigned long long *__ptr) {...@@ -348,6 +377,15 @@ vec_insert_and_zero(const unsigned long long *__ptr) {
348 return __vec;377 return __vec;
349}378}
350379
380#if __ARCH__ >= 12
381static inline __ATTRS_o_ai vector float
382vec_insert_and_zero(const float *__ptr) {
383 vector float __vec = (vector float)0;
384 __vec[0] = *__ptr;
385 return __vec;
386}
387#endif
388
351static inline __ATTRS_o_ai vector double389static inline __ATTRS_o_ai vector double
352vec_insert_and_zero(const double *__ptr) {390vec_insert_and_zero(const double *__ptr) {
353 vector double __vec = (vector double)0;391 vector double __vec = (vector double)0;
...@@ -441,6 +479,15 @@ vec_perm(vector bool long long __a, vector bool long long __b,...@@ -441,6 +479,15 @@ vec_perm(vector bool long long __a, vector bool long long __b,
441 (vector unsigned char)__a, (vector unsigned char)__b, __c);479 (vector unsigned char)__a, (vector unsigned char)__b, __c);
442}480}
443481
482#if __ARCH__ >= 12
483static inline __ATTRS_o_ai vector float
484vec_perm(vector float __a, vector float __b,
485 vector unsigned char __c) {
486 return (vector float)__builtin_s390_vperm(
487 (vector unsigned char)__a, (vector unsigned char)__b, __c);
488}
489#endif
490
444static inline __ATTRS_o_ai vector double491static inline __ATTRS_o_ai vector double
445vec_perm(vector double __a, vector double __b,492vec_perm(vector double __a, vector double __b,
446 vector unsigned char __c) {493 vector unsigned char __c) {
...@@ -450,18 +497,22 @@ vec_perm(vector double __a, vector double __b,...@@ -450,18 +497,22 @@ vec_perm(vector double __a, vector double __b,
450497
451/*-- vec_permi --------------------------------------------------------------*/498/*-- vec_permi --------------------------------------------------------------*/
452499
500// This prototype is deprecated.
453extern __ATTRS_o vector signed long long501extern __ATTRS_o vector signed long long
454vec_permi(vector signed long long __a, vector signed long long __b, int __c)502vec_permi(vector signed long long __a, vector signed long long __b, int __c)
455 __constant_range(__c, 0, 3);503 __constant_range(__c, 0, 3);
456504
505// This prototype is deprecated.
457extern __ATTRS_o vector unsigned long long506extern __ATTRS_o vector unsigned long long
458vec_permi(vector unsigned long long __a, vector unsigned long long __b, int __c)507vec_permi(vector unsigned long long __a, vector unsigned long long __b, int __c)
459 __constant_range(__c, 0, 3);508 __constant_range(__c, 0, 3);
460509
510// This prototype is deprecated.
461extern __ATTRS_o vector bool long long511extern __ATTRS_o vector bool long long
462vec_permi(vector bool long long __a, vector bool long long __b, int __c)512vec_permi(vector bool long long __a, vector bool long long __b, int __c)
463 __constant_range(__c, 0, 3);513 __constant_range(__c, 0, 3);
464514
515// This prototype is deprecated.
465extern __ATTRS_o vector double516extern __ATTRS_o vector double
466vec_permi(vector double __a, vector double __b, int __c)517vec_permi(vector double __a, vector double __b, int __c)
467 __constant_range(__c, 0, 3);518 __constant_range(__c, 0, 3);
...@@ -471,6 +522,15 @@ vec_permi(vector double __a, vector double __b, int __c)...@@ -471,6 +522,15 @@ vec_permi(vector double __a, vector double __b, int __c)
471 (vector unsigned long long)(Y), \522 (vector unsigned long long)(Y), \
472 (((Z) & 2) << 1) | ((Z) & 1)))523 (((Z) & 2) << 1) | ((Z) & 1)))
473524
525/*-- vec_bperm_u128 ---------------------------------------------------------*/
526
527#if __ARCH__ >= 12
528static inline __ATTRS_ai vector unsigned long long
529vec_bperm_u128(vector unsigned char __a, vector unsigned char __b) {
530 return __builtin_s390_vbperm(__a, __b);
531}
532#endif
533
474/*-- vec_sel ----------------------------------------------------------------*/534/*-- vec_sel ----------------------------------------------------------------*/
475535
476static inline __ATTRS_o_ai vector signed char536static inline __ATTRS_o_ai vector signed char
...@@ -614,6 +674,22 @@ vec_sel(vector unsigned long long __a, vector unsigned long long __b,...@@ -614,6 +674,22 @@ vec_sel(vector unsigned long long __a, vector unsigned long long __b,
614 (~(vector unsigned long long)__c & __a));674 (~(vector unsigned long long)__c & __a));
615}675}
616676
677#if __ARCH__ >= 12
678static inline __ATTRS_o_ai vector float
679vec_sel(vector float __a, vector float __b, vector unsigned int __c) {
680 return (vector float)((__c & (vector unsigned int)__b) |
681 (~__c & (vector unsigned int)__a));
682}
683
684static inline __ATTRS_o_ai vector float
685vec_sel(vector float __a, vector float __b, vector bool int __c) {
686 vector unsigned int __ac = (vector unsigned int)__a;
687 vector unsigned int __bc = (vector unsigned int)__b;
688 vector unsigned int __cc = (vector unsigned int)__c;
689 return (vector float)((__cc & __bc) | (~__cc & __ac));
690}
691#endif
692
617static inline __ATTRS_o_ai vector double693static inline __ATTRS_o_ai vector double
618vec_sel(vector double __a, vector double __b, vector unsigned long long __c) {694vec_sel(vector double __a, vector double __b, vector unsigned long long __c) {
619 return (vector double)((__c & (vector unsigned long long)__b) |695 return (vector double)((__c & (vector unsigned long long)__b) |
...@@ -687,6 +763,17 @@ vec_gather_element(vector unsigned long long __vec,...@@ -687,6 +763,17 @@ vec_gather_element(vector unsigned long long __vec,
687 return __vec;763 return __vec;
688}764}
689765
766#if __ARCH__ >= 12
767static inline __ATTRS_o_ai vector float
768vec_gather_element(vector float __vec, vector unsigned int __offset,
769 const float *__ptr, int __index)
770 __constant_range(__index, 0, 3) {
771 __vec[__index] = *(const float *)(
772 (__INTPTR_TYPE__)__ptr + (__INTPTR_TYPE__)__offset[__index]);
773 return __vec;
774}
775#endif
776
690static inline __ATTRS_o_ai vector double777static inline __ATTRS_o_ai vector double
691vec_gather_element(vector double __vec, vector unsigned long long __offset,778vec_gather_element(vector double __vec, vector unsigned long long __offset,
692 const double *__ptr, int __index)779 const double *__ptr, int __index)
...@@ -749,6 +836,16 @@ vec_scatter_element(vector unsigned long long __vec,...@@ -749,6 +836,16 @@ vec_scatter_element(vector unsigned long long __vec,
749 __vec[__index];836 __vec[__index];
750}837}
751838
839#if __ARCH__ >= 12
840static inline __ATTRS_o_ai void
841vec_scatter_element(vector float __vec, vector unsigned int __offset,
842 float *__ptr, int __index)
843 __constant_range(__index, 0, 3) {
844 *(float *)((__INTPTR_TYPE__)__ptr + __offset[__index]) =
845 __vec[__index];
846}
847#endif
848
752static inline __ATTRS_o_ai void849static inline __ATTRS_o_ai void
753vec_scatter_element(vector double __vec, vector unsigned long long __offset,850vec_scatter_element(vector double __vec, vector unsigned long long __offset,
754 double *__ptr, int __index)851 double *__ptr, int __index)
...@@ -757,48 +854,111 @@ vec_scatter_element(vector double __vec, vector unsigned long long __offset,...@@ -757,48 +854,111 @@ vec_scatter_element(vector double __vec, vector unsigned long long __offset,
757 __vec[__index];854 __vec[__index];
758}855}
759856
857/*-- vec_xl -----------------------------------------------------------------*/
858
859static inline __ATTRS_o_ai vector signed char
860vec_xl(long __offset, const signed char *__ptr) {
861 return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
862}
863
864static inline __ATTRS_o_ai vector unsigned char
865vec_xl(long __offset, const unsigned char *__ptr) {
866 return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
867}
868
869static inline __ATTRS_o_ai vector signed short
870vec_xl(long __offset, const signed short *__ptr) {
871 return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
872}
873
874static inline __ATTRS_o_ai vector unsigned short
875vec_xl(long __offset, const unsigned short *__ptr) {
876 return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
877}
878
879static inline __ATTRS_o_ai vector signed int
880vec_xl(long __offset, const signed int *__ptr) {
881 return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
882}
883
884static inline __ATTRS_o_ai vector unsigned int
885vec_xl(long __offset, const unsigned int *__ptr) {
886 return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
887}
888
889static inline __ATTRS_o_ai vector signed long long
890vec_xl(long __offset, const signed long long *__ptr) {
891 return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
892}
893
894static inline __ATTRS_o_ai vector unsigned long long
895vec_xl(long __offset, const unsigned long long *__ptr) {
896 return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
897}
898
899#if __ARCH__ >= 12
900static inline __ATTRS_o_ai vector float
901vec_xl(long __offset, const float *__ptr) {
902 return *(const vector float *)((__INTPTR_TYPE__)__ptr + __offset);
903}
904#endif
905
906static inline __ATTRS_o_ai vector double
907vec_xl(long __offset, const double *__ptr) {
908 return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
909}
910
760/*-- vec_xld2 ---------------------------------------------------------------*/911/*-- vec_xld2 ---------------------------------------------------------------*/
761912
913// This prototype is deprecated.
762static inline __ATTRS_o_ai vector signed char914static inline __ATTRS_o_ai vector signed char
763vec_xld2(long __offset, const signed char *__ptr) {915vec_xld2(long __offset, const signed char *__ptr) {
764 return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);916 return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
765}917}
766918
919// This prototype is deprecated.
767static inline __ATTRS_o_ai vector unsigned char920static inline __ATTRS_o_ai vector unsigned char
768vec_xld2(long __offset, const unsigned char *__ptr) {921vec_xld2(long __offset, const unsigned char *__ptr) {
769 return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);922 return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
770}923}
771924
925// This prototype is deprecated.
772static inline __ATTRS_o_ai vector signed short926static inline __ATTRS_o_ai vector signed short
773vec_xld2(long __offset, const signed short *__ptr) {927vec_xld2(long __offset, const signed short *__ptr) {
774 return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);928 return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
775}929}
776930
931// This prototype is deprecated.
777static inline __ATTRS_o_ai vector unsigned short932static inline __ATTRS_o_ai vector unsigned short
778vec_xld2(long __offset, const unsigned short *__ptr) {933vec_xld2(long __offset, const unsigned short *__ptr) {
779 return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);934 return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
780}935}
781936
937// This prototype is deprecated.
782static inline __ATTRS_o_ai vector signed int938static inline __ATTRS_o_ai vector signed int
783vec_xld2(long __offset, const signed int *__ptr) {939vec_xld2(long __offset, const signed int *__ptr) {
784 return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);940 return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
785}941}
786942
943// This prototype is deprecated.
787static inline __ATTRS_o_ai vector unsigned int944static inline __ATTRS_o_ai vector unsigned int
788vec_xld2(long __offset, const unsigned int *__ptr) {945vec_xld2(long __offset, const unsigned int *__ptr) {
789 return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);946 return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
790}947}
791948
949// This prototype is deprecated.
792static inline __ATTRS_o_ai vector signed long long950static inline __ATTRS_o_ai vector signed long long
793vec_xld2(long __offset, const signed long long *__ptr) {951vec_xld2(long __offset, const signed long long *__ptr) {
794 return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);952 return *(const vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset);
795}953}
796954
955// This prototype is deprecated.
797static inline __ATTRS_o_ai vector unsigned long long956static inline __ATTRS_o_ai vector unsigned long long
798vec_xld2(long __offset, const unsigned long long *__ptr) {957vec_xld2(long __offset, const unsigned long long *__ptr) {
799 return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);958 return *(const vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset);
800}959}
801960
961// This prototype is deprecated.
802static inline __ATTRS_o_ai vector double962static inline __ATTRS_o_ai vector double
803vec_xld2(long __offset, const double *__ptr) {963vec_xld2(long __offset, const double *__ptr) {
804 return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);964 return *(const vector double *)((__INTPTR_TYPE__)__ptr + __offset);
...@@ -806,74 +966,145 @@ vec_xld2(long __offset, const double *__ptr) {...@@ -806,74 +966,145 @@ vec_xld2(long __offset, const double *__ptr) {
806966
807/*-- vec_xlw4 ---------------------------------------------------------------*/967/*-- vec_xlw4 ---------------------------------------------------------------*/
808968
969// This prototype is deprecated.
809static inline __ATTRS_o_ai vector signed char970static inline __ATTRS_o_ai vector signed char
810vec_xlw4(long __offset, const signed char *__ptr) {971vec_xlw4(long __offset, const signed char *__ptr) {
811 return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);972 return *(const vector signed char *)((__INTPTR_TYPE__)__ptr + __offset);
812}973}
813974
975// This prototype is deprecated.
814static inline __ATTRS_o_ai vector unsigned char976static inline __ATTRS_o_ai vector unsigned char
815vec_xlw4(long __offset, const unsigned char *__ptr) {977vec_xlw4(long __offset, const unsigned char *__ptr) {
816 return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);978 return *(const vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset);
817}979}
818980
981// This prototype is deprecated.
819static inline __ATTRS_o_ai vector signed short982static inline __ATTRS_o_ai vector signed short
820vec_xlw4(long __offset, const signed short *__ptr) {983vec_xlw4(long __offset, const signed short *__ptr) {
821 return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);984 return *(const vector signed short *)((__INTPTR_TYPE__)__ptr + __offset);
822}985}
823986
987// This prototype is deprecated.
824static inline __ATTRS_o_ai vector unsigned short988static inline __ATTRS_o_ai vector unsigned short
825vec_xlw4(long __offset, const unsigned short *__ptr) {989vec_xlw4(long __offset, const unsigned short *__ptr) {
826 return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);990 return *(const vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset);
827}991}
828992
993// This prototype is deprecated.
829static inline __ATTRS_o_ai vector signed int994static inline __ATTRS_o_ai vector signed int
830vec_xlw4(long __offset, const signed int *__ptr) {995vec_xlw4(long __offset, const signed int *__ptr) {
831 return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);996 return *(const vector signed int *)((__INTPTR_TYPE__)__ptr + __offset);
832}997}
833998
999// This prototype is deprecated.
834static inline __ATTRS_o_ai vector unsigned int1000static inline __ATTRS_o_ai vector unsigned int
835vec_xlw4(long __offset, const unsigned int *__ptr) {1001vec_xlw4(long __offset, const unsigned int *__ptr) {
836 return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);1002 return *(const vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset);
837}1003}
8381004
1005/*-- vec_xst ----------------------------------------------------------------*/
1006
1007static inline __ATTRS_o_ai void
1008vec_xst(vector signed char __vec, long __offset, signed char *__ptr) {
1009 *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1010}
1011
1012static inline __ATTRS_o_ai void
1013vec_xst(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
1014 *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1015}
1016
1017static inline __ATTRS_o_ai void
1018vec_xst(vector signed short __vec, long __offset, signed short *__ptr) {
1019 *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1020}
1021
1022static inline __ATTRS_o_ai void
1023vec_xst(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
1024 *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1025}
1026
1027static inline __ATTRS_o_ai void
1028vec_xst(vector signed int __vec, long __offset, signed int *__ptr) {
1029 *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1030}
1031
1032static inline __ATTRS_o_ai void
1033vec_xst(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
1034 *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1035}
1036
1037static inline __ATTRS_o_ai void
1038vec_xst(vector signed long long __vec, long __offset,
1039 signed long long *__ptr) {
1040 *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1041}
1042
1043static inline __ATTRS_o_ai void
1044vec_xst(vector unsigned long long __vec, long __offset,
1045 unsigned long long *__ptr) {
1046 *(vector unsigned long long *)((__INTPTR_TYPE__)__ptr + __offset) =
1047 __vec;
1048}
1049
1050#if __ARCH__ >= 12
1051static inline __ATTRS_o_ai void
1052vec_xst(vector float __vec, long __offset, float *__ptr) {
1053 *(vector float *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1054}
1055#endif
1056
1057static inline __ATTRS_o_ai void
1058vec_xst(vector double __vec, long __offset, double *__ptr) {
1059 *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
1060}
1061
839/*-- vec_xstd2 --------------------------------------------------------------*/1062/*-- vec_xstd2 --------------------------------------------------------------*/
8401063
1064// This prototype is deprecated.
841static inline __ATTRS_o_ai void1065static inline __ATTRS_o_ai void
842vec_xstd2(vector signed char __vec, long __offset, signed char *__ptr) {1066vec_xstd2(vector signed char __vec, long __offset, signed char *__ptr) {
843 *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1067 *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
844}1068}
8451069
1070// This prototype is deprecated.
846static inline __ATTRS_o_ai void1071static inline __ATTRS_o_ai void
847vec_xstd2(vector unsigned char __vec, long __offset, unsigned char *__ptr) {1072vec_xstd2(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
848 *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1073 *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
849}1074}
8501075
1076// This prototype is deprecated.
851static inline __ATTRS_o_ai void1077static inline __ATTRS_o_ai void
852vec_xstd2(vector signed short __vec, long __offset, signed short *__ptr) {1078vec_xstd2(vector signed short __vec, long __offset, signed short *__ptr) {
853 *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1079 *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
854}1080}
8551081
1082// This prototype is deprecated.
856static inline __ATTRS_o_ai void1083static inline __ATTRS_o_ai void
857vec_xstd2(vector unsigned short __vec, long __offset, unsigned short *__ptr) {1084vec_xstd2(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
858 *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1085 *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
859}1086}
8601087
1088// This prototype is deprecated.
861static inline __ATTRS_o_ai void1089static inline __ATTRS_o_ai void
862vec_xstd2(vector signed int __vec, long __offset, signed int *__ptr) {1090vec_xstd2(vector signed int __vec, long __offset, signed int *__ptr) {
863 *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1091 *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
864}1092}
8651093
1094// This prototype is deprecated.
866static inline __ATTRS_o_ai void1095static inline __ATTRS_o_ai void
867vec_xstd2(vector unsigned int __vec, long __offset, unsigned int *__ptr) {1096vec_xstd2(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
868 *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1097 *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
869}1098}
8701099
1100// This prototype is deprecated.
871static inline __ATTRS_o_ai void1101static inline __ATTRS_o_ai void
872vec_xstd2(vector signed long long __vec, long __offset,1102vec_xstd2(vector signed long long __vec, long __offset,
873 signed long long *__ptr) {1103 signed long long *__ptr) {
874 *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1104 *(vector signed long long *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
875}1105}
8761106
1107// This prototype is deprecated.
877static inline __ATTRS_o_ai void1108static inline __ATTRS_o_ai void
878vec_xstd2(vector unsigned long long __vec, long __offset,1109vec_xstd2(vector unsigned long long __vec, long __offset,
879 unsigned long long *__ptr) {1110 unsigned long long *__ptr) {
...@@ -881,6 +1112,7 @@ vec_xstd2(vector unsigned long long __vec, long __offset,...@@ -881,6 +1112,7 @@ vec_xstd2(vector unsigned long long __vec, long __offset,
881 __vec;1112 __vec;
882}1113}
8831114
1115// This prototype is deprecated.
884static inline __ATTRS_o_ai void1116static inline __ATTRS_o_ai void
885vec_xstd2(vector double __vec, long __offset, double *__ptr) {1117vec_xstd2(vector double __vec, long __offset, double *__ptr) {
886 *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1118 *(vector double *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
...@@ -888,31 +1120,37 @@ vec_xstd2(vector double __vec, long __offset, double *__ptr) {...@@ -888,31 +1120,37 @@ vec_xstd2(vector double __vec, long __offset, double *__ptr) {
8881120
889/*-- vec_xstw4 --------------------------------------------------------------*/1121/*-- vec_xstw4 --------------------------------------------------------------*/
8901122
1123// This prototype is deprecated.
891static inline __ATTRS_o_ai void1124static inline __ATTRS_o_ai void
892vec_xstw4(vector signed char __vec, long __offset, signed char *__ptr) {1125vec_xstw4(vector signed char __vec, long __offset, signed char *__ptr) {
893 *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1126 *(vector signed char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
894}1127}
8951128
1129// This prototype is deprecated.
896static inline __ATTRS_o_ai void1130static inline __ATTRS_o_ai void
897vec_xstw4(vector unsigned char __vec, long __offset, unsigned char *__ptr) {1131vec_xstw4(vector unsigned char __vec, long __offset, unsigned char *__ptr) {
898 *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1132 *(vector unsigned char *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
899}1133}
9001134
1135// This prototype is deprecated.
901static inline __ATTRS_o_ai void1136static inline __ATTRS_o_ai void
902vec_xstw4(vector signed short __vec, long __offset, signed short *__ptr) {1137vec_xstw4(vector signed short __vec, long __offset, signed short *__ptr) {
903 *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1138 *(vector signed short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
904}1139}
9051140
1141// This prototype is deprecated.
906static inline __ATTRS_o_ai void1142static inline __ATTRS_o_ai void
907vec_xstw4(vector unsigned short __vec, long __offset, unsigned short *__ptr) {1143vec_xstw4(vector unsigned short __vec, long __offset, unsigned short *__ptr) {
908 *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1144 *(vector unsigned short *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
909}1145}
9101146
1147// This prototype is deprecated.
911static inline __ATTRS_o_ai void1148static inline __ATTRS_o_ai void
912vec_xstw4(vector signed int __vec, long __offset, signed int *__ptr) {1149vec_xstw4(vector signed int __vec, long __offset, signed int *__ptr) {
913 *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1150 *(vector signed int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
914}1151}
9151152
1153// This prototype is deprecated.
916static inline __ATTRS_o_ai void1154static inline __ATTRS_o_ai void
917vec_xstw4(vector unsigned int __vec, long __offset, unsigned int *__ptr) {1155vec_xstw4(vector unsigned int __vec, long __offset, unsigned int *__ptr) {
918 *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;1156 *(vector unsigned int *)((__INTPTR_TYPE__)__ptr + __offset) = __vec;
...@@ -952,6 +1190,12 @@ extern __ATTRS_o vector unsigned long long...@@ -952,6 +1190,12 @@ extern __ATTRS_o vector unsigned long long
952vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)1190vec_load_bndry(const unsigned long long *__ptr, unsigned short __len)
953 __constant_pow2_range(__len, 64, 4096);1191 __constant_pow2_range(__len, 64, 4096);
9541192
1193#if __ARCH__ >= 12
1194extern __ATTRS_o vector float
1195vec_load_bndry(const float *__ptr, unsigned short __len)
1196 __constant_pow2_range(__len, 64, 4096);
1197#endif
1198
955extern __ATTRS_o vector double1199extern __ATTRS_o vector double
956vec_load_bndry(const double *__ptr, unsigned short __len)1200vec_load_bndry(const double *__ptr, unsigned short __len)
957 __constant_pow2_range(__len, 64, 4096);1201 __constant_pow2_range(__len, 64, 4096);
...@@ -1007,11 +1251,27 @@ vec_load_len(const unsigned long long *__ptr, unsigned int __len) {...@@ -1007,11 +1251,27 @@ vec_load_len(const unsigned long long *__ptr, unsigned int __len) {
1007 return (vector unsigned long long)__builtin_s390_vll(__len, __ptr);1251 return (vector unsigned long long)__builtin_s390_vll(__len, __ptr);
1008}1252}
10091253
1254#if __ARCH__ >= 12
1255static inline __ATTRS_o_ai vector float
1256vec_load_len(const float *__ptr, unsigned int __len) {
1257 return (vector float)__builtin_s390_vll(__len, __ptr);
1258}
1259#endif
1260
1010static inline __ATTRS_o_ai vector double1261static inline __ATTRS_o_ai vector double
1011vec_load_len(const double *__ptr, unsigned int __len) {1262vec_load_len(const double *__ptr, unsigned int __len) {
1012 return (vector double)__builtin_s390_vll(__len, __ptr);1263 return (vector double)__builtin_s390_vll(__len, __ptr);
1013}1264}
10141265
1266/*-- vec_load_len_r ---------------------------------------------------------*/
1267
1268#if __ARCH__ >= 12
1269static inline __ATTRS_ai vector unsigned char
1270vec_load_len_r(const unsigned char *__ptr, unsigned int __len) {
1271 return (vector unsigned char)__builtin_s390_vlrl(__len, __ptr);
1272}
1273#endif
1274
1015/*-- vec_store_len ----------------------------------------------------------*/1275/*-- vec_store_len ----------------------------------------------------------*/
10161276
1017static inline __ATTRS_o_ai void1277static inline __ATTRS_o_ai void
...@@ -1062,12 +1322,30 @@ vec_store_len(vector unsigned long long __vec, unsigned long long *__ptr,...@@ -1062,12 +1322,30 @@ vec_store_len(vector unsigned long long __vec, unsigned long long *__ptr,
1062 __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);1322 __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1063}1323}
10641324
1325#if __ARCH__ >= 12
1326static inline __ATTRS_o_ai void
1327vec_store_len(vector float __vec, float *__ptr,
1328 unsigned int __len) {
1329 __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1330}
1331#endif
1332
1065static inline __ATTRS_o_ai void1333static inline __ATTRS_o_ai void
1066vec_store_len(vector double __vec, double *__ptr,1334vec_store_len(vector double __vec, double *__ptr,
1067 unsigned int __len) {1335 unsigned int __len) {
1068 __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);1336 __builtin_s390_vstl((vector signed char)__vec, __len, __ptr);
1069}1337}
10701338
1339/*-- vec_store_len_r --------------------------------------------------------*/
1340
1341#if __ARCH__ >= 12
1342static inline __ATTRS_ai void
1343vec_store_len_r(vector unsigned char __vec, unsigned char *__ptr,
1344 unsigned int __len) {
1345 __builtin_s390_vstrl((vector signed char)__vec, __len, __ptr);
1346}
1347#endif
1348
1071/*-- vec_load_pair ----------------------------------------------------------*/1349/*-- vec_load_pair ----------------------------------------------------------*/
10721350
1073static inline __ATTRS_o_ai vector signed long long1351static inline __ATTRS_o_ai vector signed long long
...@@ -1232,6 +1510,14 @@ vec_splat(vector unsigned long long __vec, int __index)...@@ -1232,6 +1510,14 @@ vec_splat(vector unsigned long long __vec, int __index)
1232 return (vector unsigned long long)__vec[__index];1510 return (vector unsigned long long)__vec[__index];
1233}1511}
12341512
1513#if __ARCH__ >= 12
1514static inline __ATTRS_o_ai vector float
1515vec_splat(vector float __vec, int __index)
1516 __constant_range(__index, 0, 3) {
1517 return (vector float)__vec[__index];
1518}
1519#endif
1520
1235static inline __ATTRS_o_ai vector double1521static inline __ATTRS_o_ai vector double
1236vec_splat(vector double __vec, int __index)1522vec_splat(vector double __vec, int __index)
1237 __constant_range(__index, 0, 1) {1523 __constant_range(__index, 0, 1) {
...@@ -1332,6 +1618,13 @@ vec_splats(unsigned long long __scalar) {...@@ -1332,6 +1618,13 @@ vec_splats(unsigned long long __scalar) {
1332 return (vector unsigned long long)__scalar;1618 return (vector unsigned long long)__scalar;
1333}1619}
13341620
1621#if __ARCH__ >= 12
1622static inline __ATTRS_o_ai vector float
1623vec_splats(float __scalar) {
1624 return (vector float)__scalar;
1625}
1626#endif
1627
1335static inline __ATTRS_o_ai vector double1628static inline __ATTRS_o_ai vector double
1336vec_splats(double __scalar) {1629vec_splats(double __scalar) {
1337 return (vector double)__scalar;1630 return (vector double)__scalar;
...@@ -1425,6 +1718,13 @@ vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {...@@ -1425,6 +1718,13 @@ vec_mergeh(vector unsigned long long __a, vector unsigned long long __b) {
1425 return (vector unsigned long long)(__a[0], __b[0]);1718 return (vector unsigned long long)(__a[0], __b[0]);
1426}1719}
14271720
1721#if __ARCH__ >= 12
1722static inline __ATTRS_o_ai vector float
1723vec_mergeh(vector float __a, vector float __b) {
1724 return (vector float)(__a[0], __b[0], __a[1], __b[1]);
1725}
1726#endif
1727
1428static inline __ATTRS_o_ai vector double1728static inline __ATTRS_o_ai vector double
1429vec_mergeh(vector double __a, vector double __b) {1729vec_mergeh(vector double __a, vector double __b) {
1430 return (vector double)(__a[0], __b[0]);1730 return (vector double)(__a[0], __b[0]);
...@@ -1501,6 +1801,13 @@ vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {...@@ -1501,6 +1801,13 @@ vec_mergel(vector unsigned long long __a, vector unsigned long long __b) {
1501 return (vector unsigned long long)(__a[1], __b[1]);1801 return (vector unsigned long long)(__a[1], __b[1]);
1502}1802}
15031803
1804#if __ARCH__ >= 12
1805static inline __ATTRS_o_ai vector float
1806vec_mergel(vector float __a, vector float __b) {
1807 return (vector float)(__a[2], __b[2], __a[3], __b[3]);
1808}
1809#endif
1810
1504static inline __ATTRS_o_ai vector double1811static inline __ATTRS_o_ai vector double
1505vec_mergel(vector double __a, vector double __b) {1812vec_mergel(vector double __a, vector double __b) {
1506 return (vector double)(__a[1], __b[1]);1813 return (vector double)(__a[1], __b[1]);
...@@ -1866,6 +2173,13 @@ vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {...@@ -1866,6 +2173,13 @@ vec_cmpeq(vector unsigned long long __a, vector unsigned long long __b) {
1866 return (vector bool long long)(__a == __b);2173 return (vector bool long long)(__a == __b);
1867}2174}
18682175
2176#if __ARCH__ >= 12
2177static inline __ATTRS_o_ai vector bool int
2178vec_cmpeq(vector float __a, vector float __b) {
2179 return (vector bool int)(__a == __b);
2180}
2181#endif
2182
1869static inline __ATTRS_o_ai vector bool long long2183static inline __ATTRS_o_ai vector bool long long
1870vec_cmpeq(vector double __a, vector double __b) {2184vec_cmpeq(vector double __a, vector double __b) {
1871 return (vector bool long long)(__a == __b);2185 return (vector bool long long)(__a == __b);
...@@ -1913,6 +2227,13 @@ vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {...@@ -1913,6 +2227,13 @@ vec_cmpge(vector unsigned long long __a, vector unsigned long long __b) {
1913 return (vector bool long long)(__a >= __b);2227 return (vector bool long long)(__a >= __b);
1914}2228}
19152229
2230#if __ARCH__ >= 12
2231static inline __ATTRS_o_ai vector bool int
2232vec_cmpge(vector float __a, vector float __b) {
2233 return (vector bool int)(__a >= __b);
2234}
2235#endif
2236
1916static inline __ATTRS_o_ai vector bool long long2237static inline __ATTRS_o_ai vector bool long long
1917vec_cmpge(vector double __a, vector double __b) {2238vec_cmpge(vector double __a, vector double __b) {
1918 return (vector bool long long)(__a >= __b);2239 return (vector bool long long)(__a >= __b);
...@@ -1960,6 +2281,13 @@ vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -1960,6 +2281,13 @@ vec_cmpgt(vector unsigned long long __a, vector unsigned long long __b) {
1960 return (vector bool long long)(__a > __b);2281 return (vector bool long long)(__a > __b);
1961}2282}
19622283
2284#if __ARCH__ >= 12
2285static inline __ATTRS_o_ai vector bool int
2286vec_cmpgt(vector float __a, vector float __b) {
2287 return (vector bool int)(__a > __b);
2288}
2289#endif
2290
1963static inline __ATTRS_o_ai vector bool long long2291static inline __ATTRS_o_ai vector bool long long
1964vec_cmpgt(vector double __a, vector double __b) {2292vec_cmpgt(vector double __a, vector double __b) {
1965 return (vector bool long long)(__a > __b);2293 return (vector bool long long)(__a > __b);
...@@ -2007,6 +2335,13 @@ vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2007,6 +2335,13 @@ vec_cmple(vector unsigned long long __a, vector unsigned long long __b) {
2007 return (vector bool long long)(__a <= __b);2335 return (vector bool long long)(__a <= __b);
2008}2336}
20092337
2338#if __ARCH__ >= 12
2339static inline __ATTRS_o_ai vector bool int
2340vec_cmple(vector float __a, vector float __b) {
2341 return (vector bool int)(__a <= __b);
2342}
2343#endif
2344
2010static inline __ATTRS_o_ai vector bool long long2345static inline __ATTRS_o_ai vector bool long long
2011vec_cmple(vector double __a, vector double __b) {2346vec_cmple(vector double __a, vector double __b) {
2012 return (vector bool long long)(__a <= __b);2347 return (vector bool long long)(__a <= __b);
...@@ -2054,6 +2389,13 @@ vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2054,6 +2389,13 @@ vec_cmplt(vector unsigned long long __a, vector unsigned long long __b) {
2054 return (vector bool long long)(__a < __b);2389 return (vector bool long long)(__a < __b);
2055}2390}
20562391
2392#if __ARCH__ >= 12
2393static inline __ATTRS_o_ai vector bool int
2394vec_cmplt(vector float __a, vector float __b) {
2395 return (vector bool int)(__a < __b);
2396}
2397#endif
2398
2057static inline __ATTRS_o_ai vector bool long long2399static inline __ATTRS_o_ai vector bool long long
2058vec_cmplt(vector double __a, vector double __b) {2400vec_cmplt(vector double __a, vector double __b) {
2059 return (vector bool long long)(__a < __b);2401 return (vector bool long long)(__a < __b);
...@@ -2068,6 +2410,7 @@ vec_all_eq(vector signed char __a, vector signed char __b) {...@@ -2068,6 +2410,7 @@ vec_all_eq(vector signed char __a, vector signed char __b) {
2068 return __cc == 0;2410 return __cc == 0;
2069}2411}
20702412
2413// This prototype is deprecated.
2071static inline __ATTRS_o_ai int2414static inline __ATTRS_o_ai int
2072vec_all_eq(vector signed char __a, vector bool char __b) {2415vec_all_eq(vector signed char __a, vector bool char __b) {
2073 int __cc;2416 int __cc;
...@@ -2075,6 +2418,7 @@ vec_all_eq(vector signed char __a, vector bool char __b) {...@@ -2075,6 +2418,7 @@ vec_all_eq(vector signed char __a, vector bool char __b) {
2075 return __cc == 0;2418 return __cc == 0;
2076}2419}
20772420
2421// This prototype is deprecated.
2078static inline __ATTRS_o_ai int2422static inline __ATTRS_o_ai int
2079vec_all_eq(vector bool char __a, vector signed char __b) {2423vec_all_eq(vector bool char __a, vector signed char __b) {
2080 int __cc;2424 int __cc;
...@@ -2090,6 +2434,7 @@ vec_all_eq(vector unsigned char __a, vector unsigned char __b) {...@@ -2090,6 +2434,7 @@ vec_all_eq(vector unsigned char __a, vector unsigned char __b) {
2090 return __cc == 0;2434 return __cc == 0;
2091}2435}
20922436
2437// This prototype is deprecated.
2093static inline __ATTRS_o_ai int2438static inline __ATTRS_o_ai int
2094vec_all_eq(vector unsigned char __a, vector bool char __b) {2439vec_all_eq(vector unsigned char __a, vector bool char __b) {
2095 int __cc;2440 int __cc;
...@@ -2098,6 +2443,7 @@ vec_all_eq(vector unsigned char __a, vector bool char __b) {...@@ -2098,6 +2443,7 @@ vec_all_eq(vector unsigned char __a, vector bool char __b) {
2098 return __cc == 0;2443 return __cc == 0;
2099}2444}
21002445
2446// This prototype is deprecated.
2101static inline __ATTRS_o_ai int2447static inline __ATTRS_o_ai int
2102vec_all_eq(vector bool char __a, vector unsigned char __b) {2448vec_all_eq(vector bool char __a, vector unsigned char __b) {
2103 int __cc;2449 int __cc;
...@@ -2121,6 +2467,7 @@ vec_all_eq(vector signed short __a, vector signed short __b) {...@@ -2121,6 +2467,7 @@ vec_all_eq(vector signed short __a, vector signed short __b) {
2121 return __cc == 0;2467 return __cc == 0;
2122}2468}
21232469
2470// This prototype is deprecated.
2124static inline __ATTRS_o_ai int2471static inline __ATTRS_o_ai int
2125vec_all_eq(vector signed short __a, vector bool short __b) {2472vec_all_eq(vector signed short __a, vector bool short __b) {
2126 int __cc;2473 int __cc;
...@@ -2128,6 +2475,7 @@ vec_all_eq(vector signed short __a, vector bool short __b) {...@@ -2128,6 +2475,7 @@ vec_all_eq(vector signed short __a, vector bool short __b) {
2128 return __cc == 0;2475 return __cc == 0;
2129}2476}
21302477
2478// This prototype is deprecated.
2131static inline __ATTRS_o_ai int2479static inline __ATTRS_o_ai int
2132vec_all_eq(vector bool short __a, vector signed short __b) {2480vec_all_eq(vector bool short __a, vector signed short __b) {
2133 int __cc;2481 int __cc;
...@@ -2143,6 +2491,7 @@ vec_all_eq(vector unsigned short __a, vector unsigned short __b) {...@@ -2143,6 +2491,7 @@ vec_all_eq(vector unsigned short __a, vector unsigned short __b) {
2143 return __cc == 0;2491 return __cc == 0;
2144}2492}
21452493
2494// This prototype is deprecated.
2146static inline __ATTRS_o_ai int2495static inline __ATTRS_o_ai int
2147vec_all_eq(vector unsigned short __a, vector bool short __b) {2496vec_all_eq(vector unsigned short __a, vector bool short __b) {
2148 int __cc;2497 int __cc;
...@@ -2151,6 +2500,7 @@ vec_all_eq(vector unsigned short __a, vector bool short __b) {...@@ -2151,6 +2500,7 @@ vec_all_eq(vector unsigned short __a, vector bool short __b) {
2151 return __cc == 0;2500 return __cc == 0;
2152}2501}
21532502
2503// This prototype is deprecated.
2154static inline __ATTRS_o_ai int2504static inline __ATTRS_o_ai int
2155vec_all_eq(vector bool short __a, vector unsigned short __b) {2505vec_all_eq(vector bool short __a, vector unsigned short __b) {
2156 int __cc;2506 int __cc;
...@@ -2174,6 +2524,7 @@ vec_all_eq(vector signed int __a, vector signed int __b) {...@@ -2174,6 +2524,7 @@ vec_all_eq(vector signed int __a, vector signed int __b) {
2174 return __cc == 0;2524 return __cc == 0;
2175}2525}
21762526
2527// This prototype is deprecated.
2177static inline __ATTRS_o_ai int2528static inline __ATTRS_o_ai int
2178vec_all_eq(vector signed int __a, vector bool int __b) {2529vec_all_eq(vector signed int __a, vector bool int __b) {
2179 int __cc;2530 int __cc;
...@@ -2181,6 +2532,7 @@ vec_all_eq(vector signed int __a, vector bool int __b) {...@@ -2181,6 +2532,7 @@ vec_all_eq(vector signed int __a, vector bool int __b) {
2181 return __cc == 0;2532 return __cc == 0;
2182}2533}
21832534
2535// This prototype is deprecated.
2184static inline __ATTRS_o_ai int2536static inline __ATTRS_o_ai int
2185vec_all_eq(vector bool int __a, vector signed int __b) {2537vec_all_eq(vector bool int __a, vector signed int __b) {
2186 int __cc;2538 int __cc;
...@@ -2196,6 +2548,7 @@ vec_all_eq(vector unsigned int __a, vector unsigned int __b) {...@@ -2196,6 +2548,7 @@ vec_all_eq(vector unsigned int __a, vector unsigned int __b) {
2196 return __cc == 0;2548 return __cc == 0;
2197}2549}
21982550
2551// This prototype is deprecated.
2199static inline __ATTRS_o_ai int2552static inline __ATTRS_o_ai int
2200vec_all_eq(vector unsigned int __a, vector bool int __b) {2553vec_all_eq(vector unsigned int __a, vector bool int __b) {
2201 int __cc;2554 int __cc;
...@@ -2204,6 +2557,7 @@ vec_all_eq(vector unsigned int __a, vector bool int __b) {...@@ -2204,6 +2557,7 @@ vec_all_eq(vector unsigned int __a, vector bool int __b) {
2204 return __cc == 0;2557 return __cc == 0;
2205}2558}
22062559
2560// This prototype is deprecated.
2207static inline __ATTRS_o_ai int2561static inline __ATTRS_o_ai int
2208vec_all_eq(vector bool int __a, vector unsigned int __b) {2562vec_all_eq(vector bool int __a, vector unsigned int __b) {
2209 int __cc;2563 int __cc;
...@@ -2227,6 +2581,7 @@ vec_all_eq(vector signed long long __a, vector signed long long __b) {...@@ -2227,6 +2581,7 @@ vec_all_eq(vector signed long long __a, vector signed long long __b) {
2227 return __cc == 0;2581 return __cc == 0;
2228}2582}
22292583
2584// This prototype is deprecated.
2230static inline __ATTRS_o_ai int2585static inline __ATTRS_o_ai int
2231vec_all_eq(vector signed long long __a, vector bool long long __b) {2586vec_all_eq(vector signed long long __a, vector bool long long __b) {
2232 int __cc;2587 int __cc;
...@@ -2234,6 +2589,7 @@ vec_all_eq(vector signed long long __a, vector bool long long __b) {...@@ -2234,6 +2589,7 @@ vec_all_eq(vector signed long long __a, vector bool long long __b) {
2234 return __cc == 0;2589 return __cc == 0;
2235}2590}
22362591
2592// This prototype is deprecated.
2237static inline __ATTRS_o_ai int2593static inline __ATTRS_o_ai int
2238vec_all_eq(vector bool long long __a, vector signed long long __b) {2594vec_all_eq(vector bool long long __a, vector signed long long __b) {
2239 int __cc;2595 int __cc;
...@@ -2249,6 +2605,7 @@ vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2249,6 +2605,7 @@ vec_all_eq(vector unsigned long long __a, vector unsigned long long __b) {
2249 return __cc == 0;2605 return __cc == 0;
2250}2606}
22512607
2608// This prototype is deprecated.
2252static inline __ATTRS_o_ai int2609static inline __ATTRS_o_ai int
2253vec_all_eq(vector unsigned long long __a, vector bool long long __b) {2610vec_all_eq(vector unsigned long long __a, vector bool long long __b) {
2254 int __cc;2611 int __cc;
...@@ -2257,6 +2614,7 @@ vec_all_eq(vector unsigned long long __a, vector bool long long __b) {...@@ -2257,6 +2614,7 @@ vec_all_eq(vector unsigned long long __a, vector bool long long __b) {
2257 return __cc == 0;2614 return __cc == 0;
2258}2615}
22592616
2617// This prototype is deprecated.
2260static inline __ATTRS_o_ai int2618static inline __ATTRS_o_ai int
2261vec_all_eq(vector bool long long __a, vector unsigned long long __b) {2619vec_all_eq(vector bool long long __a, vector unsigned long long __b) {
2262 int __cc;2620 int __cc;
...@@ -2273,6 +2631,15 @@ vec_all_eq(vector bool long long __a, vector bool long long __b) {...@@ -2273,6 +2631,15 @@ vec_all_eq(vector bool long long __a, vector bool long long __b) {
2273 return __cc == 0;2631 return __cc == 0;
2274}2632}
22752633
2634#if __ARCH__ >= 12
2635static inline __ATTRS_o_ai int
2636vec_all_eq(vector float __a, vector float __b) {
2637 int __cc;
2638 __builtin_s390_vfcesbs(__a, __b, &__cc);
2639 return __cc == 0;
2640}
2641#endif
2642
2276static inline __ATTRS_o_ai int2643static inline __ATTRS_o_ai int
2277vec_all_eq(vector double __a, vector double __b) {2644vec_all_eq(vector double __a, vector double __b) {
2278 int __cc;2645 int __cc;
...@@ -2289,6 +2656,7 @@ vec_all_ne(vector signed char __a, vector signed char __b) {...@@ -2289,6 +2656,7 @@ vec_all_ne(vector signed char __a, vector signed char __b) {
2289 return __cc == 3;2656 return __cc == 3;
2290}2657}
22912658
2659// This prototype is deprecated.
2292static inline __ATTRS_o_ai int2660static inline __ATTRS_o_ai int
2293vec_all_ne(vector signed char __a, vector bool char __b) {2661vec_all_ne(vector signed char __a, vector bool char __b) {
2294 int __cc;2662 int __cc;
...@@ -2296,6 +2664,7 @@ vec_all_ne(vector signed char __a, vector bool char __b) {...@@ -2296,6 +2664,7 @@ vec_all_ne(vector signed char __a, vector bool char __b) {
2296 return __cc == 3;2664 return __cc == 3;
2297}2665}
22982666
2667// This prototype is deprecated.
2299static inline __ATTRS_o_ai int2668static inline __ATTRS_o_ai int
2300vec_all_ne(vector bool char __a, vector signed char __b) {2669vec_all_ne(vector bool char __a, vector signed char __b) {
2301 int __cc;2670 int __cc;
...@@ -2311,6 +2680,7 @@ vec_all_ne(vector unsigned char __a, vector unsigned char __b) {...@@ -2311,6 +2680,7 @@ vec_all_ne(vector unsigned char __a, vector unsigned char __b) {
2311 return __cc == 3;2680 return __cc == 3;
2312}2681}
23132682
2683// This prototype is deprecated.
2314static inline __ATTRS_o_ai int2684static inline __ATTRS_o_ai int
2315vec_all_ne(vector unsigned char __a, vector bool char __b) {2685vec_all_ne(vector unsigned char __a, vector bool char __b) {
2316 int __cc;2686 int __cc;
...@@ -2319,6 +2689,7 @@ vec_all_ne(vector unsigned char __a, vector bool char __b) {...@@ -2319,6 +2689,7 @@ vec_all_ne(vector unsigned char __a, vector bool char __b) {
2319 return __cc == 3;2689 return __cc == 3;
2320}2690}
23212691
2692// This prototype is deprecated.
2322static inline __ATTRS_o_ai int2693static inline __ATTRS_o_ai int
2323vec_all_ne(vector bool char __a, vector unsigned char __b) {2694vec_all_ne(vector bool char __a, vector unsigned char __b) {
2324 int __cc;2695 int __cc;
...@@ -2342,6 +2713,7 @@ vec_all_ne(vector signed short __a, vector signed short __b) {...@@ -2342,6 +2713,7 @@ vec_all_ne(vector signed short __a, vector signed short __b) {
2342 return __cc == 3;2713 return __cc == 3;
2343}2714}
23442715
2716// This prototype is deprecated.
2345static inline __ATTRS_o_ai int2717static inline __ATTRS_o_ai int
2346vec_all_ne(vector signed short __a, vector bool short __b) {2718vec_all_ne(vector signed short __a, vector bool short __b) {
2347 int __cc;2719 int __cc;
...@@ -2349,6 +2721,7 @@ vec_all_ne(vector signed short __a, vector bool short __b) {...@@ -2349,6 +2721,7 @@ vec_all_ne(vector signed short __a, vector bool short __b) {
2349 return __cc == 3;2721 return __cc == 3;
2350}2722}
23512723
2724// This prototype is deprecated.
2352static inline __ATTRS_o_ai int2725static inline __ATTRS_o_ai int
2353vec_all_ne(vector bool short __a, vector signed short __b) {2726vec_all_ne(vector bool short __a, vector signed short __b) {
2354 int __cc;2727 int __cc;
...@@ -2364,6 +2737,7 @@ vec_all_ne(vector unsigned short __a, vector unsigned short __b) {...@@ -2364,6 +2737,7 @@ vec_all_ne(vector unsigned short __a, vector unsigned short __b) {
2364 return __cc == 3;2737 return __cc == 3;
2365}2738}
23662739
2740// This prototype is deprecated.
2367static inline __ATTRS_o_ai int2741static inline __ATTRS_o_ai int
2368vec_all_ne(vector unsigned short __a, vector bool short __b) {2742vec_all_ne(vector unsigned short __a, vector bool short __b) {
2369 int __cc;2743 int __cc;
...@@ -2372,6 +2746,7 @@ vec_all_ne(vector unsigned short __a, vector bool short __b) {...@@ -2372,6 +2746,7 @@ vec_all_ne(vector unsigned short __a, vector bool short __b) {
2372 return __cc == 3;2746 return __cc == 3;
2373}2747}
23742748
2749// This prototype is deprecated.
2375static inline __ATTRS_o_ai int2750static inline __ATTRS_o_ai int
2376vec_all_ne(vector bool short __a, vector unsigned short __b) {2751vec_all_ne(vector bool short __a, vector unsigned short __b) {
2377 int __cc;2752 int __cc;
...@@ -2395,6 +2770,7 @@ vec_all_ne(vector signed int __a, vector signed int __b) {...@@ -2395,6 +2770,7 @@ vec_all_ne(vector signed int __a, vector signed int __b) {
2395 return __cc == 3;2770 return __cc == 3;
2396}2771}
23972772
2773// This prototype is deprecated.
2398static inline __ATTRS_o_ai int2774static inline __ATTRS_o_ai int
2399vec_all_ne(vector signed int __a, vector bool int __b) {2775vec_all_ne(vector signed int __a, vector bool int __b) {
2400 int __cc;2776 int __cc;
...@@ -2402,6 +2778,7 @@ vec_all_ne(vector signed int __a, vector bool int __b) {...@@ -2402,6 +2778,7 @@ vec_all_ne(vector signed int __a, vector bool int __b) {
2402 return __cc == 3;2778 return __cc == 3;
2403}2779}
24042780
2781// This prototype is deprecated.
2405static inline __ATTRS_o_ai int2782static inline __ATTRS_o_ai int
2406vec_all_ne(vector bool int __a, vector signed int __b) {2783vec_all_ne(vector bool int __a, vector signed int __b) {
2407 int __cc;2784 int __cc;
...@@ -2417,6 +2794,7 @@ vec_all_ne(vector unsigned int __a, vector unsigned int __b) {...@@ -2417,6 +2794,7 @@ vec_all_ne(vector unsigned int __a, vector unsigned int __b) {
2417 return __cc == 3;2794 return __cc == 3;
2418}2795}
24192796
2797// This prototype is deprecated.
2420static inline __ATTRS_o_ai int2798static inline __ATTRS_o_ai int
2421vec_all_ne(vector unsigned int __a, vector bool int __b) {2799vec_all_ne(vector unsigned int __a, vector bool int __b) {
2422 int __cc;2800 int __cc;
...@@ -2425,6 +2803,7 @@ vec_all_ne(vector unsigned int __a, vector bool int __b) {...@@ -2425,6 +2803,7 @@ vec_all_ne(vector unsigned int __a, vector bool int __b) {
2425 return __cc == 3;2803 return __cc == 3;
2426}2804}
24272805
2806// This prototype is deprecated.
2428static inline __ATTRS_o_ai int2807static inline __ATTRS_o_ai int
2429vec_all_ne(vector bool int __a, vector unsigned int __b) {2808vec_all_ne(vector bool int __a, vector unsigned int __b) {
2430 int __cc;2809 int __cc;
...@@ -2448,6 +2827,7 @@ vec_all_ne(vector signed long long __a, vector signed long long __b) {...@@ -2448,6 +2827,7 @@ vec_all_ne(vector signed long long __a, vector signed long long __b) {
2448 return __cc == 3;2827 return __cc == 3;
2449}2828}
24502829
2830// This prototype is deprecated.
2451static inline __ATTRS_o_ai int2831static inline __ATTRS_o_ai int
2452vec_all_ne(vector signed long long __a, vector bool long long __b) {2832vec_all_ne(vector signed long long __a, vector bool long long __b) {
2453 int __cc;2833 int __cc;
...@@ -2455,6 +2835,7 @@ vec_all_ne(vector signed long long __a, vector bool long long __b) {...@@ -2455,6 +2835,7 @@ vec_all_ne(vector signed long long __a, vector bool long long __b) {
2455 return __cc == 3;2835 return __cc == 3;
2456}2836}
24572837
2838// This prototype is deprecated.
2458static inline __ATTRS_o_ai int2839static inline __ATTRS_o_ai int
2459vec_all_ne(vector bool long long __a, vector signed long long __b) {2840vec_all_ne(vector bool long long __a, vector signed long long __b) {
2460 int __cc;2841 int __cc;
...@@ -2470,6 +2851,7 @@ vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2470,6 +2851,7 @@ vec_all_ne(vector unsigned long long __a, vector unsigned long long __b) {
2470 return __cc == 3;2851 return __cc == 3;
2471}2852}
24722853
2854// This prototype is deprecated.
2473static inline __ATTRS_o_ai int2855static inline __ATTRS_o_ai int
2474vec_all_ne(vector unsigned long long __a, vector bool long long __b) {2856vec_all_ne(vector unsigned long long __a, vector bool long long __b) {
2475 int __cc;2857 int __cc;
...@@ -2478,6 +2860,7 @@ vec_all_ne(vector unsigned long long __a, vector bool long long __b) {...@@ -2478,6 +2860,7 @@ vec_all_ne(vector unsigned long long __a, vector bool long long __b) {
2478 return __cc == 3;2860 return __cc == 3;
2479}2861}
24802862
2863// This prototype is deprecated.
2481static inline __ATTRS_o_ai int2864static inline __ATTRS_o_ai int
2482vec_all_ne(vector bool long long __a, vector unsigned long long __b) {2865vec_all_ne(vector bool long long __a, vector unsigned long long __b) {
2483 int __cc;2866 int __cc;
...@@ -2494,6 +2877,15 @@ vec_all_ne(vector bool long long __a, vector bool long long __b) {...@@ -2494,6 +2877,15 @@ vec_all_ne(vector bool long long __a, vector bool long long __b) {
2494 return __cc == 3;2877 return __cc == 3;
2495}2878}
24962879
2880#if __ARCH__ >= 12
2881static inline __ATTRS_o_ai int
2882vec_all_ne(vector float __a, vector float __b) {
2883 int __cc;
2884 __builtin_s390_vfcesbs(__a, __b, &__cc);
2885 return __cc == 3;
2886}
2887#endif
2888
2497static inline __ATTRS_o_ai int2889static inline __ATTRS_o_ai int
2498vec_all_ne(vector double __a, vector double __b) {2890vec_all_ne(vector double __a, vector double __b) {
2499 int __cc;2891 int __cc;
...@@ -2510,6 +2902,7 @@ vec_all_ge(vector signed char __a, vector signed char __b) {...@@ -2510,6 +2902,7 @@ vec_all_ge(vector signed char __a, vector signed char __b) {
2510 return __cc == 3;2902 return __cc == 3;
2511}2903}
25122904
2905// This prototype is deprecated.
2513static inline __ATTRS_o_ai int2906static inline __ATTRS_o_ai int
2514vec_all_ge(vector signed char __a, vector bool char __b) {2907vec_all_ge(vector signed char __a, vector bool char __b) {
2515 int __cc;2908 int __cc;
...@@ -2517,6 +2910,7 @@ vec_all_ge(vector signed char __a, vector bool char __b) {...@@ -2517,6 +2910,7 @@ vec_all_ge(vector signed char __a, vector bool char __b) {
2517 return __cc == 3;2910 return __cc == 3;
2518}2911}
25192912
2913// This prototype is deprecated.
2520static inline __ATTRS_o_ai int2914static inline __ATTRS_o_ai int
2521vec_all_ge(vector bool char __a, vector signed char __b) {2915vec_all_ge(vector bool char __a, vector signed char __b) {
2522 int __cc;2916 int __cc;
...@@ -2531,6 +2925,7 @@ vec_all_ge(vector unsigned char __a, vector unsigned char __b) {...@@ -2531,6 +2925,7 @@ vec_all_ge(vector unsigned char __a, vector unsigned char __b) {
2531 return __cc == 3;2925 return __cc == 3;
2532}2926}
25332927
2928// This prototype is deprecated.
2534static inline __ATTRS_o_ai int2929static inline __ATTRS_o_ai int
2535vec_all_ge(vector unsigned char __a, vector bool char __b) {2930vec_all_ge(vector unsigned char __a, vector bool char __b) {
2536 int __cc;2931 int __cc;
...@@ -2538,6 +2933,7 @@ vec_all_ge(vector unsigned char __a, vector bool char __b) {...@@ -2538,6 +2933,7 @@ vec_all_ge(vector unsigned char __a, vector bool char __b) {
2538 return __cc == 3;2933 return __cc == 3;
2539}2934}
25402935
2936// This prototype is deprecated.
2541static inline __ATTRS_o_ai int2937static inline __ATTRS_o_ai int
2542vec_all_ge(vector bool char __a, vector unsigned char __b) {2938vec_all_ge(vector bool char __a, vector unsigned char __b) {
2543 int __cc;2939 int __cc;
...@@ -2545,6 +2941,7 @@ vec_all_ge(vector bool char __a, vector unsigned char __b) {...@@ -2545,6 +2941,7 @@ vec_all_ge(vector bool char __a, vector unsigned char __b) {
2545 return __cc == 3;2941 return __cc == 3;
2546}2942}
25472943
2944// This prototype is deprecated.
2548static inline __ATTRS_o_ai int2945static inline __ATTRS_o_ai int
2549vec_all_ge(vector bool char __a, vector bool char __b) {2946vec_all_ge(vector bool char __a, vector bool char __b) {
2550 int __cc;2947 int __cc;
...@@ -2560,6 +2957,7 @@ vec_all_ge(vector signed short __a, vector signed short __b) {...@@ -2560,6 +2957,7 @@ vec_all_ge(vector signed short __a, vector signed short __b) {
2560 return __cc == 3;2957 return __cc == 3;
2561}2958}
25622959
2960// This prototype is deprecated.
2563static inline __ATTRS_o_ai int2961static inline __ATTRS_o_ai int
2564vec_all_ge(vector signed short __a, vector bool short __b) {2962vec_all_ge(vector signed short __a, vector bool short __b) {
2565 int __cc;2963 int __cc;
...@@ -2567,6 +2965,7 @@ vec_all_ge(vector signed short __a, vector bool short __b) {...@@ -2567,6 +2965,7 @@ vec_all_ge(vector signed short __a, vector bool short __b) {
2567 return __cc == 3;2965 return __cc == 3;
2568}2966}
25692967
2968// This prototype is deprecated.
2570static inline __ATTRS_o_ai int2969static inline __ATTRS_o_ai int
2571vec_all_ge(vector bool short __a, vector signed short __b) {2970vec_all_ge(vector bool short __a, vector signed short __b) {
2572 int __cc;2971 int __cc;
...@@ -2581,6 +2980,7 @@ vec_all_ge(vector unsigned short __a, vector unsigned short __b) {...@@ -2581,6 +2980,7 @@ vec_all_ge(vector unsigned short __a, vector unsigned short __b) {
2581 return __cc == 3;2980 return __cc == 3;
2582}2981}
25832982
2983// This prototype is deprecated.
2584static inline __ATTRS_o_ai int2984static inline __ATTRS_o_ai int
2585vec_all_ge(vector unsigned short __a, vector bool short __b) {2985vec_all_ge(vector unsigned short __a, vector bool short __b) {
2586 int __cc;2986 int __cc;
...@@ -2588,6 +2988,7 @@ vec_all_ge(vector unsigned short __a, vector bool short __b) {...@@ -2588,6 +2988,7 @@ vec_all_ge(vector unsigned short __a, vector bool short __b) {
2588 return __cc == 3;2988 return __cc == 3;
2589}2989}
25902990
2991// This prototype is deprecated.
2591static inline __ATTRS_o_ai int2992static inline __ATTRS_o_ai int
2592vec_all_ge(vector bool short __a, vector unsigned short __b) {2993vec_all_ge(vector bool short __a, vector unsigned short __b) {
2593 int __cc;2994 int __cc;
...@@ -2595,6 +2996,7 @@ vec_all_ge(vector bool short __a, vector unsigned short __b) {...@@ -2595,6 +2996,7 @@ vec_all_ge(vector bool short __a, vector unsigned short __b) {
2595 return __cc == 3;2996 return __cc == 3;
2596}2997}
25972998
2999// This prototype is deprecated.
2598static inline __ATTRS_o_ai int3000static inline __ATTRS_o_ai int
2599vec_all_ge(vector bool short __a, vector bool short __b) {3001vec_all_ge(vector bool short __a, vector bool short __b) {
2600 int __cc;3002 int __cc;
...@@ -2610,6 +3012,7 @@ vec_all_ge(vector signed int __a, vector signed int __b) {...@@ -2610,6 +3012,7 @@ vec_all_ge(vector signed int __a, vector signed int __b) {
2610 return __cc == 3;3012 return __cc == 3;
2611}3013}
26123014
3015// This prototype is deprecated.
2613static inline __ATTRS_o_ai int3016static inline __ATTRS_o_ai int
2614vec_all_ge(vector signed int __a, vector bool int __b) {3017vec_all_ge(vector signed int __a, vector bool int __b) {
2615 int __cc;3018 int __cc;
...@@ -2617,6 +3020,7 @@ vec_all_ge(vector signed int __a, vector bool int __b) {...@@ -2617,6 +3020,7 @@ vec_all_ge(vector signed int __a, vector bool int __b) {
2617 return __cc == 3;3020 return __cc == 3;
2618}3021}
26193022
3023// This prototype is deprecated.
2620static inline __ATTRS_o_ai int3024static inline __ATTRS_o_ai int
2621vec_all_ge(vector bool int __a, vector signed int __b) {3025vec_all_ge(vector bool int __a, vector signed int __b) {
2622 int __cc;3026 int __cc;
...@@ -2631,6 +3035,7 @@ vec_all_ge(vector unsigned int __a, vector unsigned int __b) {...@@ -2631,6 +3035,7 @@ vec_all_ge(vector unsigned int __a, vector unsigned int __b) {
2631 return __cc == 3;3035 return __cc == 3;
2632}3036}
26333037
3038// This prototype is deprecated.
2634static inline __ATTRS_o_ai int3039static inline __ATTRS_o_ai int
2635vec_all_ge(vector unsigned int __a, vector bool int __b) {3040vec_all_ge(vector unsigned int __a, vector bool int __b) {
2636 int __cc;3041 int __cc;
...@@ -2638,6 +3043,7 @@ vec_all_ge(vector unsigned int __a, vector bool int __b) {...@@ -2638,6 +3043,7 @@ vec_all_ge(vector unsigned int __a, vector bool int __b) {
2638 return __cc == 3;3043 return __cc == 3;
2639}3044}
26403045
3046// This prototype is deprecated.
2641static inline __ATTRS_o_ai int3047static inline __ATTRS_o_ai int
2642vec_all_ge(vector bool int __a, vector unsigned int __b) {3048vec_all_ge(vector bool int __a, vector unsigned int __b) {
2643 int __cc;3049 int __cc;
...@@ -2645,6 +3051,7 @@ vec_all_ge(vector bool int __a, vector unsigned int __b) {...@@ -2645,6 +3051,7 @@ vec_all_ge(vector bool int __a, vector unsigned int __b) {
2645 return __cc == 3;3051 return __cc == 3;
2646}3052}
26473053
3054// This prototype is deprecated.
2648static inline __ATTRS_o_ai int3055static inline __ATTRS_o_ai int
2649vec_all_ge(vector bool int __a, vector bool int __b) {3056vec_all_ge(vector bool int __a, vector bool int __b) {
2650 int __cc;3057 int __cc;
...@@ -2660,6 +3067,7 @@ vec_all_ge(vector signed long long __a, vector signed long long __b) {...@@ -2660,6 +3067,7 @@ vec_all_ge(vector signed long long __a, vector signed long long __b) {
2660 return __cc == 3;3067 return __cc == 3;
2661}3068}
26623069
3070// This prototype is deprecated.
2663static inline __ATTRS_o_ai int3071static inline __ATTRS_o_ai int
2664vec_all_ge(vector signed long long __a, vector bool long long __b) {3072vec_all_ge(vector signed long long __a, vector bool long long __b) {
2665 int __cc;3073 int __cc;
...@@ -2667,6 +3075,7 @@ vec_all_ge(vector signed long long __a, vector bool long long __b) {...@@ -2667,6 +3075,7 @@ vec_all_ge(vector signed long long __a, vector bool long long __b) {
2667 return __cc == 3;3075 return __cc == 3;
2668}3076}
26693077
3078// This prototype is deprecated.
2670static inline __ATTRS_o_ai int3079static inline __ATTRS_o_ai int
2671vec_all_ge(vector bool long long __a, vector signed long long __b) {3080vec_all_ge(vector bool long long __a, vector signed long long __b) {
2672 int __cc;3081 int __cc;
...@@ -2681,6 +3090,7 @@ vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2681,6 +3090,7 @@ vec_all_ge(vector unsigned long long __a, vector unsigned long long __b) {
2681 return __cc == 3;3090 return __cc == 3;
2682}3091}
26833092
3093// This prototype is deprecated.
2684static inline __ATTRS_o_ai int3094static inline __ATTRS_o_ai int
2685vec_all_ge(vector unsigned long long __a, vector bool long long __b) {3095vec_all_ge(vector unsigned long long __a, vector bool long long __b) {
2686 int __cc;3096 int __cc;
...@@ -2688,6 +3098,7 @@ vec_all_ge(vector unsigned long long __a, vector bool long long __b) {...@@ -2688,6 +3098,7 @@ vec_all_ge(vector unsigned long long __a, vector bool long long __b) {
2688 return __cc == 3;3098 return __cc == 3;
2689}3099}
26903100
3101// This prototype is deprecated.
2691static inline __ATTRS_o_ai int3102static inline __ATTRS_o_ai int
2692vec_all_ge(vector bool long long __a, vector unsigned long long __b) {3103vec_all_ge(vector bool long long __a, vector unsigned long long __b) {
2693 int __cc;3104 int __cc;
...@@ -2695,6 +3106,7 @@ vec_all_ge(vector bool long long __a, vector unsigned long long __b) {...@@ -2695,6 +3106,7 @@ vec_all_ge(vector bool long long __a, vector unsigned long long __b) {
2695 return __cc == 3;3106 return __cc == 3;
2696}3107}
26973108
3109// This prototype is deprecated.
2698static inline __ATTRS_o_ai int3110static inline __ATTRS_o_ai int
2699vec_all_ge(vector bool long long __a, vector bool long long __b) {3111vec_all_ge(vector bool long long __a, vector bool long long __b) {
2700 int __cc;3112 int __cc;
...@@ -2703,6 +3115,15 @@ vec_all_ge(vector bool long long __a, vector bool long long __b) {...@@ -2703,6 +3115,15 @@ vec_all_ge(vector bool long long __a, vector bool long long __b) {
2703 return __cc == 3;3115 return __cc == 3;
2704}3116}
27053117
3118#if __ARCH__ >= 12
3119static inline __ATTRS_o_ai int
3120vec_all_ge(vector float __a, vector float __b) {
3121 int __cc;
3122 __builtin_s390_vfchesbs(__a, __b, &__cc);
3123 return __cc == 0;
3124}
3125#endif
3126
2706static inline __ATTRS_o_ai int3127static inline __ATTRS_o_ai int
2707vec_all_ge(vector double __a, vector double __b) {3128vec_all_ge(vector double __a, vector double __b) {
2708 int __cc;3129 int __cc;
...@@ -2719,6 +3140,7 @@ vec_all_gt(vector signed char __a, vector signed char __b) {...@@ -2719,6 +3140,7 @@ vec_all_gt(vector signed char __a, vector signed char __b) {
2719 return __cc == 0;3140 return __cc == 0;
2720}3141}
27213142
3143// This prototype is deprecated.
2722static inline __ATTRS_o_ai int3144static inline __ATTRS_o_ai int
2723vec_all_gt(vector signed char __a, vector bool char __b) {3145vec_all_gt(vector signed char __a, vector bool char __b) {
2724 int __cc;3146 int __cc;
...@@ -2726,6 +3148,7 @@ vec_all_gt(vector signed char __a, vector bool char __b) {...@@ -2726,6 +3148,7 @@ vec_all_gt(vector signed char __a, vector bool char __b) {
2726 return __cc == 0;3148 return __cc == 0;
2727}3149}
27283150
3151// This prototype is deprecated.
2729static inline __ATTRS_o_ai int3152static inline __ATTRS_o_ai int
2730vec_all_gt(vector bool char __a, vector signed char __b) {3153vec_all_gt(vector bool char __a, vector signed char __b) {
2731 int __cc;3154 int __cc;
...@@ -2740,6 +3163,7 @@ vec_all_gt(vector unsigned char __a, vector unsigned char __b) {...@@ -2740,6 +3163,7 @@ vec_all_gt(vector unsigned char __a, vector unsigned char __b) {
2740 return __cc == 0;3163 return __cc == 0;
2741}3164}
27423165
3166// This prototype is deprecated.
2743static inline __ATTRS_o_ai int3167static inline __ATTRS_o_ai int
2744vec_all_gt(vector unsigned char __a, vector bool char __b) {3168vec_all_gt(vector unsigned char __a, vector bool char __b) {
2745 int __cc;3169 int __cc;
...@@ -2747,6 +3171,7 @@ vec_all_gt(vector unsigned char __a, vector bool char __b) {...@@ -2747,6 +3171,7 @@ vec_all_gt(vector unsigned char __a, vector bool char __b) {
2747 return __cc == 0;3171 return __cc == 0;
2748}3172}
27493173
3174// This prototype is deprecated.
2750static inline __ATTRS_o_ai int3175static inline __ATTRS_o_ai int
2751vec_all_gt(vector bool char __a, vector unsigned char __b) {3176vec_all_gt(vector bool char __a, vector unsigned char __b) {
2752 int __cc;3177 int __cc;
...@@ -2754,6 +3179,7 @@ vec_all_gt(vector bool char __a, vector unsigned char __b) {...@@ -2754,6 +3179,7 @@ vec_all_gt(vector bool char __a, vector unsigned char __b) {
2754 return __cc == 0;3179 return __cc == 0;
2755}3180}
27563181
3182// This prototype is deprecated.
2757static inline __ATTRS_o_ai int3183static inline __ATTRS_o_ai int
2758vec_all_gt(vector bool char __a, vector bool char __b) {3184vec_all_gt(vector bool char __a, vector bool char __b) {
2759 int __cc;3185 int __cc;
...@@ -2769,6 +3195,7 @@ vec_all_gt(vector signed short __a, vector signed short __b) {...@@ -2769,6 +3195,7 @@ vec_all_gt(vector signed short __a, vector signed short __b) {
2769 return __cc == 0;3195 return __cc == 0;
2770}3196}
27713197
3198// This prototype is deprecated.
2772static inline __ATTRS_o_ai int3199static inline __ATTRS_o_ai int
2773vec_all_gt(vector signed short __a, vector bool short __b) {3200vec_all_gt(vector signed short __a, vector bool short __b) {
2774 int __cc;3201 int __cc;
...@@ -2776,6 +3203,7 @@ vec_all_gt(vector signed short __a, vector bool short __b) {...@@ -2776,6 +3203,7 @@ vec_all_gt(vector signed short __a, vector bool short __b) {
2776 return __cc == 0;3203 return __cc == 0;
2777}3204}
27783205
3206// This prototype is deprecated.
2779static inline __ATTRS_o_ai int3207static inline __ATTRS_o_ai int
2780vec_all_gt(vector bool short __a, vector signed short __b) {3208vec_all_gt(vector bool short __a, vector signed short __b) {
2781 int __cc;3209 int __cc;
...@@ -2790,6 +3218,7 @@ vec_all_gt(vector unsigned short __a, vector unsigned short __b) {...@@ -2790,6 +3218,7 @@ vec_all_gt(vector unsigned short __a, vector unsigned short __b) {
2790 return __cc == 0;3218 return __cc == 0;
2791}3219}
27923220
3221// This prototype is deprecated.
2793static inline __ATTRS_o_ai int3222static inline __ATTRS_o_ai int
2794vec_all_gt(vector unsigned short __a, vector bool short __b) {3223vec_all_gt(vector unsigned short __a, vector bool short __b) {
2795 int __cc;3224 int __cc;
...@@ -2797,6 +3226,7 @@ vec_all_gt(vector unsigned short __a, vector bool short __b) {...@@ -2797,6 +3226,7 @@ vec_all_gt(vector unsigned short __a, vector bool short __b) {
2797 return __cc == 0;3226 return __cc == 0;
2798}3227}
27993228
3229// This prototype is deprecated.
2800static inline __ATTRS_o_ai int3230static inline __ATTRS_o_ai int
2801vec_all_gt(vector bool short __a, vector unsigned short __b) {3231vec_all_gt(vector bool short __a, vector unsigned short __b) {
2802 int __cc;3232 int __cc;
...@@ -2804,6 +3234,7 @@ vec_all_gt(vector bool short __a, vector unsigned short __b) {...@@ -2804,6 +3234,7 @@ vec_all_gt(vector bool short __a, vector unsigned short __b) {
2804 return __cc == 0;3234 return __cc == 0;
2805}3235}
28063236
3237// This prototype is deprecated.
2807static inline __ATTRS_o_ai int3238static inline __ATTRS_o_ai int
2808vec_all_gt(vector bool short __a, vector bool short __b) {3239vec_all_gt(vector bool short __a, vector bool short __b) {
2809 int __cc;3240 int __cc;
...@@ -2819,6 +3250,7 @@ vec_all_gt(vector signed int __a, vector signed int __b) {...@@ -2819,6 +3250,7 @@ vec_all_gt(vector signed int __a, vector signed int __b) {
2819 return __cc == 0;3250 return __cc == 0;
2820}3251}
28213252
3253// This prototype is deprecated.
2822static inline __ATTRS_o_ai int3254static inline __ATTRS_o_ai int
2823vec_all_gt(vector signed int __a, vector bool int __b) {3255vec_all_gt(vector signed int __a, vector bool int __b) {
2824 int __cc;3256 int __cc;
...@@ -2826,6 +3258,7 @@ vec_all_gt(vector signed int __a, vector bool int __b) {...@@ -2826,6 +3258,7 @@ vec_all_gt(vector signed int __a, vector bool int __b) {
2826 return __cc == 0;3258 return __cc == 0;
2827}3259}
28283260
3261// This prototype is deprecated.
2829static inline __ATTRS_o_ai int3262static inline __ATTRS_o_ai int
2830vec_all_gt(vector bool int __a, vector signed int __b) {3263vec_all_gt(vector bool int __a, vector signed int __b) {
2831 int __cc;3264 int __cc;
...@@ -2840,6 +3273,7 @@ vec_all_gt(vector unsigned int __a, vector unsigned int __b) {...@@ -2840,6 +3273,7 @@ vec_all_gt(vector unsigned int __a, vector unsigned int __b) {
2840 return __cc == 0;3273 return __cc == 0;
2841}3274}
28423275
3276// This prototype is deprecated.
2843static inline __ATTRS_o_ai int3277static inline __ATTRS_o_ai int
2844vec_all_gt(vector unsigned int __a, vector bool int __b) {3278vec_all_gt(vector unsigned int __a, vector bool int __b) {
2845 int __cc;3279 int __cc;
...@@ -2847,6 +3281,7 @@ vec_all_gt(vector unsigned int __a, vector bool int __b) {...@@ -2847,6 +3281,7 @@ vec_all_gt(vector unsigned int __a, vector bool int __b) {
2847 return __cc == 0;3281 return __cc == 0;
2848}3282}
28493283
3284// This prototype is deprecated.
2850static inline __ATTRS_o_ai int3285static inline __ATTRS_o_ai int
2851vec_all_gt(vector bool int __a, vector unsigned int __b) {3286vec_all_gt(vector bool int __a, vector unsigned int __b) {
2852 int __cc;3287 int __cc;
...@@ -2854,6 +3289,7 @@ vec_all_gt(vector bool int __a, vector unsigned int __b) {...@@ -2854,6 +3289,7 @@ vec_all_gt(vector bool int __a, vector unsigned int __b) {
2854 return __cc == 0;3289 return __cc == 0;
2855}3290}
28563291
3292// This prototype is deprecated.
2857static inline __ATTRS_o_ai int3293static inline __ATTRS_o_ai int
2858vec_all_gt(vector bool int __a, vector bool int __b) {3294vec_all_gt(vector bool int __a, vector bool int __b) {
2859 int __cc;3295 int __cc;
...@@ -2869,6 +3305,7 @@ vec_all_gt(vector signed long long __a, vector signed long long __b) {...@@ -2869,6 +3305,7 @@ vec_all_gt(vector signed long long __a, vector signed long long __b) {
2869 return __cc == 0;3305 return __cc == 0;
2870}3306}
28713307
3308// This prototype is deprecated.
2872static inline __ATTRS_o_ai int3309static inline __ATTRS_o_ai int
2873vec_all_gt(vector signed long long __a, vector bool long long __b) {3310vec_all_gt(vector signed long long __a, vector bool long long __b) {
2874 int __cc;3311 int __cc;
...@@ -2876,6 +3313,7 @@ vec_all_gt(vector signed long long __a, vector bool long long __b) {...@@ -2876,6 +3313,7 @@ vec_all_gt(vector signed long long __a, vector bool long long __b) {
2876 return __cc == 0;3313 return __cc == 0;
2877}3314}
28783315
3316// This prototype is deprecated.
2879static inline __ATTRS_o_ai int3317static inline __ATTRS_o_ai int
2880vec_all_gt(vector bool long long __a, vector signed long long __b) {3318vec_all_gt(vector bool long long __a, vector signed long long __b) {
2881 int __cc;3319 int __cc;
...@@ -2890,6 +3328,7 @@ vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -2890,6 +3328,7 @@ vec_all_gt(vector unsigned long long __a, vector unsigned long long __b) {
2890 return __cc == 0;3328 return __cc == 0;
2891}3329}
28923330
3331// This prototype is deprecated.
2893static inline __ATTRS_o_ai int3332static inline __ATTRS_o_ai int
2894vec_all_gt(vector unsigned long long __a, vector bool long long __b) {3333vec_all_gt(vector unsigned long long __a, vector bool long long __b) {
2895 int __cc;3334 int __cc;
...@@ -2897,6 +3336,7 @@ vec_all_gt(vector unsigned long long __a, vector bool long long __b) {...@@ -2897,6 +3336,7 @@ vec_all_gt(vector unsigned long long __a, vector bool long long __b) {
2897 return __cc == 0;3336 return __cc == 0;
2898}3337}
28993338
3339// This prototype is deprecated.
2900static inline __ATTRS_o_ai int3340static inline __ATTRS_o_ai int
2901vec_all_gt(vector bool long long __a, vector unsigned long long __b) {3341vec_all_gt(vector bool long long __a, vector unsigned long long __b) {
2902 int __cc;3342 int __cc;
...@@ -2904,6 +3344,7 @@ vec_all_gt(vector bool long long __a, vector unsigned long long __b) {...@@ -2904,6 +3344,7 @@ vec_all_gt(vector bool long long __a, vector unsigned long long __b) {
2904 return __cc == 0;3344 return __cc == 0;
2905}3345}
29063346
3347// This prototype is deprecated.
2907static inline __ATTRS_o_ai int3348static inline __ATTRS_o_ai int
2908vec_all_gt(vector bool long long __a, vector bool long long __b) {3349vec_all_gt(vector bool long long __a, vector bool long long __b) {
2909 int __cc;3350 int __cc;
...@@ -2912,6 +3353,15 @@ vec_all_gt(vector bool long long __a, vector bool long long __b) {...@@ -2912,6 +3353,15 @@ vec_all_gt(vector bool long long __a, vector bool long long __b) {
2912 return __cc == 0;3353 return __cc == 0;
2913}3354}
29143355
3356#if __ARCH__ >= 12
3357static inline __ATTRS_o_ai int
3358vec_all_gt(vector float __a, vector float __b) {
3359 int __cc;
3360 __builtin_s390_vfchsbs(__a, __b, &__cc);
3361 return __cc == 0;
3362}
3363#endif
3364
2915static inline __ATTRS_o_ai int3365static inline __ATTRS_o_ai int
2916vec_all_gt(vector double __a, vector double __b) {3366vec_all_gt(vector double __a, vector double __b) {
2917 int __cc;3367 int __cc;
...@@ -2928,6 +3378,7 @@ vec_all_le(vector signed char __a, vector signed char __b) {...@@ -2928,6 +3378,7 @@ vec_all_le(vector signed char __a, vector signed char __b) {
2928 return __cc == 3;3378 return __cc == 3;
2929}3379}
29303380
3381// This prototype is deprecated.
2931static inline __ATTRS_o_ai int3382static inline __ATTRS_o_ai int
2932vec_all_le(vector signed char __a, vector bool char __b) {3383vec_all_le(vector signed char __a, vector bool char __b) {
2933 int __cc;3384 int __cc;
...@@ -2935,6 +3386,7 @@ vec_all_le(vector signed char __a, vector bool char __b) {...@@ -2935,6 +3386,7 @@ vec_all_le(vector signed char __a, vector bool char __b) {
2935 return __cc == 3;3386 return __cc == 3;
2936}3387}
29373388
3389// This prototype is deprecated.
2938static inline __ATTRS_o_ai int3390static inline __ATTRS_o_ai int
2939vec_all_le(vector bool char __a, vector signed char __b) {3391vec_all_le(vector bool char __a, vector signed char __b) {
2940 int __cc;3392 int __cc;
...@@ -2949,6 +3401,7 @@ vec_all_le(vector unsigned char __a, vector unsigned char __b) {...@@ -2949,6 +3401,7 @@ vec_all_le(vector unsigned char __a, vector unsigned char __b) {
2949 return __cc == 3;3401 return __cc == 3;
2950}3402}
29513403
3404// This prototype is deprecated.
2952static inline __ATTRS_o_ai int3405static inline __ATTRS_o_ai int
2953vec_all_le(vector unsigned char __a, vector bool char __b) {3406vec_all_le(vector unsigned char __a, vector bool char __b) {
2954 int __cc;3407 int __cc;
...@@ -2956,6 +3409,7 @@ vec_all_le(vector unsigned char __a, vector bool char __b) {...@@ -2956,6 +3409,7 @@ vec_all_le(vector unsigned char __a, vector bool char __b) {
2956 return __cc == 3;3409 return __cc == 3;
2957}3410}
29583411
3412// This prototype is deprecated.
2959static inline __ATTRS_o_ai int3413static inline __ATTRS_o_ai int
2960vec_all_le(vector bool char __a, vector unsigned char __b) {3414vec_all_le(vector bool char __a, vector unsigned char __b) {
2961 int __cc;3415 int __cc;
...@@ -2963,6 +3417,7 @@ vec_all_le(vector bool char __a, vector unsigned char __b) {...@@ -2963,6 +3417,7 @@ vec_all_le(vector bool char __a, vector unsigned char __b) {
2963 return __cc == 3;3417 return __cc == 3;
2964}3418}
29653419
3420// This prototype is deprecated.
2966static inline __ATTRS_o_ai int3421static inline __ATTRS_o_ai int
2967vec_all_le(vector bool char __a, vector bool char __b) {3422vec_all_le(vector bool char __a, vector bool char __b) {
2968 int __cc;3423 int __cc;
...@@ -2978,6 +3433,7 @@ vec_all_le(vector signed short __a, vector signed short __b) {...@@ -2978,6 +3433,7 @@ vec_all_le(vector signed short __a, vector signed short __b) {
2978 return __cc == 3;3433 return __cc == 3;
2979}3434}
29803435
3436// This prototype is deprecated.
2981static inline __ATTRS_o_ai int3437static inline __ATTRS_o_ai int
2982vec_all_le(vector signed short __a, vector bool short __b) {3438vec_all_le(vector signed short __a, vector bool short __b) {
2983 int __cc;3439 int __cc;
...@@ -2985,6 +3441,7 @@ vec_all_le(vector signed short __a, vector bool short __b) {...@@ -2985,6 +3441,7 @@ vec_all_le(vector signed short __a, vector bool short __b) {
2985 return __cc == 3;3441 return __cc == 3;
2986}3442}
29873443
3444// This prototype is deprecated.
2988static inline __ATTRS_o_ai int3445static inline __ATTRS_o_ai int
2989vec_all_le(vector bool short __a, vector signed short __b) {3446vec_all_le(vector bool short __a, vector signed short __b) {
2990 int __cc;3447 int __cc;
...@@ -2999,6 +3456,7 @@ vec_all_le(vector unsigned short __a, vector unsigned short __b) {...@@ -2999,6 +3456,7 @@ vec_all_le(vector unsigned short __a, vector unsigned short __b) {
2999 return __cc == 3;3456 return __cc == 3;
3000}3457}
30013458
3459// This prototype is deprecated.
3002static inline __ATTRS_o_ai int3460static inline __ATTRS_o_ai int
3003vec_all_le(vector unsigned short __a, vector bool short __b) {3461vec_all_le(vector unsigned short __a, vector bool short __b) {
3004 int __cc;3462 int __cc;
...@@ -3006,6 +3464,7 @@ vec_all_le(vector unsigned short __a, vector bool short __b) {...@@ -3006,6 +3464,7 @@ vec_all_le(vector unsigned short __a, vector bool short __b) {
3006 return __cc == 3;3464 return __cc == 3;
3007}3465}
30083466
3467// This prototype is deprecated.
3009static inline __ATTRS_o_ai int3468static inline __ATTRS_o_ai int
3010vec_all_le(vector bool short __a, vector unsigned short __b) {3469vec_all_le(vector bool short __a, vector unsigned short __b) {
3011 int __cc;3470 int __cc;
...@@ -3013,6 +3472,7 @@ vec_all_le(vector bool short __a, vector unsigned short __b) {...@@ -3013,6 +3472,7 @@ vec_all_le(vector bool short __a, vector unsigned short __b) {
3013 return __cc == 3;3472 return __cc == 3;
3014}3473}
30153474
3475// This prototype is deprecated.
3016static inline __ATTRS_o_ai int3476static inline __ATTRS_o_ai int
3017vec_all_le(vector bool short __a, vector bool short __b) {3477vec_all_le(vector bool short __a, vector bool short __b) {
3018 int __cc;3478 int __cc;
...@@ -3028,6 +3488,7 @@ vec_all_le(vector signed int __a, vector signed int __b) {...@@ -3028,6 +3488,7 @@ vec_all_le(vector signed int __a, vector signed int __b) {
3028 return __cc == 3;3488 return __cc == 3;
3029}3489}
30303490
3491// This prototype is deprecated.
3031static inline __ATTRS_o_ai int3492static inline __ATTRS_o_ai int
3032vec_all_le(vector signed int __a, vector bool int __b) {3493vec_all_le(vector signed int __a, vector bool int __b) {
3033 int __cc;3494 int __cc;
...@@ -3035,6 +3496,7 @@ vec_all_le(vector signed int __a, vector bool int __b) {...@@ -3035,6 +3496,7 @@ vec_all_le(vector signed int __a, vector bool int __b) {
3035 return __cc == 3;3496 return __cc == 3;
3036}3497}
30373498
3499// This prototype is deprecated.
3038static inline __ATTRS_o_ai int3500static inline __ATTRS_o_ai int
3039vec_all_le(vector bool int __a, vector signed int __b) {3501vec_all_le(vector bool int __a, vector signed int __b) {
3040 int __cc;3502 int __cc;
...@@ -3049,6 +3511,7 @@ vec_all_le(vector unsigned int __a, vector unsigned int __b) {...@@ -3049,6 +3511,7 @@ vec_all_le(vector unsigned int __a, vector unsigned int __b) {
3049 return __cc == 3;3511 return __cc == 3;
3050}3512}
30513513
3514// This prototype is deprecated.
3052static inline __ATTRS_o_ai int3515static inline __ATTRS_o_ai int
3053vec_all_le(vector unsigned int __a, vector bool int __b) {3516vec_all_le(vector unsigned int __a, vector bool int __b) {
3054 int __cc;3517 int __cc;
...@@ -3056,6 +3519,7 @@ vec_all_le(vector unsigned int __a, vector bool int __b) {...@@ -3056,6 +3519,7 @@ vec_all_le(vector unsigned int __a, vector bool int __b) {
3056 return __cc == 3;3519 return __cc == 3;
3057}3520}
30583521
3522// This prototype is deprecated.
3059static inline __ATTRS_o_ai int3523static inline __ATTRS_o_ai int
3060vec_all_le(vector bool int __a, vector unsigned int __b) {3524vec_all_le(vector bool int __a, vector unsigned int __b) {
3061 int __cc;3525 int __cc;
...@@ -3063,6 +3527,7 @@ vec_all_le(vector bool int __a, vector unsigned int __b) {...@@ -3063,6 +3527,7 @@ vec_all_le(vector bool int __a, vector unsigned int __b) {
3063 return __cc == 3;3527 return __cc == 3;
3064}3528}
30653529
3530// This prototype is deprecated.
3066static inline __ATTRS_o_ai int3531static inline __ATTRS_o_ai int
3067vec_all_le(vector bool int __a, vector bool int __b) {3532vec_all_le(vector bool int __a, vector bool int __b) {
3068 int __cc;3533 int __cc;
...@@ -3078,6 +3543,7 @@ vec_all_le(vector signed long long __a, vector signed long long __b) {...@@ -3078,6 +3543,7 @@ vec_all_le(vector signed long long __a, vector signed long long __b) {
3078 return __cc == 3;3543 return __cc == 3;
3079}3544}
30803545
3546// This prototype is deprecated.
3081static inline __ATTRS_o_ai int3547static inline __ATTRS_o_ai int
3082vec_all_le(vector signed long long __a, vector bool long long __b) {3548vec_all_le(vector signed long long __a, vector bool long long __b) {
3083 int __cc;3549 int __cc;
...@@ -3085,6 +3551,7 @@ vec_all_le(vector signed long long __a, vector bool long long __b) {...@@ -3085,6 +3551,7 @@ vec_all_le(vector signed long long __a, vector bool long long __b) {
3085 return __cc == 3;3551 return __cc == 3;
3086}3552}
30873553
3554// This prototype is deprecated.
3088static inline __ATTRS_o_ai int3555static inline __ATTRS_o_ai int
3089vec_all_le(vector bool long long __a, vector signed long long __b) {3556vec_all_le(vector bool long long __a, vector signed long long __b) {
3090 int __cc;3557 int __cc;
...@@ -3099,6 +3566,7 @@ vec_all_le(vector unsigned long long __a, vector unsigned long long __b) {...@@ -3099,6 +3566,7 @@ vec_all_le(vector unsigned long long __a, vector unsigned long long __b) {
3099 return __cc == 3;3566 return __cc == 3;
3100}3567}
31013568
3569// This prototype is deprecated.
3102static inline __ATTRS_o_ai int3570static inline __ATTRS_o_ai int
3103vec_all_le(vector unsigned long long __a, vector bool long long __b) {3571vec_all_le(vector unsigned long long __a, vector bool long long __b) {
3104 int __cc;3572 int __cc;
...@@ -3106,6 +3574,7 @@ vec_all_le(vector unsigned long long __a, vector bool long long __b) {...@@ -3106,6 +3574,7 @@ vec_all_le(vector unsigned long long __a, vector bool long long __b) {
3106 return __cc == 3;3574 return __cc == 3;
3107}3575}
31083576
3577// This prototype is deprecated.
3109static inline __ATTRS_o_ai int3578static inline __ATTRS_o_ai int
3110vec_all_le(vector bool long long __a, vector unsigned long long __b) {3579vec_all_le(vector bool long long __a, vector unsigned long long __b) {
3111 int __cc;3580 int __cc;
...@@ -3113,6 +3582,7 @@ vec_all_le(vector bool long long __a, vector unsigned long long __b) {...@@ -3113,6 +3582,7 @@ vec_all_le(vector bool long long __a, vector unsigned long long __b) {
3113 return __cc == 3;3582 return __cc == 3;
3114}3583}
31153584
3585// This prototype is deprecated.
3116static inline __ATTRS_o_ai int3586static inline __ATTRS_o_ai int
3117vec_all_le(vector bool long long __a, vector bool long long __b) {3587vec_all_le(vector bool long long __a, vector bool long long __b) {
3118 int __cc;3588 int __cc;
...@@ -3121,6 +3591,15 @@ vec_all_le(vector bool long long __a, vector bool long long __b) {...@@ -3121,6 +3591,15 @@ vec_all_le(vector bool long long __a, vector bool long long __b) {
3121 return __cc == 3;3591 return __cc == 3;
3122}3592}
31233593
3594#if __ARCH__ >= 12
3595static inline __ATTRS_o_ai int
3596vec_all_le(vector float __a, vector float __b) {
3597 int __cc;
3598 __builtin_s390_vfchesbs(__b, __a, &__cc);
3599 return __cc == 0;
3600}
3601#endif
3602
3124static inline __ATTRS_o_ai int3603static inline __ATTRS_o_ai int
3125vec_all_le(vector double __a, vector double __b) {3604vec_all_le(vector double __a, vector double __b) {
3126 int __cc;3605 int __cc;
...@@ -3137,6 +3616,7 @@ vec_all_lt(vector signed char __a, vector signed char __b) {...@@ -3137,6 +3616,7 @@ vec_all_lt(vector signed char __a, vector signed char __b) {
3137 return __cc == 0;3616 return __cc == 0;
3138}3617}
31393618
3619// This prototype is deprecated.
3140static inline __ATTRS_o_ai int3620static inline __ATTRS_o_ai int
3141vec_all_lt(vector signed char __a, vector bool char __b) {3621vec_all_lt(vector signed char __a, vector bool char __b) {
3142 int __cc;3622 int __cc;
...@@ -3144,6 +3624,7 @@ vec_all_lt(vector signed char __a, vector bool char __b) {...@@ -3144,6 +3624,7 @@ vec_all_lt(vector signed char __a, vector bool char __b) {
3144 return __cc == 0;3624 return __cc == 0;
3145}3625}
31463626
3627// This prototype is deprecated.
3147static inline __ATTRS_o_ai int3628static inline __ATTRS_o_ai int
3148vec_all_lt(vector bool char __a, vector signed char __b) {3629vec_all_lt(vector bool char __a, vector signed char __b) {
3149 int __cc;3630 int __cc;
...@@ -3158,6 +3639,7 @@ vec_all_lt(vector unsigned char __a, vector unsigned char __b) {...@@ -3158,6 +3639,7 @@ vec_all_lt(vector unsigned char __a, vector unsigned char __b) {
3158 return __cc == 0;3639 return __cc == 0;
3159}3640}
31603641
3642// This prototype is deprecated.
3161static inline __ATTRS_o_ai int3643static inline __ATTRS_o_ai int
3162vec_all_lt(vector unsigned char __a, vector bool char __b) {3644vec_all_lt(vector unsigned char __a, vector bool char __b) {
3163 int __cc;3645 int __cc;
...@@ -3165,6 +3647,7 @@ vec_all_lt(vector unsigned char __a, vector bool char __b) {...@@ -3165,6 +3647,7 @@ vec_all_lt(vector unsigned char __a, vector bool char __b) {
3165 return __cc == 0;3647 return __cc == 0;
3166}3648}
31673649
3650// This prototype is deprecated.
3168static inline __ATTRS_o_ai int3651static inline __ATTRS_o_ai int
3169vec_all_lt(vector bool char __a, vector unsigned char __b) {3652vec_all_lt(vector bool char __a, vector unsigned char __b) {
3170 int __cc;3653 int __cc;
...@@ -3172,6 +3655,7 @@ vec_all_lt(vector bool char __a, vector unsigned char __b) {...@@ -3172,6 +3655,7 @@ vec_all_lt(vector bool char __a, vector unsigned char __b) {
3172 return __cc == 0;3655 return __cc == 0;
3173}3656}
31743657
3658// This prototype is deprecated.
3175static inline __ATTRS_o_ai int3659static inline __ATTRS_o_ai int
3176vec_all_lt(vector bool char __a, vector bool char __b) {3660vec_all_lt(vector bool char __a, vector bool char __b) {
3177 int __cc;3661 int __cc;
...@@ -3187,6 +3671,7 @@ vec_all_lt(vector signed short __a, vector signed short __b) {...@@ -3187,6 +3671,7 @@ vec_all_lt(vector signed short __a, vector signed short __b) {
3187 return __cc == 0;3671 return __cc == 0;
3188}3672}
31893673
3674// This prototype is deprecated.
3190static inline __ATTRS_o_ai int3675static inline __ATTRS_o_ai int
3191vec_all_lt(vector signed short __a, vector bool short __b) {3676vec_all_lt(vector signed short __a, vector bool short __b) {
3192 int __cc;3677 int __cc;
...@@ -3194,6 +3679,7 @@ vec_all_lt(vector signed short __a, vector bool short __b) {...@@ -3194,6 +3679,7 @@ vec_all_lt(vector signed short __a, vector bool short __b) {
3194 return __cc == 0;3679 return __cc == 0;
3195}3680}
31963681
3682// This prototype is deprecated.
3197static inline __ATTRS_o_ai int3683static inline __ATTRS_o_ai int
3198vec_all_lt(vector bool short __a, vector signed short __b) {3684vec_all_lt(vector bool short __a, vector signed short __b) {
3199 int __cc;3685 int __cc;
...@@ -3208,6 +3694,7 @@ vec_all_lt(vector unsigned short __a, vector unsigned short __b) {...@@ -3208,6 +3694,7 @@ vec_all_lt(vector unsigned short __a, vector unsigned short __b) {
3208 return __cc == 0;3694 return __cc == 0;
3209}3695}
32103696
3697// This prototype is deprecated.
3211static inline __ATTRS_o_ai int3698static inline __ATTRS_o_ai int
3212vec_all_lt(vector unsigned short __a, vector bool short __b) {3699vec_all_lt(vector unsigned short __a, vector bool short __b) {
3213 int __cc;3700 int __cc;
...@@ -3215,6 +3702,7 @@ vec_all_lt(vector unsigned short __a, vector bool short __b) {...@@ -3215,6 +3702,7 @@ vec_all_lt(vector unsigned short __a, vector bool short __b) {
3215 return __cc == 0;3702 return __cc == 0;
3216}3703}
32173704
3705// This prototype is deprecated.
3218static inline __ATTRS_o_ai int3706static inline __ATTRS_o_ai int
3219vec_all_lt(vector bool short __a, vector unsigned short __b) {3707vec_all_lt(vector bool short __a, vector unsigned short __b) {
3220 int __cc;3708 int __cc;
...@@ -3222,6 +3710,7 @@ vec_all_lt(vector bool short __a, vector unsigned short __b) {...@@ -3222,6 +3710,7 @@ vec_all_lt(vector bool short __a, vector unsigned short __b) {
3222 return __cc == 0;3710 return __cc == 0;
3223}3711}
32243712
3713// This prototype is deprecated.
3225static inline __ATTRS_o_ai int3714static inline __ATTRS_o_ai int
3226vec_all_lt(vector bool short __a, vector bool short __b) {3715vec_all_lt(vector bool short __a, vector bool short __b) {
3227 int __cc;3716 int __cc;
...@@ -3237,6 +3726,7 @@ vec_all_lt(vector signed int __a, vector signed int __b) {...@@ -3237,6 +3726,7 @@ vec_all_lt(vector signed int __a, vector signed int __b) {
3237 return __cc == 0;3726 return __cc == 0;
3238}3727}
32393728
3729// This prototype is deprecated.
3240static inline __ATTRS_o_ai int3730static inline __ATTRS_o_ai int
3241vec_all_lt(vector signed int __a, vector bool int __b) {3731vec_all_lt(vector signed int __a, vector bool int __b) {
3242 int __cc;3732 int __cc;
...@@ -3244,6 +3734,7 @@ vec_all_lt(vector signed int __a, vector bool int __b) {...@@ -3244,6 +3734,7 @@ vec_all_lt(vector signed int __a, vector bool int __b) {
3244 return __cc == 0;3734 return __cc == 0;
3245}3735}
32463736
3737// This prototype is deprecated.
3247static inline __ATTRS_o_ai int3738static inline __ATTRS_o_ai int
3248vec_all_lt(vector bool int __a, vector signed int __b) {3739vec_all_lt(vector bool int __a, vector signed int __b) {
3249 int __cc;3740 int __cc;
...@@ -3258,6 +3749,7 @@ vec_all_lt(vector unsigned int __a, vector unsigned int __b) {...@@ -3258,6 +3749,7 @@ vec_all_lt(vector unsigned int __a, vector unsigned int __b) {
3258 return __cc == 0;3749 return __cc == 0;
3259}3750}
32603751
3752// This prototype is deprecated.
3261static inline __ATTRS_o_ai int3753static inline __ATTRS_o_ai int
3262vec_all_lt(vector unsigned int __a, vector bool int __b) {3754vec_all_lt(vector unsigned int __a, vector bool int __b) {
3263 int __cc;3755 int __cc;
...@@ -3265,6 +3757,7 @@ vec_all_lt(vector unsigned int __a, vector bool int __b) {...@@ -3265,6 +3757,7 @@ vec_all_lt(vector unsigned int __a, vector bool int __b) {
3265 return __cc == 0;3757 return __cc == 0;
3266}3758}
32673759
3760// This prototype is deprecated.
3268static inline __ATTRS_o_ai int3761static inline __ATTRS_o_ai int
3269vec_all_lt(vector bool int __a, vector unsigned int __b) {3762vec_all_lt(vector bool int __a, vector unsigned int __b) {
3270 int __cc;3763 int __cc;
...@@ -3272,6 +3765,7 @@ vec_all_lt(vector bool int __a, vector unsigned int __b) {...@@ -3272,6 +3765,7 @@ vec_all_lt(vector bool int __a, vector unsigned int __b) {
3272 return __cc == 0;3765 return __cc == 0;
3273}3766}
32743767
3768// This prototype is deprecated.
3275static inline __ATTRS_o_ai int3769static inline __ATTRS_o_ai int
3276vec_all_lt(vector bool int __a, vector bool int __b) {3770vec_all_lt(vector bool int __a, vector bool int __b) {
3277 int __cc;3771 int __cc;
...@@ -3287,6 +3781,7 @@ vec_all_lt(vector signed long long __a, vector signed long long __b) {...@@ -3287,6 +3781,7 @@ vec_all_lt(vector signed long long __a, vector signed long long __b) {
3287 return __cc == 0;3781 return __cc == 0;
3288}3782}
32893783
3784// This prototype is deprecated.
3290static inline __ATTRS_o_ai int3785static inline __ATTRS_o_ai int
3291vec_all_lt(vector signed long long __a, vector bool long long __b) {3786vec_all_lt(vector signed long long __a, vector bool long long __b) {
3292 int __cc;3787 int __cc;
...@@ -3294,6 +3789,7 @@ vec_all_lt(vector signed long long __a, vector bool long long __b) {...@@ -3294,6 +3789,7 @@ vec_all_lt(vector signed long long __a, vector bool long long __b) {
3294 return __cc == 0;3789 return __cc == 0;
3295}3790}
32963791
3792// This prototype is deprecated.
3297static inline __ATTRS_o_ai int3793static inline __ATTRS_o_ai int
3298vec_all_lt(vector bool long long __a, vector signed long long __b) {3794vec_all_lt(vector bool long long __a, vector signed long long __b) {
3299 int __cc;3795 int __cc;
...@@ -3308,6 +3804,7 @@ vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -3308,6 +3804,7 @@ vec_all_lt(vector unsigned long long __a, vector unsigned long long __b) {
3308 return __cc == 0;3804 return __cc == 0;
3309}3805}
33103806
3807// This prototype is deprecated.
3311static inline __ATTRS_o_ai int3808static inline __ATTRS_o_ai int
3312vec_all_lt(vector unsigned long long __a, vector bool long long __b) {3809vec_all_lt(vector unsigned long long __a, vector bool long long __b) {
3313 int __cc;3810 int __cc;
...@@ -3315,6 +3812,7 @@ vec_all_lt(vector unsigned long long __a, vector bool long long __b) {...@@ -3315,6 +3812,7 @@ vec_all_lt(vector unsigned long long __a, vector bool long long __b) {
3315 return __cc == 0;3812 return __cc == 0;
3316}3813}
33173814
3815// This prototype is deprecated.
3318static inline __ATTRS_o_ai int3816static inline __ATTRS_o_ai int
3319vec_all_lt(vector bool long long __a, vector unsigned long long __b) {3817vec_all_lt(vector bool long long __a, vector unsigned long long __b) {
3320 int __cc;3818 int __cc;
...@@ -3322,6 +3820,7 @@ vec_all_lt(vector bool long long __a, vector unsigned long long __b) {...@@ -3322,6 +3820,7 @@ vec_all_lt(vector bool long long __a, vector unsigned long long __b) {
3322 return __cc == 0;3820 return __cc == 0;
3323}3821}
33243822
3823// This prototype is deprecated.
3325static inline __ATTRS_o_ai int3824static inline __ATTRS_o_ai int
3326vec_all_lt(vector bool long long __a, vector bool long long __b) {3825vec_all_lt(vector bool long long __a, vector bool long long __b) {
3327 int __cc;3826 int __cc;
...@@ -3330,6 +3829,15 @@ vec_all_lt(vector bool long long __a, vector bool long long __b) {...@@ -3330,6 +3829,15 @@ vec_all_lt(vector bool long long __a, vector bool long long __b) {
3330 return __cc == 0;3829 return __cc == 0;
3331}3830}
33323831
3832#if __ARCH__ >= 12
3833static inline __ATTRS_o_ai int
3834vec_all_lt(vector float __a, vector float __b) {
3835 int __cc;
3836 __builtin_s390_vfchsbs(__b, __a, &__cc);
3837 return __cc == 0;
3838}
3839#endif
3840
3333static inline __ATTRS_o_ai int3841static inline __ATTRS_o_ai int
3334vec_all_lt(vector double __a, vector double __b) {3842vec_all_lt(vector double __a, vector double __b) {
3335 int __cc;3843 int __cc;
...@@ -3339,7 +3847,16 @@ vec_all_lt(vector double __a, vector double __b) {...@@ -3339,7 +3847,16 @@ vec_all_lt(vector double __a, vector double __b) {
33393847
3340/*-- vec_all_nge ------------------------------------------------------------*/3848/*-- vec_all_nge ------------------------------------------------------------*/
33413849
3342static inline __ATTRS_ai int3850#if __ARCH__ >= 12
3851static inline __ATTRS_o_ai int
3852vec_all_nge(vector float __a, vector float __b) {
3853 int __cc;
3854 __builtin_s390_vfchesbs(__a, __b, &__cc);
3855 return __cc == 3;
3856}
3857#endif
3858
3859static inline __ATTRS_o_ai int
3343vec_all_nge(vector double __a, vector double __b) {3860vec_all_nge(vector double __a, vector double __b) {
3344 int __cc;3861 int __cc;
3345 __builtin_s390_vfchedbs(__a, __b, &__cc);3862 __builtin_s390_vfchedbs(__a, __b, &__cc);
...@@ -3348,7 +3865,16 @@ vec_all_nge(vector double __a, vector double __b) {...@@ -3348,7 +3865,16 @@ vec_all_nge(vector double __a, vector double __b) {
33483865
3349/*-- vec_all_ngt ------------------------------------------------------------*/3866/*-- vec_all_ngt ------------------------------------------------------------*/
33503867
3351static inline __ATTRS_ai int3868#if __ARCH__ >= 12
3869static inline __ATTRS_o_ai int
3870vec_all_ngt(vector float __a, vector float __b) {
3871 int __cc;
3872 __builtin_s390_vfchsbs(__a, __b, &__cc);
3873 return __cc == 3;
3874}
3875#endif
3876
3877static inline __ATTRS_o_ai int
3352vec_all_ngt(vector double __a, vector double __b) {3878vec_all_ngt(vector double __a, vector double __b) {
3353 int __cc;3879 int __cc;
3354 __builtin_s390_vfchdbs(__a, __b, &__cc);3880 __builtin_s390_vfchdbs(__a, __b, &__cc);
...@@ -3357,7 +3883,16 @@ vec_all_ngt(vector double __a, vector double __b) {...@@ -3357,7 +3883,16 @@ vec_all_ngt(vector double __a, vector double __b) {
33573883
3358/*-- vec_all_nle ------------------------------------------------------------*/3884/*-- vec_all_nle ------------------------------------------------------------*/
33593885
3360static inline __ATTRS_ai int3886#if __ARCH__ >= 12
3887static inline __ATTRS_o_ai int
3888vec_all_nle(vector float __a, vector float __b) {
3889 int __cc;
3890 __builtin_s390_vfchesbs(__b, __a, &__cc);
3891 return __cc == 3;
3892}
3893#endif
3894
3895static inline __ATTRS_o_ai int
3361vec_all_nle(vector double __a, vector double __b) {3896vec_all_nle(vector double __a, vector double __b) {
3362 int __cc;3897 int __cc;
3363 __builtin_s390_vfchedbs(__b, __a, &__cc);3898 __builtin_s390_vfchedbs(__b, __a, &__cc);
...@@ -3366,7 +3901,16 @@ vec_all_nle(vector double __a, vector double __b) {...@@ -3366,7 +3901,16 @@ vec_all_nle(vector double __a, vector double __b) {
33663901
3367/*-- vec_all_nlt ------------------------------------------------------------*/3902/*-- vec_all_nlt ------------------------------------------------------------*/
33683903
3369static inline __ATTRS_ai int3904#if __ARCH__ >= 12
3905static inline __ATTRS_o_ai int
3906vec_all_nlt(vector float __a, vector float __b) {
3907 int __cc;
3908 __builtin_s390_vfchsbs(__b, __a, &__cc);
3909 return __cc == 3;
3910}
3911#endif
3912
3913static inline __ATTRS_o_ai int
3370vec_all_nlt(vector double __a, vector double __b) {3914vec_all_nlt(vector double __a, vector double __b) {
3371 int __cc;3915 int __cc;
3372 __builtin_s390_vfchdbs(__b, __a, &__cc);3916 __builtin_s390_vfchdbs(__b, __a, &__cc);
...@@ -3375,7 +3919,16 @@ vec_all_nlt(vector double __a, vector double __b) {...@@ -3375,7 +3919,16 @@ vec_all_nlt(vector double __a, vector double __b) {
33753919
3376/*-- vec_all_nan ------------------------------------------------------------*/3920/*-- vec_all_nan ------------------------------------------------------------*/
33773921
3378static inline __ATTRS_ai int3922#if __ARCH__ >= 12
3923static inline __ATTRS_o_ai int
3924vec_all_nan(vector float __a) {
3925 int __cc;
3926 __builtin_s390_vftcisb(__a, 15, &__cc);
3927 return __cc == 0;
3928}
3929#endif
3930
3931static inline __ATTRS_o_ai int
3379vec_all_nan(vector double __a) {3932vec_all_nan(vector double __a) {
3380 int __cc;3933 int __cc;
3381 __builtin_s390_vftcidb(__a, 15, &__cc);3934 __builtin_s390_vftcidb(__a, 15, &__cc);
...@@ -3384,7 +3937,16 @@ vec_all_nan(vector double __a) {...@@ -3384,7 +3937,16 @@ vec_all_nan(vector double __a) {
33843937
3385/*-- vec_all_numeric --------------------------------------------------------*/3938/*-- vec_all_numeric --------------------------------------------------------*/
33863939
3387static inline __ATTRS_ai int3940#if __ARCH__ >= 12
3941static inline __ATTRS_o_ai int
3942vec_all_numeric(vector float __a) {
3943 int __cc;
3944 __builtin_s390_vftcisb(__a, 15, &__cc);
3945 return __cc == 3;
3946}
3947#endif
3948
3949static inline __ATTRS_o_ai int
3388vec_all_numeric(vector double __a) {3950vec_all_numeric(vector double __a) {
3389 int __cc;3951 int __cc;
3390 __builtin_s390_vftcidb(__a, 15, &__cc);3952 __builtin_s390_vftcidb(__a, 15, &__cc);
...@@ -3400,6 +3962,7 @@ vec_any_eq(vector signed char __a, vector signed char __b) {...@@ -3400,6 +3962,7 @@ vec_any_eq(vector signed char __a, vector signed char __b) {
3400 return __cc <= 1;3962 return __cc <= 1;
3401}3963}
34023964
3965// This prototype is deprecated.
3403static inline __ATTRS_o_ai int3966static inline __ATTRS_o_ai int
3404vec_any_eq(vector signed char __a, vector bool char __b) {3967vec_any_eq(vector signed char __a, vector bool char __b) {
3405 int __cc;3968 int __cc;
...@@ -3407,6 +3970,7 @@ vec_any_eq(vector signed char __a, vector bool char __b) {...@@ -3407,6 +3970,7 @@ vec_any_eq(vector signed char __a, vector bool char __b) {
3407 return __cc <= 1;3970 return __cc <= 1;
3408}3971}
34093972
3973// This prototype is deprecated.
3410static inline __ATTRS_o_ai int3974static inline __ATTRS_o_ai int
3411vec_any_eq(vector bool char __a, vector signed char __b) {3975vec_any_eq(vector bool char __a, vector signed char __b) {
3412 int __cc;3976 int __cc;
...@@ -3422,6 +3986,7 @@ vec_any_eq(vector unsigned char __a, vector unsigned char __b) {...@@ -3422,6 +3986,7 @@ vec_any_eq(vector unsigned char __a, vector unsigned char __b) {
3422 return __cc <= 1;3986 return __cc <= 1;
3423}3987}
34243988
3989// This prototype is deprecated.
3425static inline __ATTRS_o_ai int3990static inline __ATTRS_o_ai int
3426vec_any_eq(vector unsigned char __a, vector bool char __b) {3991vec_any_eq(vector unsigned char __a, vector bool char __b) {
3427 int __cc;3992 int __cc;
...@@ -3430,6 +3995,7 @@ vec_any_eq(vector unsigned char __a, vector bool char __b) {...@@ -3430,6 +3995,7 @@ vec_any_eq(vector unsigned char __a, vector bool char __b) {
3430 return __cc <= 1;3995 return __cc <= 1;
3431}3996}
34323997
3998// This prototype is deprecated.
3433static inline __ATTRS_o_ai int3999static inline __ATTRS_o_ai int
3434vec_any_eq(vector bool char __a, vector unsigned char __b) {4000vec_any_eq(vector bool char __a, vector unsigned char __b) {
3435 int __cc;4001 int __cc;
...@@ -3453,6 +4019,7 @@ vec_any_eq(vector signed short __a, vector signed short __b) {...@@ -3453,6 +4019,7 @@ vec_any_eq(vector signed short __a, vector signed short __b) {
3453 return __cc <= 1;4019 return __cc <= 1;
3454}4020}
34554021
4022// This prototype is deprecated.
3456static inline __ATTRS_o_ai int4023static inline __ATTRS_o_ai int
3457vec_any_eq(vector signed short __a, vector bool short __b) {4024vec_any_eq(vector signed short __a, vector bool short __b) {
3458 int __cc;4025 int __cc;
...@@ -3460,6 +4027,7 @@ vec_any_eq(vector signed short __a, vector bool short __b) {...@@ -3460,6 +4027,7 @@ vec_any_eq(vector signed short __a, vector bool short __b) {
3460 return __cc <= 1;4027 return __cc <= 1;
3461}4028}
34624029
4030// This prototype is deprecated.
3463static inline __ATTRS_o_ai int4031static inline __ATTRS_o_ai int
3464vec_any_eq(vector bool short __a, vector signed short __b) {4032vec_any_eq(vector bool short __a, vector signed short __b) {
3465 int __cc;4033 int __cc;
...@@ -3475,6 +4043,7 @@ vec_any_eq(vector unsigned short __a, vector unsigned short __b) {...@@ -3475,6 +4043,7 @@ vec_any_eq(vector unsigned short __a, vector unsigned short __b) {
3475 return __cc <= 1;4043 return __cc <= 1;
3476}4044}
34774045
4046// This prototype is deprecated.
3478static inline __ATTRS_o_ai int4047static inline __ATTRS_o_ai int
3479vec_any_eq(vector unsigned short __a, vector bool short __b) {4048vec_any_eq(vector unsigned short __a, vector bool short __b) {
3480 int __cc;4049 int __cc;
...@@ -3483,6 +4052,7 @@ vec_any_eq(vector unsigned short __a, vector bool short __b) {...@@ -3483,6 +4052,7 @@ vec_any_eq(vector unsigned short __a, vector bool short __b) {
3483 return __cc <= 1;4052 return __cc <= 1;
3484}4053}
34854054
4055// This prototype is deprecated.
3486static inline __ATTRS_o_ai int4056static inline __ATTRS_o_ai int
3487vec_any_eq(vector bool short __a, vector unsigned short __b) {4057vec_any_eq(vector bool short __a, vector unsigned short __b) {
3488 int __cc;4058 int __cc;
...@@ -3506,6 +4076,7 @@ vec_any_eq(vector signed int __a, vector signed int __b) {...@@ -3506,6 +4076,7 @@ vec_any_eq(vector signed int __a, vector signed int __b) {
3506 return __cc <= 1;4076 return __cc <= 1;
3507}4077}
35084078
4079// This prototype is deprecated.
3509static inline __ATTRS_o_ai int4080static inline __ATTRS_o_ai int
3510vec_any_eq(vector signed int __a, vector bool int __b) {4081vec_any_eq(vector signed int __a, vector bool int __b) {
3511 int __cc;4082 int __cc;
...@@ -3513,6 +4084,7 @@ vec_any_eq(vector signed int __a, vector bool int __b) {...@@ -3513,6 +4084,7 @@ vec_any_eq(vector signed int __a, vector bool int __b) {
3513 return __cc <= 1;4084 return __cc <= 1;
3514}4085}
35154086
4087// This prototype is deprecated.
3516static inline __ATTRS_o_ai int4088static inline __ATTRS_o_ai int
3517vec_any_eq(vector bool int __a, vector signed int __b) {4089vec_any_eq(vector bool int __a, vector signed int __b) {
3518 int __cc;4090 int __cc;
...@@ -3528,6 +4100,7 @@ vec_any_eq(vector unsigned int __a, vector unsigned int __b) {...@@ -3528,6 +4100,7 @@ vec_any_eq(vector unsigned int __a, vector unsigned int __b) {
3528 return __cc <= 1;4100 return __cc <= 1;
3529}4101}
35304102
4103// This prototype is deprecated.
3531static inline __ATTRS_o_ai int4104static inline __ATTRS_o_ai int
3532vec_any_eq(vector unsigned int __a, vector bool int __b) {4105vec_any_eq(vector unsigned int __a, vector bool int __b) {
3533 int __cc;4106 int __cc;
...@@ -3536,6 +4109,7 @@ vec_any_eq(vector unsigned int __a, vector bool int __b) {...@@ -3536,6 +4109,7 @@ vec_any_eq(vector unsigned int __a, vector bool int __b) {
3536 return __cc <= 1;4109 return __cc <= 1;
3537}4110}
35384111
4112// This prototype is deprecated.
3539static inline __ATTRS_o_ai int4113static inline __ATTRS_o_ai int
3540vec_any_eq(vector bool int __a, vector unsigned int __b) {4114vec_any_eq(vector bool int __a, vector unsigned int __b) {
3541 int __cc;4115 int __cc;
...@@ -3559,6 +4133,7 @@ vec_any_eq(vector signed long long __a, vector signed long long __b) {...@@ -3559,6 +4133,7 @@ vec_any_eq(vector signed long long __a, vector signed long long __b) {
3559 return __cc <= 1;4133 return __cc <= 1;
3560}4134}
35614135
4136// This prototype is deprecated.
3562static inline __ATTRS_o_ai int4137static inline __ATTRS_o_ai int
3563vec_any_eq(vector signed long long __a, vector bool long long __b) {4138vec_any_eq(vector signed long long __a, vector bool long long __b) {
3564 int __cc;4139 int __cc;
...@@ -3566,6 +4141,7 @@ vec_any_eq(vector signed long long __a, vector bool long long __b) {...@@ -3566,6 +4141,7 @@ vec_any_eq(vector signed long long __a, vector bool long long __b) {
3566 return __cc <= 1;4141 return __cc <= 1;
3567}4142}
35684143
4144// This prototype is deprecated.
3569static inline __ATTRS_o_ai int4145static inline __ATTRS_o_ai int
3570vec_any_eq(vector bool long long __a, vector signed long long __b) {4146vec_any_eq(vector bool long long __a, vector signed long long __b) {
3571 int __cc;4147 int __cc;
...@@ -3581,6 +4157,7 @@ vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) {...@@ -3581,6 +4157,7 @@ vec_any_eq(vector unsigned long long __a, vector unsigned long long __b) {
3581 return __cc <= 1;4157 return __cc <= 1;
3582}4158}
35834159
4160// This prototype is deprecated.
3584static inline __ATTRS_o_ai int4161static inline __ATTRS_o_ai int
3585vec_any_eq(vector unsigned long long __a, vector bool long long __b) {4162vec_any_eq(vector unsigned long long __a, vector bool long long __b) {
3586 int __cc;4163 int __cc;
...@@ -3589,6 +4166,7 @@ vec_any_eq(vector unsigned long long __a, vector bool long long __b) {...@@ -3589,6 +4166,7 @@ vec_any_eq(vector unsigned long long __a, vector bool long long __b) {
3589 return __cc <= 1;4166 return __cc <= 1;
3590}4167}
35914168
4169// This prototype is deprecated.
3592static inline __ATTRS_o_ai int4170static inline __ATTRS_o_ai int
3593vec_any_eq(vector bool long long __a, vector unsigned long long __b) {4171vec_any_eq(vector bool long long __a, vector unsigned long long __b) {
3594 int __cc;4172 int __cc;
...@@ -3605,6 +4183,15 @@ vec_any_eq(vector bool long long __a, vector bool long long __b) {...@@ -3605,6 +4183,15 @@ vec_any_eq(vector bool long long __a, vector bool long long __b) {
3605 return __cc <= 1;4183 return __cc <= 1;
3606}4184}
36074185
4186#if __ARCH__ >= 12
4187static inline __ATTRS_o_ai int
4188vec_any_eq(vector float __a, vector float __b) {
4189 int __cc;
4190 __builtin_s390_vfcesbs(__a, __b, &__cc);
4191 return __cc <= 1;
4192}
4193#endif
4194
3608static inline __ATTRS_o_ai int4195static inline __ATTRS_o_ai int
3609vec_any_eq(vector double __a, vector double __b) {4196vec_any_eq(vector double __a, vector double __b) {
3610 int __cc;4197 int __cc;
...@@ -3621,6 +4208,7 @@ vec_any_ne(vector signed char __a, vector signed char __b) {...@@ -3621,6 +4208,7 @@ vec_any_ne(vector signed char __a, vector signed char __b) {
3621 return __cc != 0;4208 return __cc != 0;
3622}4209}
36234210
4211// This prototype is deprecated.
3624static inline __ATTRS_o_ai int4212static inline __ATTRS_o_ai int
3625vec_any_ne(vector signed char __a, vector bool char __b) {4213vec_any_ne(vector signed char __a, vector bool char __b) {
3626 int __cc;4214 int __cc;
...@@ -3628,6 +4216,7 @@ vec_any_ne(vector signed char __a, vector bool char __b) {...@@ -3628,6 +4216,7 @@ vec_any_ne(vector signed char __a, vector bool char __b) {
3628 return __cc != 0;4216 return __cc != 0;
3629}4217}
36304218
4219// This prototype is deprecated.
3631static inline __ATTRS_o_ai int4220static inline __ATTRS_o_ai int
3632vec_any_ne(vector bool char __a, vector signed char __b) {4221vec_any_ne(vector bool char __a, vector signed char __b) {
3633 int __cc;4222 int __cc;
...@@ -3643,6 +4232,7 @@ vec_any_ne(vector unsigned char __a, vector unsigned char __b) {...@@ -3643,6 +4232,7 @@ vec_any_ne(vector unsigned char __a, vector unsigned char __b) {
3643 return __cc != 0;4232 return __cc != 0;
3644}4233}
36454234
4235// This prototype is deprecated.
3646static inline __ATTRS_o_ai int4236static inline __ATTRS_o_ai int
3647vec_any_ne(vector unsigned char __a, vector bool char __b) {4237vec_any_ne(vector unsigned char __a, vector bool char __b) {
3648 int __cc;4238 int __cc;
...@@ -3651,6 +4241,7 @@ vec_any_ne(vector unsigned char __a, vector bool char __b) {...@@ -3651,6 +4241,7 @@ vec_any_ne(vector unsigned char __a, vector bool char __b) {
3651 return __cc != 0;4241 return __cc != 0;
3652}4242}
36534243
4244// This prototype is deprecated.
3654static inline __ATTRS_o_ai int4245static inline __ATTRS_o_ai int
3655vec_any_ne(vector bool char __a, vector unsigned char __b) {4246vec_any_ne(vector bool char __a, vector unsigned char __b) {
3656 int __cc;4247 int __cc;
...@@ -3674,6 +4265,7 @@ vec_any_ne(vector signed short __a, vector signed short __b) {...@@ -3674,6 +4265,7 @@ vec_any_ne(vector signed short __a, vector signed short __b) {
3674 return __cc != 0;4265 return __cc != 0;
3675}4266}
36764267
4268// This prototype is deprecated.
3677static inline __ATTRS_o_ai int4269static inline __ATTRS_o_ai int
3678vec_any_ne(vector signed short __a, vector bool short __b) {4270vec_any_ne(vector signed short __a, vector bool short __b) {
3679 int __cc;4271 int __cc;
...@@ -3681,6 +4273,7 @@ vec_any_ne(vector signed short __a, vector bool short __b) {...@@ -3681,6 +4273,7 @@ vec_any_ne(vector signed short __a, vector bool short __b) {
3681 return __cc != 0;4273 return __cc != 0;
3682}4274}
36834275
4276// This prototype is deprecated.
3684static inline __ATTRS_o_ai int4277static inline __ATTRS_o_ai int
3685vec_any_ne(vector bool short __a, vector signed short __b) {4278vec_any_ne(vector bool short __a, vector signed short __b) {
3686 int __cc;4279 int __cc;
...@@ -3696,6 +4289,7 @@ vec_any_ne(vector unsigned short __a, vector unsigned short __b) {...@@ -3696,6 +4289,7 @@ vec_any_ne(vector unsigned short __a, vector unsigned short __b) {
3696 return __cc != 0;4289 return __cc != 0;
3697}4290}
36984291
4292// This prototype is deprecated.
3699static inline __ATTRS_o_ai int4293static inline __ATTRS_o_ai int
3700vec_any_ne(vector unsigned short __a, vector bool short __b) {4294vec_any_ne(vector unsigned short __a, vector bool short __b) {
3701 int __cc;4295 int __cc;
...@@ -3704,6 +4298,7 @@ vec_any_ne(vector unsigned short __a, vector bool short __b) {...@@ -3704,6 +4298,7 @@ vec_any_ne(vector unsigned short __a, vector bool short __b) {
3704 return __cc != 0;4298 return __cc != 0;
3705}4299}
37064300
4301// This prototype is deprecated.
3707static inline __ATTRS_o_ai int4302static inline __ATTRS_o_ai int
3708vec_any_ne(vector bool short __a, vector unsigned short __b) {4303vec_any_ne(vector bool short __a, vector unsigned short __b) {
3709 int __cc;4304 int __cc;
...@@ -3727,6 +4322,7 @@ vec_any_ne(vector signed int __a, vector signed int __b) {...@@ -3727,6 +4322,7 @@ vec_any_ne(vector signed int __a, vector signed int __b) {
3727 return __cc != 0;4322 return __cc != 0;
3728}4323}
37294324
4325// This prototype is deprecated.
3730static inline __ATTRS_o_ai int4326static inline __ATTRS_o_ai int
3731vec_any_ne(vector signed int __a, vector bool int __b) {4327vec_any_ne(vector signed int __a, vector bool int __b) {
3732 int __cc;4328 int __cc;
...@@ -3734,6 +4330,7 @@ vec_any_ne(vector signed int __a, vector bool int __b) {...@@ -3734,6 +4330,7 @@ vec_any_ne(vector signed int __a, vector bool int __b) {
3734 return __cc != 0;4330 return __cc != 0;
3735}4331}
37364332
4333// This prototype is deprecated.
3737static inline __ATTRS_o_ai int4334static inline __ATTRS_o_ai int
3738vec_any_ne(vector bool int __a, vector signed int __b) {4335vec_any_ne(vector bool int __a, vector signed int __b) {
3739 int __cc;4336 int __cc;
...@@ -3749,6 +4346,7 @@ vec_any_ne(vector unsigned int __a, vector unsigned int __b) {...@@ -3749,6 +4346,7 @@ vec_any_ne(vector unsigned int __a, vector unsigned int __b) {
3749 return __cc != 0;4346 return __cc != 0;
3750}4347}
37514348
4349// This prototype is deprecated.
3752static inline __ATTRS_o_ai int4350static inline __ATTRS_o_ai int
3753vec_any_ne(vector unsigned int __a, vector bool int __b) {4351vec_any_ne(vector unsigned int __a, vector bool int __b) {
3754 int __cc;4352 int __cc;
...@@ -3757,6 +4355,7 @@ vec_any_ne(vector unsigned int __a, vector bool int __b) {...@@ -3757,6 +4355,7 @@ vec_any_ne(vector unsigned int __a, vector bool int __b) {
3757 return __cc != 0;4355 return __cc != 0;
3758}4356}
37594357
4358// This prototype is deprecated.
3760static inline __ATTRS_o_ai int4359static inline __ATTRS_o_ai int
3761vec_any_ne(vector bool int __a, vector unsigned int __b) {4360vec_any_ne(vector bool int __a, vector unsigned int __b) {
3762 int __cc;4361 int __cc;
...@@ -3780,6 +4379,7 @@ vec_any_ne(vector signed long long __a, vector signed long long __b) {...@@ -3780,6 +4379,7 @@ vec_any_ne(vector signed long long __a, vector signed long long __b) {
3780 return __cc != 0;4379 return __cc != 0;
3781}4380}
37824381
4382// This prototype is deprecated.
3783static inline __ATTRS_o_ai int4383static inline __ATTRS_o_ai int
3784vec_any_ne(vector signed long long __a, vector bool long long __b) {4384vec_any_ne(vector signed long long __a, vector bool long long __b) {
3785 int __cc;4385 int __cc;
...@@ -3787,6 +4387,7 @@ vec_any_ne(vector signed long long __a, vector bool long long __b) {...@@ -3787,6 +4387,7 @@ vec_any_ne(vector signed long long __a, vector bool long long __b) {
3787 return __cc != 0;4387 return __cc != 0;
3788}4388}
37894389
4390// This prototype is deprecated.
3790static inline __ATTRS_o_ai int4391static inline __ATTRS_o_ai int
3791vec_any_ne(vector bool long long __a, vector signed long long __b) {4392vec_any_ne(vector bool long long __a, vector signed long long __b) {
3792 int __cc;4393 int __cc;
...@@ -3802,6 +4403,7 @@ vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) {...@@ -3802,6 +4403,7 @@ vec_any_ne(vector unsigned long long __a, vector unsigned long long __b) {
3802 return __cc != 0;4403 return __cc != 0;
3803}4404}
38044405
4406// This prototype is deprecated.
3805static inline __ATTRS_o_ai int4407static inline __ATTRS_o_ai int
3806vec_any_ne(vector unsigned long long __a, vector bool long long __b) {4408vec_any_ne(vector unsigned long long __a, vector bool long long __b) {
3807 int __cc;4409 int __cc;
...@@ -3810,6 +4412,7 @@ vec_any_ne(vector unsigned long long __a, vector bool long long __b) {...@@ -3810,6 +4412,7 @@ vec_any_ne(vector unsigned long long __a, vector bool long long __b) {
3810 return __cc != 0;4412 return __cc != 0;
3811}4413}
38124414
4415// This prototype is deprecated.
3813static inline __ATTRS_o_ai int4416static inline __ATTRS_o_ai int
3814vec_any_ne(vector bool long long __a, vector unsigned long long __b) {4417vec_any_ne(vector bool long long __a, vector unsigned long long __b) {
3815 int __cc;4418 int __cc;
...@@ -3826,6 +4429,15 @@ vec_any_ne(vector bool long long __a, vector bool long long __b) {...@@ -3826,6 +4429,15 @@ vec_any_ne(vector bool long long __a, vector bool long long __b) {
3826 return __cc != 0;4429 return __cc != 0;
3827}4430}
38284431
4432#if __ARCH__ >= 12
4433static inline __ATTRS_o_ai int
4434vec_any_ne(vector float __a, vector float __b) {
4435 int __cc;
4436 __builtin_s390_vfcesbs(__a, __b, &__cc);
4437 return __cc != 0;
4438}
4439#endif
4440
3829static inline __ATTRS_o_ai int4441static inline __ATTRS_o_ai int
3830vec_any_ne(vector double __a, vector double __b) {4442vec_any_ne(vector double __a, vector double __b) {
3831 int __cc;4443 int __cc;
...@@ -3842,6 +4454,7 @@ vec_any_ge(vector signed char __a, vector signed char __b) {...@@ -3842,6 +4454,7 @@ vec_any_ge(vector signed char __a, vector signed char __b) {
3842 return __cc != 0;4454 return __cc != 0;
3843}4455}
38444456
4457// This prototype is deprecated.
3845static inline __ATTRS_o_ai int4458static inline __ATTRS_o_ai int
3846vec_any_ge(vector signed char __a, vector bool char __b) {4459vec_any_ge(vector signed char __a, vector bool char __b) {
3847 int __cc;4460 int __cc;
...@@ -3849,6 +4462,7 @@ vec_any_ge(vector signed char __a, vector bool char __b) {...@@ -3849,6 +4462,7 @@ vec_any_ge(vector signed char __a, vector bool char __b) {
3849 return __cc != 0;4462 return __cc != 0;
3850}4463}
38514464
4465// This prototype is deprecated.
3852static inline __ATTRS_o_ai int4466static inline __ATTRS_o_ai int
3853vec_any_ge(vector bool char __a, vector signed char __b) {4467vec_any_ge(vector bool char __a, vector signed char __b) {
3854 int __cc;4468 int __cc;
...@@ -3863,6 +4477,7 @@ vec_any_ge(vector unsigned char __a, vector unsigned char __b) {...@@ -3863,6 +4477,7 @@ vec_any_ge(vector unsigned char __a, vector unsigned char __b) {
3863 return __cc != 0;4477 return __cc != 0;
3864}4478}
38654479
4480// This prototype is deprecated.
3866static inline __ATTRS_o_ai int4481static inline __ATTRS_o_ai int
3867vec_any_ge(vector unsigned char __a, vector bool char __b) {4482vec_any_ge(vector unsigned char __a, vector bool char __b) {
3868 int __cc;4483 int __cc;
...@@ -3870,6 +4485,7 @@ vec_any_ge(vector unsigned char __a, vector bool char __b) {...@@ -3870,6 +4485,7 @@ vec_any_ge(vector unsigned char __a, vector bool char __b) {
3870 return __cc != 0;4485 return __cc != 0;
3871}4486}
38724487
4488// This prototype is deprecated.
3873static inline __ATTRS_o_ai int4489static inline __ATTRS_o_ai int
3874vec_any_ge(vector bool char __a, vector unsigned char __b) {4490vec_any_ge(vector bool char __a, vector unsigned char __b) {
3875 int __cc;4491 int __cc;
...@@ -3877,6 +4493,7 @@ vec_any_ge(vector bool char __a, vector unsigned char __b) {...@@ -3877,6 +4493,7 @@ vec_any_ge(vector bool char __a, vector unsigned char __b) {
3877 return __cc != 0;4493 return __cc != 0;
3878}4494}
38794495
4496// This prototype is deprecated.
3880static inline __ATTRS_o_ai int4497static inline __ATTRS_o_ai int
3881vec_any_ge(vector bool char __a, vector bool char __b) {4498vec_any_ge(vector bool char __a, vector bool char __b) {
3882 int __cc;4499 int __cc;
...@@ -3892,6 +4509,7 @@ vec_any_ge(vector signed short __a, vector signed short __b) {...@@ -3892,6 +4509,7 @@ vec_any_ge(vector signed short __a, vector signed short __b) {
3892 return __cc != 0;4509 return __cc != 0;
3893}4510}
38944511
4512// This prototype is deprecated.
3895static inline __ATTRS_o_ai int4513static inline __ATTRS_o_ai int
3896vec_any_ge(vector signed short __a, vector bool short __b) {4514vec_any_ge(vector signed short __a, vector bool short __b) {
3897 int __cc;4515 int __cc;
...@@ -3899,6 +4517,7 @@ vec_any_ge(vector signed short __a, vector bool short __b) {...@@ -3899,6 +4517,7 @@ vec_any_ge(vector signed short __a, vector bool short __b) {
3899 return __cc != 0;4517 return __cc != 0;
3900}4518}
39014519
4520// This prototype is deprecated.
3902static inline __ATTRS_o_ai int4521static inline __ATTRS_o_ai int
3903vec_any_ge(vector bool short __a, vector signed short __b) {4522vec_any_ge(vector bool short __a, vector signed short __b) {
3904 int __cc;4523 int __cc;
...@@ -3913,6 +4532,7 @@ vec_any_ge(vector unsigned short __a, vector unsigned short __b) {...@@ -3913,6 +4532,7 @@ vec_any_ge(vector unsigned short __a, vector unsigned short __b) {
3913 return __cc != 0;4532 return __cc != 0;
3914}4533}
39154534
4535// This prototype is deprecated.
3916static inline __ATTRS_o_ai int4536static inline __ATTRS_o_ai int
3917vec_any_ge(vector unsigned short __a, vector bool short __b) {4537vec_any_ge(vector unsigned short __a, vector bool short __b) {
3918 int __cc;4538 int __cc;
...@@ -3920,6 +4540,7 @@ vec_any_ge(vector unsigned short __a, vector bool short __b) {...@@ -3920,6 +4540,7 @@ vec_any_ge(vector unsigned short __a, vector bool short __b) {
3920 return __cc != 0;4540 return __cc != 0;
3921}4541}
39224542
4543// This prototype is deprecated.
3923static inline __ATTRS_o_ai int4544static inline __ATTRS_o_ai int
3924vec_any_ge(vector bool short __a, vector unsigned short __b) {4545vec_any_ge(vector bool short __a, vector unsigned short __b) {
3925 int __cc;4546 int __cc;
...@@ -3927,6 +4548,7 @@ vec_any_ge(vector bool short __a, vector unsigned short __b) {...@@ -3927,6 +4548,7 @@ vec_any_ge(vector bool short __a, vector unsigned short __b) {
3927 return __cc != 0;4548 return __cc != 0;
3928}4549}
39294550
4551// This prototype is deprecated.
3930static inline __ATTRS_o_ai int4552static inline __ATTRS_o_ai int
3931vec_any_ge(vector bool short __a, vector bool short __b) {4553vec_any_ge(vector bool short __a, vector bool short __b) {
3932 int __cc;4554 int __cc;
...@@ -3942,6 +4564,7 @@ vec_any_ge(vector signed int __a, vector signed int __b) {...@@ -3942,6 +4564,7 @@ vec_any_ge(vector signed int __a, vector signed int __b) {
3942 return __cc != 0;4564 return __cc != 0;
3943}4565}
39444566
4567// This prototype is deprecated.
3945static inline __ATTRS_o_ai int4568static inline __ATTRS_o_ai int
3946vec_any_ge(vector signed int __a, vector bool int __b) {4569vec_any_ge(vector signed int __a, vector bool int __b) {
3947 int __cc;4570 int __cc;
...@@ -3949,6 +4572,7 @@ vec_any_ge(vector signed int __a, vector bool int __b) {...@@ -3949,6 +4572,7 @@ vec_any_ge(vector signed int __a, vector bool int __b) {
3949 return __cc != 0;4572 return __cc != 0;
3950}4573}
39514574
4575// This prototype is deprecated.
3952static inline __ATTRS_o_ai int4576static inline __ATTRS_o_ai int
3953vec_any_ge(vector bool int __a, vector signed int __b) {4577vec_any_ge(vector bool int __a, vector signed int __b) {
3954 int __cc;4578 int __cc;
...@@ -3963,6 +4587,7 @@ vec_any_ge(vector unsigned int __a, vector unsigned int __b) {...@@ -3963,6 +4587,7 @@ vec_any_ge(vector unsigned int __a, vector unsigned int __b) {
3963 return __cc != 0;4587 return __cc != 0;
3964}4588}
39654589
4590// This prototype is deprecated.
3966static inline __ATTRS_o_ai int4591static inline __ATTRS_o_ai int
3967vec_any_ge(vector unsigned int __a, vector bool int __b) {4592vec_any_ge(vector unsigned int __a, vector bool int __b) {
3968 int __cc;4593 int __cc;
...@@ -3970,6 +4595,7 @@ vec_any_ge(vector unsigned int __a, vector bool int __b) {...@@ -3970,6 +4595,7 @@ vec_any_ge(vector unsigned int __a, vector bool int __b) {
3970 return __cc != 0;4595 return __cc != 0;
3971}4596}
39724597
4598// This prototype is deprecated.
3973static inline __ATTRS_o_ai int4599static inline __ATTRS_o_ai int
3974vec_any_ge(vector bool int __a, vector unsigned int __b) {4600vec_any_ge(vector bool int __a, vector unsigned int __b) {
3975 int __cc;4601 int __cc;
...@@ -3977,6 +4603,7 @@ vec_any_ge(vector bool int __a, vector unsigned int __b) {...@@ -3977,6 +4603,7 @@ vec_any_ge(vector bool int __a, vector unsigned int __b) {
3977 return __cc != 0;4603 return __cc != 0;
3978}4604}
39794605
4606// This prototype is deprecated.
3980static inline __ATTRS_o_ai int4607static inline __ATTRS_o_ai int
3981vec_any_ge(vector bool int __a, vector bool int __b) {4608vec_any_ge(vector bool int __a, vector bool int __b) {
3982 int __cc;4609 int __cc;
...@@ -3992,6 +4619,7 @@ vec_any_ge(vector signed long long __a, vector signed long long __b) {...@@ -3992,6 +4619,7 @@ vec_any_ge(vector signed long long __a, vector signed long long __b) {
3992 return __cc != 0;4619 return __cc != 0;
3993}4620}
39944621
4622// This prototype is deprecated.
3995static inline __ATTRS_o_ai int4623static inline __ATTRS_o_ai int
3996vec_any_ge(vector signed long long __a, vector bool long long __b) {4624vec_any_ge(vector signed long long __a, vector bool long long __b) {
3997 int __cc;4625 int __cc;
...@@ -3999,6 +4627,7 @@ vec_any_ge(vector signed long long __a, vector bool long long __b) {...@@ -3999,6 +4627,7 @@ vec_any_ge(vector signed long long __a, vector bool long long __b) {
3999 return __cc != 0;4627 return __cc != 0;
4000}4628}
40014629
4630// This prototype is deprecated.
4002static inline __ATTRS_o_ai int4631static inline __ATTRS_o_ai int
4003vec_any_ge(vector bool long long __a, vector signed long long __b) {4632vec_any_ge(vector bool long long __a, vector signed long long __b) {
4004 int __cc;4633 int __cc;
...@@ -4013,6 +4642,7 @@ vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) {...@@ -4013,6 +4642,7 @@ vec_any_ge(vector unsigned long long __a, vector unsigned long long __b) {
4013 return __cc != 0;4642 return __cc != 0;
4014}4643}
40154644
4645// This prototype is deprecated.
4016static inline __ATTRS_o_ai int4646static inline __ATTRS_o_ai int
4017vec_any_ge(vector unsigned long long __a, vector bool long long __b) {4647vec_any_ge(vector unsigned long long __a, vector bool long long __b) {
4018 int __cc;4648 int __cc;
...@@ -4020,6 +4650,7 @@ vec_any_ge(vector unsigned long long __a, vector bool long long __b) {...@@ -4020,6 +4650,7 @@ vec_any_ge(vector unsigned long long __a, vector bool long long __b) {
4020 return __cc != 0;4650 return __cc != 0;
4021}4651}
40224652
4653// This prototype is deprecated.
4023static inline __ATTRS_o_ai int4654static inline __ATTRS_o_ai int
4024vec_any_ge(vector bool long long __a, vector unsigned long long __b) {4655vec_any_ge(vector bool long long __a, vector unsigned long long __b) {
4025 int __cc;4656 int __cc;
...@@ -4027,6 +4658,7 @@ vec_any_ge(vector bool long long __a, vector unsigned long long __b) {...@@ -4027,6 +4658,7 @@ vec_any_ge(vector bool long long __a, vector unsigned long long __b) {
4027 return __cc != 0;4658 return __cc != 0;
4028}4659}
40294660
4661// This prototype is deprecated.
4030static inline __ATTRS_o_ai int4662static inline __ATTRS_o_ai int
4031vec_any_ge(vector bool long long __a, vector bool long long __b) {4663vec_any_ge(vector bool long long __a, vector bool long long __b) {
4032 int __cc;4664 int __cc;
...@@ -4035,6 +4667,15 @@ vec_any_ge(vector bool long long __a, vector bool long long __b) {...@@ -4035,6 +4667,15 @@ vec_any_ge(vector bool long long __a, vector bool long long __b) {
4035 return __cc != 0;4667 return __cc != 0;
4036}4668}
40374669
4670#if __ARCH__ >= 12
4671static inline __ATTRS_o_ai int
4672vec_any_ge(vector float __a, vector float __b) {
4673 int __cc;
4674 __builtin_s390_vfchesbs(__a, __b, &__cc);
4675 return __cc <= 1;
4676}
4677#endif
4678
4038static inline __ATTRS_o_ai int4679static inline __ATTRS_o_ai int
4039vec_any_ge(vector double __a, vector double __b) {4680vec_any_ge(vector double __a, vector double __b) {
4040 int __cc;4681 int __cc;
...@@ -4051,6 +4692,7 @@ vec_any_gt(vector signed char __a, vector signed char __b) {...@@ -4051,6 +4692,7 @@ vec_any_gt(vector signed char __a, vector signed char __b) {
4051 return __cc <= 1;4692 return __cc <= 1;
4052}4693}
40534694
4695// This prototype is deprecated.
4054static inline __ATTRS_o_ai int4696static inline __ATTRS_o_ai int
4055vec_any_gt(vector signed char __a, vector bool char __b) {4697vec_any_gt(vector signed char __a, vector bool char __b) {
4056 int __cc;4698 int __cc;
...@@ -4058,6 +4700,7 @@ vec_any_gt(vector signed char __a, vector bool char __b) {...@@ -4058,6 +4700,7 @@ vec_any_gt(vector signed char __a, vector bool char __b) {
4058 return __cc <= 1;4700 return __cc <= 1;
4059}4701}
40604702
4703// This prototype is deprecated.
4061static inline __ATTRS_o_ai int4704static inline __ATTRS_o_ai int
4062vec_any_gt(vector bool char __a, vector signed char __b) {4705vec_any_gt(vector bool char __a, vector signed char __b) {
4063 int __cc;4706 int __cc;
...@@ -4072,6 +4715,7 @@ vec_any_gt(vector unsigned char __a, vector unsigned char __b) {...@@ -4072,6 +4715,7 @@ vec_any_gt(vector unsigned char __a, vector unsigned char __b) {
4072 return __cc <= 1;4715 return __cc <= 1;
4073}4716}
40744717
4718// This prototype is deprecated.
4075static inline __ATTRS_o_ai int4719static inline __ATTRS_o_ai int
4076vec_any_gt(vector unsigned char __a, vector bool char __b) {4720vec_any_gt(vector unsigned char __a, vector bool char __b) {
4077 int __cc;4721 int __cc;
...@@ -4079,6 +4723,7 @@ vec_any_gt(vector unsigned char __a, vector bool char __b) {...@@ -4079,6 +4723,7 @@ vec_any_gt(vector unsigned char __a, vector bool char __b) {
4079 return __cc <= 1;4723 return __cc <= 1;
4080}4724}
40814725
4726// This prototype is deprecated.
4082static inline __ATTRS_o_ai int4727static inline __ATTRS_o_ai int
4083vec_any_gt(vector bool char __a, vector unsigned char __b) {4728vec_any_gt(vector bool char __a, vector unsigned char __b) {
4084 int __cc;4729 int __cc;
...@@ -4086,6 +4731,7 @@ vec_any_gt(vector bool char __a, vector unsigned char __b) {...@@ -4086,6 +4731,7 @@ vec_any_gt(vector bool char __a, vector unsigned char __b) {
4086 return __cc <= 1;4731 return __cc <= 1;
4087}4732}
40884733
4734// This prototype is deprecated.
4089static inline __ATTRS_o_ai int4735static inline __ATTRS_o_ai int
4090vec_any_gt(vector bool char __a, vector bool char __b) {4736vec_any_gt(vector bool char __a, vector bool char __b) {
4091 int __cc;4737 int __cc;
...@@ -4101,6 +4747,7 @@ vec_any_gt(vector signed short __a, vector signed short __b) {...@@ -4101,6 +4747,7 @@ vec_any_gt(vector signed short __a, vector signed short __b) {
4101 return __cc <= 1;4747 return __cc <= 1;
4102}4748}
41034749
4750// This prototype is deprecated.
4104static inline __ATTRS_o_ai int4751static inline __ATTRS_o_ai int
4105vec_any_gt(vector signed short __a, vector bool short __b) {4752vec_any_gt(vector signed short __a, vector bool short __b) {
4106 int __cc;4753 int __cc;
...@@ -4108,6 +4755,7 @@ vec_any_gt(vector signed short __a, vector bool short __b) {...@@ -4108,6 +4755,7 @@ vec_any_gt(vector signed short __a, vector bool short __b) {
4108 return __cc <= 1;4755 return __cc <= 1;
4109}4756}
41104757
4758// This prototype is deprecated.
4111static inline __ATTRS_o_ai int4759static inline __ATTRS_o_ai int
4112vec_any_gt(vector bool short __a, vector signed short __b) {4760vec_any_gt(vector bool short __a, vector signed short __b) {
4113 int __cc;4761 int __cc;
...@@ -4122,6 +4770,7 @@ vec_any_gt(vector unsigned short __a, vector unsigned short __b) {...@@ -4122,6 +4770,7 @@ vec_any_gt(vector unsigned short __a, vector unsigned short __b) {
4122 return __cc <= 1;4770 return __cc <= 1;
4123}4771}
41244772
4773// This prototype is deprecated.
4125static inline __ATTRS_o_ai int4774static inline __ATTRS_o_ai int
4126vec_any_gt(vector unsigned short __a, vector bool short __b) {4775vec_any_gt(vector unsigned short __a, vector bool short __b) {
4127 int __cc;4776 int __cc;
...@@ -4129,6 +4778,7 @@ vec_any_gt(vector unsigned short __a, vector bool short __b) {...@@ -4129,6 +4778,7 @@ vec_any_gt(vector unsigned short __a, vector bool short __b) {
4129 return __cc <= 1;4778 return __cc <= 1;
4130}4779}
41314780
4781// This prototype is deprecated.
4132static inline __ATTRS_o_ai int4782static inline __ATTRS_o_ai int
4133vec_any_gt(vector bool short __a, vector unsigned short __b) {4783vec_any_gt(vector bool short __a, vector unsigned short __b) {
4134 int __cc;4784 int __cc;
...@@ -4136,6 +4786,7 @@ vec_any_gt(vector bool short __a, vector unsigned short __b) {...@@ -4136,6 +4786,7 @@ vec_any_gt(vector bool short __a, vector unsigned short __b) {
4136 return __cc <= 1;4786 return __cc <= 1;
4137}4787}
41384788
4789// This prototype is deprecated.
4139static inline __ATTRS_o_ai int4790static inline __ATTRS_o_ai int
4140vec_any_gt(vector bool short __a, vector bool short __b) {4791vec_any_gt(vector bool short __a, vector bool short __b) {
4141 int __cc;4792 int __cc;
...@@ -4151,6 +4802,7 @@ vec_any_gt(vector signed int __a, vector signed int __b) {...@@ -4151,6 +4802,7 @@ vec_any_gt(vector signed int __a, vector signed int __b) {
4151 return __cc <= 1;4802 return __cc <= 1;
4152}4803}
41534804
4805// This prototype is deprecated.
4154static inline __ATTRS_o_ai int4806static inline __ATTRS_o_ai int
4155vec_any_gt(vector signed int __a, vector bool int __b) {4807vec_any_gt(vector signed int __a, vector bool int __b) {
4156 int __cc;4808 int __cc;
...@@ -4158,6 +4810,7 @@ vec_any_gt(vector signed int __a, vector bool int __b) {...@@ -4158,6 +4810,7 @@ vec_any_gt(vector signed int __a, vector bool int __b) {
4158 return __cc <= 1;4810 return __cc <= 1;
4159}4811}
41604812
4813// This prototype is deprecated.
4161static inline __ATTRS_o_ai int4814static inline __ATTRS_o_ai int
4162vec_any_gt(vector bool int __a, vector signed int __b) {4815vec_any_gt(vector bool int __a, vector signed int __b) {
4163 int __cc;4816 int __cc;
...@@ -4172,6 +4825,7 @@ vec_any_gt(vector unsigned int __a, vector unsigned int __b) {...@@ -4172,6 +4825,7 @@ vec_any_gt(vector unsigned int __a, vector unsigned int __b) {
4172 return __cc <= 1;4825 return __cc <= 1;
4173}4826}
41744827
4828// This prototype is deprecated.
4175static inline __ATTRS_o_ai int4829static inline __ATTRS_o_ai int
4176vec_any_gt(vector unsigned int __a, vector bool int __b) {4830vec_any_gt(vector unsigned int __a, vector bool int __b) {
4177 int __cc;4831 int __cc;
...@@ -4179,6 +4833,7 @@ vec_any_gt(vector unsigned int __a, vector bool int __b) {...@@ -4179,6 +4833,7 @@ vec_any_gt(vector unsigned int __a, vector bool int __b) {
4179 return __cc <= 1;4833 return __cc <= 1;
4180}4834}
41814835
4836// This prototype is deprecated.
4182static inline __ATTRS_o_ai int4837static inline __ATTRS_o_ai int
4183vec_any_gt(vector bool int __a, vector unsigned int __b) {4838vec_any_gt(vector bool int __a, vector unsigned int __b) {
4184 int __cc;4839 int __cc;
...@@ -4186,6 +4841,7 @@ vec_any_gt(vector bool int __a, vector unsigned int __b) {...@@ -4186,6 +4841,7 @@ vec_any_gt(vector bool int __a, vector unsigned int __b) {
4186 return __cc <= 1;4841 return __cc <= 1;
4187}4842}
41884843
4844// This prototype is deprecated.
4189static inline __ATTRS_o_ai int4845static inline __ATTRS_o_ai int
4190vec_any_gt(vector bool int __a, vector bool int __b) {4846vec_any_gt(vector bool int __a, vector bool int __b) {
4191 int __cc;4847 int __cc;
...@@ -4201,6 +4857,7 @@ vec_any_gt(vector signed long long __a, vector signed long long __b) {...@@ -4201,6 +4857,7 @@ vec_any_gt(vector signed long long __a, vector signed long long __b) {
4201 return __cc <= 1;4857 return __cc <= 1;
4202}4858}
42034859
4860// This prototype is deprecated.
4204static inline __ATTRS_o_ai int4861static inline __ATTRS_o_ai int
4205vec_any_gt(vector signed long long __a, vector bool long long __b) {4862vec_any_gt(vector signed long long __a, vector bool long long __b) {
4206 int __cc;4863 int __cc;
...@@ -4208,6 +4865,7 @@ vec_any_gt(vector signed long long __a, vector bool long long __b) {...@@ -4208,6 +4865,7 @@ vec_any_gt(vector signed long long __a, vector bool long long __b) {
4208 return __cc <= 1;4865 return __cc <= 1;
4209}4866}
42104867
4868// This prototype is deprecated.
4211static inline __ATTRS_o_ai int4869static inline __ATTRS_o_ai int
4212vec_any_gt(vector bool long long __a, vector signed long long __b) {4870vec_any_gt(vector bool long long __a, vector signed long long __b) {
4213 int __cc;4871 int __cc;
...@@ -4222,6 +4880,7 @@ vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -4222,6 +4880,7 @@ vec_any_gt(vector unsigned long long __a, vector unsigned long long __b) {
4222 return __cc <= 1;4880 return __cc <= 1;
4223}4881}
42244882
4883// This prototype is deprecated.
4225static inline __ATTRS_o_ai int4884static inline __ATTRS_o_ai int
4226vec_any_gt(vector unsigned long long __a, vector bool long long __b) {4885vec_any_gt(vector unsigned long long __a, vector bool long long __b) {
4227 int __cc;4886 int __cc;
...@@ -4229,6 +4888,7 @@ vec_any_gt(vector unsigned long long __a, vector bool long long __b) {...@@ -4229,6 +4888,7 @@ vec_any_gt(vector unsigned long long __a, vector bool long long __b) {
4229 return __cc <= 1;4888 return __cc <= 1;
4230}4889}
42314890
4891// This prototype is deprecated.
4232static inline __ATTRS_o_ai int4892static inline __ATTRS_o_ai int
4233vec_any_gt(vector bool long long __a, vector unsigned long long __b) {4893vec_any_gt(vector bool long long __a, vector unsigned long long __b) {
4234 int __cc;4894 int __cc;
...@@ -4236,6 +4896,7 @@ vec_any_gt(vector bool long long __a, vector unsigned long long __b) {...@@ -4236,6 +4896,7 @@ vec_any_gt(vector bool long long __a, vector unsigned long long __b) {
4236 return __cc <= 1;4896 return __cc <= 1;
4237}4897}
42384898
4899// This prototype is deprecated.
4239static inline __ATTRS_o_ai int4900static inline __ATTRS_o_ai int
4240vec_any_gt(vector bool long long __a, vector bool long long __b) {4901vec_any_gt(vector bool long long __a, vector bool long long __b) {
4241 int __cc;4902 int __cc;
...@@ -4244,6 +4905,15 @@ vec_any_gt(vector bool long long __a, vector bool long long __b) {...@@ -4244,6 +4905,15 @@ vec_any_gt(vector bool long long __a, vector bool long long __b) {
4244 return __cc <= 1;4905 return __cc <= 1;
4245}4906}
42464907
4908#if __ARCH__ >= 12
4909static inline __ATTRS_o_ai int
4910vec_any_gt(vector float __a, vector float __b) {
4911 int __cc;
4912 __builtin_s390_vfchsbs(__a, __b, &__cc);
4913 return __cc <= 1;
4914}
4915#endif
4916
4247static inline __ATTRS_o_ai int4917static inline __ATTRS_o_ai int
4248vec_any_gt(vector double __a, vector double __b) {4918vec_any_gt(vector double __a, vector double __b) {
4249 int __cc;4919 int __cc;
...@@ -4260,6 +4930,7 @@ vec_any_le(vector signed char __a, vector signed char __b) {...@@ -4260,6 +4930,7 @@ vec_any_le(vector signed char __a, vector signed char __b) {
4260 return __cc != 0;4930 return __cc != 0;
4261}4931}
42624932
4933// This prototype is deprecated.
4263static inline __ATTRS_o_ai int4934static inline __ATTRS_o_ai int
4264vec_any_le(vector signed char __a, vector bool char __b) {4935vec_any_le(vector signed char __a, vector bool char __b) {
4265 int __cc;4936 int __cc;
...@@ -4267,6 +4938,7 @@ vec_any_le(vector signed char __a, vector bool char __b) {...@@ -4267,6 +4938,7 @@ vec_any_le(vector signed char __a, vector bool char __b) {
4267 return __cc != 0;4938 return __cc != 0;
4268}4939}
42694940
4941// This prototype is deprecated.
4270static inline __ATTRS_o_ai int4942static inline __ATTRS_o_ai int
4271vec_any_le(vector bool char __a, vector signed char __b) {4943vec_any_le(vector bool char __a, vector signed char __b) {
4272 int __cc;4944 int __cc;
...@@ -4281,6 +4953,7 @@ vec_any_le(vector unsigned char __a, vector unsigned char __b) {...@@ -4281,6 +4953,7 @@ vec_any_le(vector unsigned char __a, vector unsigned char __b) {
4281 return __cc != 0;4953 return __cc != 0;
4282}4954}
42834955
4956// This prototype is deprecated.
4284static inline __ATTRS_o_ai int4957static inline __ATTRS_o_ai int
4285vec_any_le(vector unsigned char __a, vector bool char __b) {4958vec_any_le(vector unsigned char __a, vector bool char __b) {
4286 int __cc;4959 int __cc;
...@@ -4288,6 +4961,7 @@ vec_any_le(vector unsigned char __a, vector bool char __b) {...@@ -4288,6 +4961,7 @@ vec_any_le(vector unsigned char __a, vector bool char __b) {
4288 return __cc != 0;4961 return __cc != 0;
4289}4962}
42904963
4964// This prototype is deprecated.
4291static inline __ATTRS_o_ai int4965static inline __ATTRS_o_ai int
4292vec_any_le(vector bool char __a, vector unsigned char __b) {4966vec_any_le(vector bool char __a, vector unsigned char __b) {
4293 int __cc;4967 int __cc;
...@@ -4295,6 +4969,7 @@ vec_any_le(vector bool char __a, vector unsigned char __b) {...@@ -4295,6 +4969,7 @@ vec_any_le(vector bool char __a, vector unsigned char __b) {
4295 return __cc != 0;4969 return __cc != 0;
4296}4970}
42974971
4972// This prototype is deprecated.
4298static inline __ATTRS_o_ai int4973static inline __ATTRS_o_ai int
4299vec_any_le(vector bool char __a, vector bool char __b) {4974vec_any_le(vector bool char __a, vector bool char __b) {
4300 int __cc;4975 int __cc;
...@@ -4310,6 +4985,7 @@ vec_any_le(vector signed short __a, vector signed short __b) {...@@ -4310,6 +4985,7 @@ vec_any_le(vector signed short __a, vector signed short __b) {
4310 return __cc != 0;4985 return __cc != 0;
4311}4986}
43124987
4988// This prototype is deprecated.
4313static inline __ATTRS_o_ai int4989static inline __ATTRS_o_ai int
4314vec_any_le(vector signed short __a, vector bool short __b) {4990vec_any_le(vector signed short __a, vector bool short __b) {
4315 int __cc;4991 int __cc;
...@@ -4317,6 +4993,7 @@ vec_any_le(vector signed short __a, vector bool short __b) {...@@ -4317,6 +4993,7 @@ vec_any_le(vector signed short __a, vector bool short __b) {
4317 return __cc != 0;4993 return __cc != 0;
4318}4994}
43194995
4996// This prototype is deprecated.
4320static inline __ATTRS_o_ai int4997static inline __ATTRS_o_ai int
4321vec_any_le(vector bool short __a, vector signed short __b) {4998vec_any_le(vector bool short __a, vector signed short __b) {
4322 int __cc;4999 int __cc;
...@@ -4331,6 +5008,7 @@ vec_any_le(vector unsigned short __a, vector unsigned short __b) {...@@ -4331,6 +5008,7 @@ vec_any_le(vector unsigned short __a, vector unsigned short __b) {
4331 return __cc != 0;5008 return __cc != 0;
4332}5009}
43335010
5011// This prototype is deprecated.
4334static inline __ATTRS_o_ai int5012static inline __ATTRS_o_ai int
4335vec_any_le(vector unsigned short __a, vector bool short __b) {5013vec_any_le(vector unsigned short __a, vector bool short __b) {
4336 int __cc;5014 int __cc;
...@@ -4338,6 +5016,7 @@ vec_any_le(vector unsigned short __a, vector bool short __b) {...@@ -4338,6 +5016,7 @@ vec_any_le(vector unsigned short __a, vector bool short __b) {
4338 return __cc != 0;5016 return __cc != 0;
4339}5017}
43405018
5019// This prototype is deprecated.
4341static inline __ATTRS_o_ai int5020static inline __ATTRS_o_ai int
4342vec_any_le(vector bool short __a, vector unsigned short __b) {5021vec_any_le(vector bool short __a, vector unsigned short __b) {
4343 int __cc;5022 int __cc;
...@@ -4345,6 +5024,7 @@ vec_any_le(vector bool short __a, vector unsigned short __b) {...@@ -4345,6 +5024,7 @@ vec_any_le(vector bool short __a, vector unsigned short __b) {
4345 return __cc != 0;5024 return __cc != 0;
4346}5025}
43475026
5027// This prototype is deprecated.
4348static inline __ATTRS_o_ai int5028static inline __ATTRS_o_ai int
4349vec_any_le(vector bool short __a, vector bool short __b) {5029vec_any_le(vector bool short __a, vector bool short __b) {
4350 int __cc;5030 int __cc;
...@@ -4360,6 +5040,7 @@ vec_any_le(vector signed int __a, vector signed int __b) {...@@ -4360,6 +5040,7 @@ vec_any_le(vector signed int __a, vector signed int __b) {
4360 return __cc != 0;5040 return __cc != 0;
4361}5041}
43625042
5043// This prototype is deprecated.
4363static inline __ATTRS_o_ai int5044static inline __ATTRS_o_ai int
4364vec_any_le(vector signed int __a, vector bool int __b) {5045vec_any_le(vector signed int __a, vector bool int __b) {
4365 int __cc;5046 int __cc;
...@@ -4367,6 +5048,7 @@ vec_any_le(vector signed int __a, vector bool int __b) {...@@ -4367,6 +5048,7 @@ vec_any_le(vector signed int __a, vector bool int __b) {
4367 return __cc != 0;5048 return __cc != 0;
4368}5049}
43695050
5051// This prototype is deprecated.
4370static inline __ATTRS_o_ai int5052static inline __ATTRS_o_ai int
4371vec_any_le(vector bool int __a, vector signed int __b) {5053vec_any_le(vector bool int __a, vector signed int __b) {
4372 int __cc;5054 int __cc;
...@@ -4381,6 +5063,7 @@ vec_any_le(vector unsigned int __a, vector unsigned int __b) {...@@ -4381,6 +5063,7 @@ vec_any_le(vector unsigned int __a, vector unsigned int __b) {
4381 return __cc != 0;5063 return __cc != 0;
4382}5064}
43835065
5066// This prototype is deprecated.
4384static inline __ATTRS_o_ai int5067static inline __ATTRS_o_ai int
4385vec_any_le(vector unsigned int __a, vector bool int __b) {5068vec_any_le(vector unsigned int __a, vector bool int __b) {
4386 int __cc;5069 int __cc;
...@@ -4388,6 +5071,7 @@ vec_any_le(vector unsigned int __a, vector bool int __b) {...@@ -4388,6 +5071,7 @@ vec_any_le(vector unsigned int __a, vector bool int __b) {
4388 return __cc != 0;5071 return __cc != 0;
4389}5072}
43905073
5074// This prototype is deprecated.
4391static inline __ATTRS_o_ai int5075static inline __ATTRS_o_ai int
4392vec_any_le(vector bool int __a, vector unsigned int __b) {5076vec_any_le(vector bool int __a, vector unsigned int __b) {
4393 int __cc;5077 int __cc;
...@@ -4395,6 +5079,7 @@ vec_any_le(vector bool int __a, vector unsigned int __b) {...@@ -4395,6 +5079,7 @@ vec_any_le(vector bool int __a, vector unsigned int __b) {
4395 return __cc != 0;5079 return __cc != 0;
4396}5080}
43975081
5082// This prototype is deprecated.
4398static inline __ATTRS_o_ai int5083static inline __ATTRS_o_ai int
4399vec_any_le(vector bool int __a, vector bool int __b) {5084vec_any_le(vector bool int __a, vector bool int __b) {
4400 int __cc;5085 int __cc;
...@@ -4410,6 +5095,7 @@ vec_any_le(vector signed long long __a, vector signed long long __b) {...@@ -4410,6 +5095,7 @@ vec_any_le(vector signed long long __a, vector signed long long __b) {
4410 return __cc != 0;5095 return __cc != 0;
4411}5096}
44125097
5098// This prototype is deprecated.
4413static inline __ATTRS_o_ai int5099static inline __ATTRS_o_ai int
4414vec_any_le(vector signed long long __a, vector bool long long __b) {5100vec_any_le(vector signed long long __a, vector bool long long __b) {
4415 int __cc;5101 int __cc;
...@@ -4417,6 +5103,7 @@ vec_any_le(vector signed long long __a, vector bool long long __b) {...@@ -4417,6 +5103,7 @@ vec_any_le(vector signed long long __a, vector bool long long __b) {
4417 return __cc != 0;5103 return __cc != 0;
4418}5104}
44195105
5106// This prototype is deprecated.
4420static inline __ATTRS_o_ai int5107static inline __ATTRS_o_ai int
4421vec_any_le(vector bool long long __a, vector signed long long __b) {5108vec_any_le(vector bool long long __a, vector signed long long __b) {
4422 int __cc;5109 int __cc;
...@@ -4431,6 +5118,7 @@ vec_any_le(vector unsigned long long __a, vector unsigned long long __b) {...@@ -4431,6 +5118,7 @@ vec_any_le(vector unsigned long long __a, vector unsigned long long __b) {
4431 return __cc != 0;5118 return __cc != 0;
4432}5119}
44335120
5121// This prototype is deprecated.
4434static inline __ATTRS_o_ai int5122static inline __ATTRS_o_ai int
4435vec_any_le(vector unsigned long long __a, vector bool long long __b) {5123vec_any_le(vector unsigned long long __a, vector bool long long __b) {
4436 int __cc;5124 int __cc;
...@@ -4438,6 +5126,7 @@ vec_any_le(vector unsigned long long __a, vector bool long long __b) {...@@ -4438,6 +5126,7 @@ vec_any_le(vector unsigned long long __a, vector bool long long __b) {
4438 return __cc != 0;5126 return __cc != 0;
4439}5127}
44405128
5129// This prototype is deprecated.
4441static inline __ATTRS_o_ai int5130static inline __ATTRS_o_ai int
4442vec_any_le(vector bool long long __a, vector unsigned long long __b) {5131vec_any_le(vector bool long long __a, vector unsigned long long __b) {
4443 int __cc;5132 int __cc;
...@@ -4445,6 +5134,7 @@ vec_any_le(vector bool long long __a, vector unsigned long long __b) {...@@ -4445,6 +5134,7 @@ vec_any_le(vector bool long long __a, vector unsigned long long __b) {
4445 return __cc != 0;5134 return __cc != 0;
4446}5135}
44475136
5137// This prototype is deprecated.
4448static inline __ATTRS_o_ai int5138static inline __ATTRS_o_ai int
4449vec_any_le(vector bool long long __a, vector bool long long __b) {5139vec_any_le(vector bool long long __a, vector bool long long __b) {
4450 int __cc;5140 int __cc;
...@@ -4453,6 +5143,15 @@ vec_any_le(vector bool long long __a, vector bool long long __b) {...@@ -4453,6 +5143,15 @@ vec_any_le(vector bool long long __a, vector bool long long __b) {
4453 return __cc != 0;5143 return __cc != 0;
4454}5144}
44555145
5146#if __ARCH__ >= 12
5147static inline __ATTRS_o_ai int
5148vec_any_le(vector float __a, vector float __b) {
5149 int __cc;
5150 __builtin_s390_vfchesbs(__b, __a, &__cc);
5151 return __cc <= 1;
5152}
5153#endif
5154
4456static inline __ATTRS_o_ai int5155static inline __ATTRS_o_ai int
4457vec_any_le(vector double __a, vector double __b) {5156vec_any_le(vector double __a, vector double __b) {
4458 int __cc;5157 int __cc;
...@@ -4469,6 +5168,7 @@ vec_any_lt(vector signed char __a, vector signed char __b) {...@@ -4469,6 +5168,7 @@ vec_any_lt(vector signed char __a, vector signed char __b) {
4469 return __cc <= 1;5168 return __cc <= 1;
4470}5169}
44715170
5171// This prototype is deprecated.
4472static inline __ATTRS_o_ai int5172static inline __ATTRS_o_ai int
4473vec_any_lt(vector signed char __a, vector bool char __b) {5173vec_any_lt(vector signed char __a, vector bool char __b) {
4474 int __cc;5174 int __cc;
...@@ -4476,6 +5176,7 @@ vec_any_lt(vector signed char __a, vector bool char __b) {...@@ -4476,6 +5176,7 @@ vec_any_lt(vector signed char __a, vector bool char __b) {
4476 return __cc <= 1;5176 return __cc <= 1;
4477}5177}
44785178
5179// This prototype is deprecated.
4479static inline __ATTRS_o_ai int5180static inline __ATTRS_o_ai int
4480vec_any_lt(vector bool char __a, vector signed char __b) {5181vec_any_lt(vector bool char __a, vector signed char __b) {
4481 int __cc;5182 int __cc;
...@@ -4490,6 +5191,7 @@ vec_any_lt(vector unsigned char __a, vector unsigned char __b) {...@@ -4490,6 +5191,7 @@ vec_any_lt(vector unsigned char __a, vector unsigned char __b) {
4490 return __cc <= 1;5191 return __cc <= 1;
4491}5192}
44925193
5194// This prototype is deprecated.
4493static inline __ATTRS_o_ai int5195static inline __ATTRS_o_ai int
4494vec_any_lt(vector unsigned char __a, vector bool char __b) {5196vec_any_lt(vector unsigned char __a, vector bool char __b) {
4495 int __cc;5197 int __cc;
...@@ -4497,6 +5199,7 @@ vec_any_lt(vector unsigned char __a, vector bool char __b) {...@@ -4497,6 +5199,7 @@ vec_any_lt(vector unsigned char __a, vector bool char __b) {
4497 return __cc <= 1;5199 return __cc <= 1;
4498}5200}
44995201
5202// This prototype is deprecated.
4500static inline __ATTRS_o_ai int5203static inline __ATTRS_o_ai int
4501vec_any_lt(vector bool char __a, vector unsigned char __b) {5204vec_any_lt(vector bool char __a, vector unsigned char __b) {
4502 int __cc;5205 int __cc;
...@@ -4504,6 +5207,7 @@ vec_any_lt(vector bool char __a, vector unsigned char __b) {...@@ -4504,6 +5207,7 @@ vec_any_lt(vector bool char __a, vector unsigned char __b) {
4504 return __cc <= 1;5207 return __cc <= 1;
4505}5208}
45065209
5210// This prototype is deprecated.
4507static inline __ATTRS_o_ai int5211static inline __ATTRS_o_ai int
4508vec_any_lt(vector bool char __a, vector bool char __b) {5212vec_any_lt(vector bool char __a, vector bool char __b) {
4509 int __cc;5213 int __cc;
...@@ -4519,6 +5223,7 @@ vec_any_lt(vector signed short __a, vector signed short __b) {...@@ -4519,6 +5223,7 @@ vec_any_lt(vector signed short __a, vector signed short __b) {
4519 return __cc <= 1;5223 return __cc <= 1;
4520}5224}
45215225
5226// This prototype is deprecated.
4522static inline __ATTRS_o_ai int5227static inline __ATTRS_o_ai int
4523vec_any_lt(vector signed short __a, vector bool short __b) {5228vec_any_lt(vector signed short __a, vector bool short __b) {
4524 int __cc;5229 int __cc;
...@@ -4526,6 +5231,7 @@ vec_any_lt(vector signed short __a, vector bool short __b) {...@@ -4526,6 +5231,7 @@ vec_any_lt(vector signed short __a, vector bool short __b) {
4526 return __cc <= 1;5231 return __cc <= 1;
4527}5232}
45285233
5234// This prototype is deprecated.
4529static inline __ATTRS_o_ai int5235static inline __ATTRS_o_ai int
4530vec_any_lt(vector bool short __a, vector signed short __b) {5236vec_any_lt(vector bool short __a, vector signed short __b) {
4531 int __cc;5237 int __cc;
...@@ -4540,6 +5246,7 @@ vec_any_lt(vector unsigned short __a, vector unsigned short __b) {...@@ -4540,6 +5246,7 @@ vec_any_lt(vector unsigned short __a, vector unsigned short __b) {
4540 return __cc <= 1;5246 return __cc <= 1;
4541}5247}
45425248
5249// This prototype is deprecated.
4543static inline __ATTRS_o_ai int5250static inline __ATTRS_o_ai int
4544vec_any_lt(vector unsigned short __a, vector bool short __b) {5251vec_any_lt(vector unsigned short __a, vector bool short __b) {
4545 int __cc;5252 int __cc;
...@@ -4547,6 +5254,7 @@ vec_any_lt(vector unsigned short __a, vector bool short __b) {...@@ -4547,6 +5254,7 @@ vec_any_lt(vector unsigned short __a, vector bool short __b) {
4547 return __cc <= 1;5254 return __cc <= 1;
4548}5255}
45495256
5257// This prototype is deprecated.
4550static inline __ATTRS_o_ai int5258static inline __ATTRS_o_ai int
4551vec_any_lt(vector bool short __a, vector unsigned short __b) {5259vec_any_lt(vector bool short __a, vector unsigned short __b) {
4552 int __cc;5260 int __cc;
...@@ -4554,6 +5262,7 @@ vec_any_lt(vector bool short __a, vector unsigned short __b) {...@@ -4554,6 +5262,7 @@ vec_any_lt(vector bool short __a, vector unsigned short __b) {
4554 return __cc <= 1;5262 return __cc <= 1;
4555}5263}
45565264
5265// This prototype is deprecated.
4557static inline __ATTRS_o_ai int5266static inline __ATTRS_o_ai int
4558vec_any_lt(vector bool short __a, vector bool short __b) {5267vec_any_lt(vector bool short __a, vector bool short __b) {
4559 int __cc;5268 int __cc;
...@@ -4569,6 +5278,7 @@ vec_any_lt(vector signed int __a, vector signed int __b) {...@@ -4569,6 +5278,7 @@ vec_any_lt(vector signed int __a, vector signed int __b) {
4569 return __cc <= 1;5278 return __cc <= 1;
4570}5279}
45715280
5281// This prototype is deprecated.
4572static inline __ATTRS_o_ai int5282static inline __ATTRS_o_ai int
4573vec_any_lt(vector signed int __a, vector bool int __b) {5283vec_any_lt(vector signed int __a, vector bool int __b) {
4574 int __cc;5284 int __cc;
...@@ -4576,6 +5286,7 @@ vec_any_lt(vector signed int __a, vector bool int __b) {...@@ -4576,6 +5286,7 @@ vec_any_lt(vector signed int __a, vector bool int __b) {
4576 return __cc <= 1;5286 return __cc <= 1;
4577}5287}
45785288
5289// This prototype is deprecated.
4579static inline __ATTRS_o_ai int5290static inline __ATTRS_o_ai int
4580vec_any_lt(vector bool int __a, vector signed int __b) {5291vec_any_lt(vector bool int __a, vector signed int __b) {
4581 int __cc;5292 int __cc;
...@@ -4590,6 +5301,7 @@ vec_any_lt(vector unsigned int __a, vector unsigned int __b) {...@@ -4590,6 +5301,7 @@ vec_any_lt(vector unsigned int __a, vector unsigned int __b) {
4590 return __cc <= 1;5301 return __cc <= 1;
4591}5302}
45925303
5304// This prototype is deprecated.
4593static inline __ATTRS_o_ai int5305static inline __ATTRS_o_ai int
4594vec_any_lt(vector unsigned int __a, vector bool int __b) {5306vec_any_lt(vector unsigned int __a, vector bool int __b) {
4595 int __cc;5307 int __cc;
...@@ -4597,6 +5309,7 @@ vec_any_lt(vector unsigned int __a, vector bool int __b) {...@@ -4597,6 +5309,7 @@ vec_any_lt(vector unsigned int __a, vector bool int __b) {
4597 return __cc <= 1;5309 return __cc <= 1;
4598}5310}
45995311
5312// This prototype is deprecated.
4600static inline __ATTRS_o_ai int5313static inline __ATTRS_o_ai int
4601vec_any_lt(vector bool int __a, vector unsigned int __b) {5314vec_any_lt(vector bool int __a, vector unsigned int __b) {
4602 int __cc;5315 int __cc;
...@@ -4604,6 +5317,7 @@ vec_any_lt(vector bool int __a, vector unsigned int __b) {...@@ -4604,6 +5317,7 @@ vec_any_lt(vector bool int __a, vector unsigned int __b) {
4604 return __cc <= 1;5317 return __cc <= 1;
4605}5318}
46065319
5320// This prototype is deprecated.
4607static inline __ATTRS_o_ai int5321static inline __ATTRS_o_ai int
4608vec_any_lt(vector bool int __a, vector bool int __b) {5322vec_any_lt(vector bool int __a, vector bool int __b) {
4609 int __cc;5323 int __cc;
...@@ -4619,6 +5333,7 @@ vec_any_lt(vector signed long long __a, vector signed long long __b) {...@@ -4619,6 +5333,7 @@ vec_any_lt(vector signed long long __a, vector signed long long __b) {
4619 return __cc <= 1;5333 return __cc <= 1;
4620}5334}
46215335
5336// This prototype is deprecated.
4622static inline __ATTRS_o_ai int5337static inline __ATTRS_o_ai int
4623vec_any_lt(vector signed long long __a, vector bool long long __b) {5338vec_any_lt(vector signed long long __a, vector bool long long __b) {
4624 int __cc;5339 int __cc;
...@@ -4626,6 +5341,7 @@ vec_any_lt(vector signed long long __a, vector bool long long __b) {...@@ -4626,6 +5341,7 @@ vec_any_lt(vector signed long long __a, vector bool long long __b) {
4626 return __cc <= 1;5341 return __cc <= 1;
4627}5342}
46285343
5344// This prototype is deprecated.
4629static inline __ATTRS_o_ai int5345static inline __ATTRS_o_ai int
4630vec_any_lt(vector bool long long __a, vector signed long long __b) {5346vec_any_lt(vector bool long long __a, vector signed long long __b) {
4631 int __cc;5347 int __cc;
...@@ -4640,6 +5356,7 @@ vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) {...@@ -4640,6 +5356,7 @@ vec_any_lt(vector unsigned long long __a, vector unsigned long long __b) {
4640 return __cc <= 1;5356 return __cc <= 1;
4641}5357}
46425358
5359// This prototype is deprecated.
4643static inline __ATTRS_o_ai int5360static inline __ATTRS_o_ai int
4644vec_any_lt(vector unsigned long long __a, vector bool long long __b) {5361vec_any_lt(vector unsigned long long __a, vector bool long long __b) {
4645 int __cc;5362 int __cc;
...@@ -4647,6 +5364,7 @@ vec_any_lt(vector unsigned long long __a, vector bool long long __b) {...@@ -4647,6 +5364,7 @@ vec_any_lt(vector unsigned long long __a, vector bool long long __b) {
4647 return __cc <= 1;5364 return __cc <= 1;
4648}5365}
46495366
5367// This prototype is deprecated.
4650static inline __ATTRS_o_ai int5368static inline __ATTRS_o_ai int
4651vec_any_lt(vector bool long long __a, vector unsigned long long __b) {5369vec_any_lt(vector bool long long __a, vector unsigned long long __b) {
4652 int __cc;5370 int __cc;
...@@ -4654,6 +5372,7 @@ vec_any_lt(vector bool long long __a, vector unsigned long long __b) {...@@ -4654,6 +5372,7 @@ vec_any_lt(vector bool long long __a, vector unsigned long long __b) {
4654 return __cc <= 1;5372 return __cc <= 1;
4655}5373}
46565374
5375// This prototype is deprecated.
4657static inline __ATTRS_o_ai int5376static inline __ATTRS_o_ai int
4658vec_any_lt(vector bool long long __a, vector bool long long __b) {5377vec_any_lt(vector bool long long __a, vector bool long long __b) {
4659 int __cc;5378 int __cc;
...@@ -4662,6 +5381,15 @@ vec_any_lt(vector bool long long __a, vector bool long long __b) {...@@ -4662,6 +5381,15 @@ vec_any_lt(vector bool long long __a, vector bool long long __b) {
4662 return __cc <= 1;5381 return __cc <= 1;
4663}5382}
46645383
5384#if __ARCH__ >= 12
5385static inline __ATTRS_o_ai int
5386vec_any_lt(vector float __a, vector float __b) {
5387 int __cc;
5388 __builtin_s390_vfchsbs(__b, __a, &__cc);
5389 return __cc <= 1;
5390}
5391#endif
5392
4665static inline __ATTRS_o_ai int5393static inline __ATTRS_o_ai int
4666vec_any_lt(vector double __a, vector double __b) {5394vec_any_lt(vector double __a, vector double __b) {
4667 int __cc;5395 int __cc;
...@@ -4671,7 +5399,16 @@ vec_any_lt(vector double __a, vector double __b) {...@@ -4671,7 +5399,16 @@ vec_any_lt(vector double __a, vector double __b) {
46715399
4672/*-- vec_any_nge ------------------------------------------------------------*/5400/*-- vec_any_nge ------------------------------------------------------------*/
46735401
4674static inline __ATTRS_ai int5402#if __ARCH__ >= 12
5403static inline __ATTRS_o_ai int
5404vec_any_nge(vector float __a, vector float __b) {
5405 int __cc;
5406 __builtin_s390_vfchesbs(__a, __b, &__cc);
5407 return __cc != 0;
5408}
5409#endif
5410
5411static inline __ATTRS_o_ai int
4675vec_any_nge(vector double __a, vector double __b) {5412vec_any_nge(vector double __a, vector double __b) {
4676 int __cc;5413 int __cc;
4677 __builtin_s390_vfchedbs(__a, __b, &__cc);5414 __builtin_s390_vfchedbs(__a, __b, &__cc);
...@@ -4680,7 +5417,16 @@ vec_any_nge(vector double __a, vector double __b) {...@@ -4680,7 +5417,16 @@ vec_any_nge(vector double __a, vector double __b) {
46805417
4681/*-- vec_any_ngt ------------------------------------------------------------*/5418/*-- vec_any_ngt ------------------------------------------------------------*/
46825419
4683static inline __ATTRS_ai int5420#if __ARCH__ >= 12
5421static inline __ATTRS_o_ai int
5422vec_any_ngt(vector float __a, vector float __b) {
5423 int __cc;
5424 __builtin_s390_vfchsbs(__a, __b, &__cc);
5425 return __cc != 0;
5426}
5427#endif
5428
5429static inline __ATTRS_o_ai int
4684vec_any_ngt(vector double __a, vector double __b) {5430vec_any_ngt(vector double __a, vector double __b) {
4685 int __cc;5431 int __cc;
4686 __builtin_s390_vfchdbs(__a, __b, &__cc);5432 __builtin_s390_vfchdbs(__a, __b, &__cc);
...@@ -4689,7 +5435,16 @@ vec_any_ngt(vector double __a, vector double __b) {...@@ -4689,7 +5435,16 @@ vec_any_ngt(vector double __a, vector double __b) {
46895435
4690/*-- vec_any_nle ------------------------------------------------------------*/5436/*-- vec_any_nle ------------------------------------------------------------*/
46915437
4692static inline __ATTRS_ai int5438#if __ARCH__ >= 12
5439static inline __ATTRS_o_ai int
5440vec_any_nle(vector float __a, vector float __b) {
5441 int __cc;
5442 __builtin_s390_vfchesbs(__b, __a, &__cc);
5443 return __cc != 0;
5444}
5445#endif
5446
5447static inline __ATTRS_o_ai int
4693vec_any_nle(vector double __a, vector double __b) {5448vec_any_nle(vector double __a, vector double __b) {
4694 int __cc;5449 int __cc;
4695 __builtin_s390_vfchedbs(__b, __a, &__cc);5450 __builtin_s390_vfchedbs(__b, __a, &__cc);
...@@ -4698,7 +5453,16 @@ vec_any_nle(vector double __a, vector double __b) {...@@ -4698,7 +5453,16 @@ vec_any_nle(vector double __a, vector double __b) {
46985453
4699/*-- vec_any_nlt ------------------------------------------------------------*/5454/*-- vec_any_nlt ------------------------------------------------------------*/
47005455
4701static inline __ATTRS_ai int5456#if __ARCH__ >= 12
5457static inline __ATTRS_o_ai int
5458vec_any_nlt(vector float __a, vector float __b) {
5459 int __cc;
5460 __builtin_s390_vfchsbs(__b, __a, &__cc);
5461 return __cc != 0;
5462}
5463#endif
5464
5465static inline __ATTRS_o_ai int
4702vec_any_nlt(vector double __a, vector double __b) {5466vec_any_nlt(vector double __a, vector double __b) {
4703 int __cc;5467 int __cc;
4704 __builtin_s390_vfchdbs(__b, __a, &__cc);5468 __builtin_s390_vfchdbs(__b, __a, &__cc);
...@@ -4707,7 +5471,16 @@ vec_any_nlt(vector double __a, vector double __b) {...@@ -4707,7 +5471,16 @@ vec_any_nlt(vector double __a, vector double __b) {
47075471
4708/*-- vec_any_nan ------------------------------------------------------------*/5472/*-- vec_any_nan ------------------------------------------------------------*/
47095473
4710static inline __ATTRS_ai int5474#if __ARCH__ >= 12
5475static inline __ATTRS_o_ai int
5476vec_any_nan(vector float __a) {
5477 int __cc;
5478 __builtin_s390_vftcisb(__a, 15, &__cc);
5479 return __cc != 3;
5480}
5481#endif
5482
5483static inline __ATTRS_o_ai int
4711vec_any_nan(vector double __a) {5484vec_any_nan(vector double __a) {
4712 int __cc;5485 int __cc;
4713 __builtin_s390_vftcidb(__a, 15, &__cc);5486 __builtin_s390_vftcidb(__a, 15, &__cc);
...@@ -4716,7 +5489,16 @@ vec_any_nan(vector double __a) {...@@ -4716,7 +5489,16 @@ vec_any_nan(vector double __a) {
47165489
4717/*-- vec_any_numeric --------------------------------------------------------*/5490/*-- vec_any_numeric --------------------------------------------------------*/
47185491
4719static inline __ATTRS_ai int5492#if __ARCH__ >= 12
5493static inline __ATTRS_o_ai int
5494vec_any_numeric(vector float __a) {
5495 int __cc;
5496 __builtin_s390_vftcisb(__a, 15, &__cc);
5497 return __cc != 0;
5498}
5499#endif
5500
5501static inline __ATTRS_o_ai int
4720vec_any_numeric(vector double __a) {5502vec_any_numeric(vector double __a) {
4721 int __cc;5503 int __cc;
4722 __builtin_s390_vftcidb(__a, 15, &__cc);5504 __builtin_s390_vftcidb(__a, 15, &__cc);
...@@ -4735,11 +5517,13 @@ vec_andc(vector signed char __a, vector signed char __b) {...@@ -4735,11 +5517,13 @@ vec_andc(vector signed char __a, vector signed char __b) {
4735 return __a & ~__b;5517 return __a & ~__b;
4736}5518}
47375519
5520// This prototype is deprecated.
4738static inline __ATTRS_o_ai vector signed char5521static inline __ATTRS_o_ai vector signed char
4739vec_andc(vector bool char __a, vector signed char __b) {5522vec_andc(vector bool char __a, vector signed char __b) {
4740 return __a & ~__b;5523 return __a & ~__b;
4741}5524}
47425525
5526// This prototype is deprecated.
4743static inline __ATTRS_o_ai vector signed char5527static inline __ATTRS_o_ai vector signed char
4744vec_andc(vector signed char __a, vector bool char __b) {5528vec_andc(vector signed char __a, vector bool char __b) {
4745 return __a & ~__b;5529 return __a & ~__b;
...@@ -4750,11 +5534,13 @@ vec_andc(vector unsigned char __a, vector unsigned char __b) {...@@ -4750,11 +5534,13 @@ vec_andc(vector unsigned char __a, vector unsigned char __b) {
4750 return __a & ~__b;5534 return __a & ~__b;
4751}5535}
47525536
5537// This prototype is deprecated.
4753static inline __ATTRS_o_ai vector unsigned char5538static inline __ATTRS_o_ai vector unsigned char
4754vec_andc(vector bool char __a, vector unsigned char __b) {5539vec_andc(vector bool char __a, vector unsigned char __b) {
4755 return __a & ~__b;5540 return __a & ~__b;
4756}5541}
47575542
5543// This prototype is deprecated.
4758static inline __ATTRS_o_ai vector unsigned char5544static inline __ATTRS_o_ai vector unsigned char
4759vec_andc(vector unsigned char __a, vector bool char __b) {5545vec_andc(vector unsigned char __a, vector bool char __b) {
4760 return __a & ~__b;5546 return __a & ~__b;
...@@ -4770,11 +5556,13 @@ vec_andc(vector signed short __a, vector signed short __b) {...@@ -4770,11 +5556,13 @@ vec_andc(vector signed short __a, vector signed short __b) {
4770 return __a & ~__b;5556 return __a & ~__b;
4771}5557}
47725558
5559// This prototype is deprecated.
4773static inline __ATTRS_o_ai vector signed short5560static inline __ATTRS_o_ai vector signed short
4774vec_andc(vector bool short __a, vector signed short __b) {5561vec_andc(vector bool short __a, vector signed short __b) {
4775 return __a & ~__b;5562 return __a & ~__b;
4776}5563}
47775564
5565// This prototype is deprecated.
4778static inline __ATTRS_o_ai vector signed short5566static inline __ATTRS_o_ai vector signed short
4779vec_andc(vector signed short __a, vector bool short __b) {5567vec_andc(vector signed short __a, vector bool short __b) {
4780 return __a & ~__b;5568 return __a & ~__b;
...@@ -4785,11 +5573,13 @@ vec_andc(vector unsigned short __a, vector unsigned short __b) {...@@ -4785,11 +5573,13 @@ vec_andc(vector unsigned short __a, vector unsigned short __b) {
4785 return __a & ~__b;5573 return __a & ~__b;
4786}5574}
47875575
5576// This prototype is deprecated.
4788static inline __ATTRS_o_ai vector unsigned short5577static inline __ATTRS_o_ai vector unsigned short
4789vec_andc(vector bool short __a, vector unsigned short __b) {5578vec_andc(vector bool short __a, vector unsigned short __b) {
4790 return __a & ~__b;5579 return __a & ~__b;
4791}5580}
47925581
5582// This prototype is deprecated.
4793static inline __ATTRS_o_ai vector unsigned short5583static inline __ATTRS_o_ai vector unsigned short
4794vec_andc(vector unsigned short __a, vector bool short __b) {5584vec_andc(vector unsigned short __a, vector bool short __b) {
4795 return __a & ~__b;5585 return __a & ~__b;
...@@ -4805,11 +5595,13 @@ vec_andc(vector signed int __a, vector signed int __b) {...@@ -4805,11 +5595,13 @@ vec_andc(vector signed int __a, vector signed int __b) {
4805 return __a & ~__b;5595 return __a & ~__b;
4806}5596}
48075597
5598// This prototype is deprecated.
4808static inline __ATTRS_o_ai vector signed int5599static inline __ATTRS_o_ai vector signed int
4809vec_andc(vector bool int __a, vector signed int __b) {5600vec_andc(vector bool int __a, vector signed int __b) {
4810 return __a & ~__b;5601 return __a & ~__b;
4811}5602}
48125603
5604// This prototype is deprecated.
4813static inline __ATTRS_o_ai vector signed int5605static inline __ATTRS_o_ai vector signed int
4814vec_andc(vector signed int __a, vector bool int __b) {5606vec_andc(vector signed int __a, vector bool int __b) {
4815 return __a & ~__b;5607 return __a & ~__b;
...@@ -4820,11 +5612,13 @@ vec_andc(vector unsigned int __a, vector unsigned int __b) {...@@ -4820,11 +5612,13 @@ vec_andc(vector unsigned int __a, vector unsigned int __b) {
4820 return __a & ~__b;5612 return __a & ~__b;
4821}5613}
48225614
5615// This prototype is deprecated.
4823static inline __ATTRS_o_ai vector unsigned int5616static inline __ATTRS_o_ai vector unsigned int
4824vec_andc(vector bool int __a, vector unsigned int __b) {5617vec_andc(vector bool int __a, vector unsigned int __b) {
4825 return __a & ~__b;5618 return __a & ~__b;
4826}5619}
48275620
5621// This prototype is deprecated.
4828static inline __ATTRS_o_ai vector unsigned int5622static inline __ATTRS_o_ai vector unsigned int
4829vec_andc(vector unsigned int __a, vector bool int __b) {5623vec_andc(vector unsigned int __a, vector bool int __b) {
4830 return __a & ~__b;5624 return __a & ~__b;
...@@ -4840,11 +5634,13 @@ vec_andc(vector signed long long __a, vector signed long long __b) {...@@ -4840,11 +5634,13 @@ vec_andc(vector signed long long __a, vector signed long long __b) {
4840 return __a & ~__b;5634 return __a & ~__b;
4841}5635}
48425636
5637// This prototype is deprecated.
4843static inline __ATTRS_o_ai vector signed long long5638static inline __ATTRS_o_ai vector signed long long
4844vec_andc(vector bool long long __a, vector signed long long __b) {5639vec_andc(vector bool long long __a, vector signed long long __b) {
4845 return __a & ~__b;5640 return __a & ~__b;
4846}5641}
48475642
5643// This prototype is deprecated.
4848static inline __ATTRS_o_ai vector signed long long5644static inline __ATTRS_o_ai vector signed long long
4849vec_andc(vector signed long long __a, vector bool long long __b) {5645vec_andc(vector signed long long __a, vector bool long long __b) {
4850 return __a & ~__b;5646 return __a & ~__b;
...@@ -4855,28 +5651,40 @@ vec_andc(vector unsigned long long __a, vector unsigned long long __b) {...@@ -4855,28 +5651,40 @@ vec_andc(vector unsigned long long __a, vector unsigned long long __b) {
4855 return __a & ~__b;5651 return __a & ~__b;
4856}5652}
48575653
5654// This prototype is deprecated.
4858static inline __ATTRS_o_ai vector unsigned long long5655static inline __ATTRS_o_ai vector unsigned long long
4859vec_andc(vector bool long long __a, vector unsigned long long __b) {5656vec_andc(vector bool long long __a, vector unsigned long long __b) {
4860 return __a & ~__b;5657 return __a & ~__b;
4861}5658}
48625659
5660// This prototype is deprecated.
4863static inline __ATTRS_o_ai vector unsigned long long5661static inline __ATTRS_o_ai vector unsigned long long
4864vec_andc(vector unsigned long long __a, vector bool long long __b) {5662vec_andc(vector unsigned long long __a, vector bool long long __b) {
4865 return __a & ~__b;5663 return __a & ~__b;
4866}5664}
48675665
5666#if __ARCH__ >= 12
5667static inline __ATTRS_o_ai vector float
5668vec_andc(vector float __a, vector float __b) {
5669 return (vector float)((vector unsigned int)__a &
5670 ~(vector unsigned int)__b);
5671}
5672#endif
5673
4868static inline __ATTRS_o_ai vector double5674static inline __ATTRS_o_ai vector double
4869vec_andc(vector double __a, vector double __b) {5675vec_andc(vector double __a, vector double __b) {
4870 return (vector double)((vector unsigned long long)__a &5676 return (vector double)((vector unsigned long long)__a &
4871 ~(vector unsigned long long)__b);5677 ~(vector unsigned long long)__b);
4872}5678}
48735679
5680// This prototype is deprecated.
4874static inline __ATTRS_o_ai vector double5681static inline __ATTRS_o_ai vector double
4875vec_andc(vector bool long long __a, vector double __b) {5682vec_andc(vector bool long long __a, vector double __b) {
4876 return (vector double)((vector unsigned long long)__a &5683 return (vector double)((vector unsigned long long)__a &
4877 ~(vector unsigned long long)__b);5684 ~(vector unsigned long long)__b);
4878}5685}
48795686
5687// This prototype is deprecated.
4880static inline __ATTRS_o_ai vector double5688static inline __ATTRS_o_ai vector double
4881vec_andc(vector double __a, vector bool long long __b) {5689vec_andc(vector double __a, vector bool long long __b) {
4882 return (vector double)((vector unsigned long long)__a &5690 return (vector double)((vector unsigned long long)__a &
...@@ -4895,11 +5703,13 @@ vec_nor(vector signed char __a, vector signed char __b) {...@@ -4895,11 +5703,13 @@ vec_nor(vector signed char __a, vector signed char __b) {
4895 return ~(__a | __b);5703 return ~(__a | __b);
4896}5704}
48975705
5706// This prototype is deprecated.
4898static inline __ATTRS_o_ai vector signed char5707static inline __ATTRS_o_ai vector signed char
4899vec_nor(vector bool char __a, vector signed char __b) {5708vec_nor(vector bool char __a, vector signed char __b) {
4900 return ~(__a | __b);5709 return ~(__a | __b);
4901}5710}
49025711
5712// This prototype is deprecated.
4903static inline __ATTRS_o_ai vector signed char5713static inline __ATTRS_o_ai vector signed char
4904vec_nor(vector signed char __a, vector bool char __b) {5714vec_nor(vector signed char __a, vector bool char __b) {
4905 return ~(__a | __b);5715 return ~(__a | __b);
...@@ -4910,11 +5720,13 @@ vec_nor(vector unsigned char __a, vector unsigned char __b) {...@@ -4910,11 +5720,13 @@ vec_nor(vector unsigned char __a, vector unsigned char __b) {
4910 return ~(__a | __b);5720 return ~(__a | __b);
4911}5721}
49125722
5723// This prototype is deprecated.
4913static inline __ATTRS_o_ai vector unsigned char5724static inline __ATTRS_o_ai vector unsigned char
4914vec_nor(vector bool char __a, vector unsigned char __b) {5725vec_nor(vector bool char __a, vector unsigned char __b) {
4915 return ~(__a | __b);5726 return ~(__a | __b);
4916}5727}
49175728
5729// This prototype is deprecated.
4918static inline __ATTRS_o_ai vector unsigned char5730static inline __ATTRS_o_ai vector unsigned char
4919vec_nor(vector unsigned char __a, vector bool char __b) {5731vec_nor(vector unsigned char __a, vector bool char __b) {
4920 return ~(__a | __b);5732 return ~(__a | __b);
...@@ -4930,11 +5742,13 @@ vec_nor(vector signed short __a, vector signed short __b) {...@@ -4930,11 +5742,13 @@ vec_nor(vector signed short __a, vector signed short __b) {
4930 return ~(__a | __b);5742 return ~(__a | __b);
4931}5743}
49325744
5745// This prototype is deprecated.
4933static inline __ATTRS_o_ai vector signed short5746static inline __ATTRS_o_ai vector signed short
4934vec_nor(vector bool short __a, vector signed short __b) {5747vec_nor(vector bool short __a, vector signed short __b) {
4935 return ~(__a | __b);5748 return ~(__a | __b);
4936}5749}
49375750
5751// This prototype is deprecated.
4938static inline __ATTRS_o_ai vector signed short5752static inline __ATTRS_o_ai vector signed short
4939vec_nor(vector signed short __a, vector bool short __b) {5753vec_nor(vector signed short __a, vector bool short __b) {
4940 return ~(__a | __b);5754 return ~(__a | __b);
...@@ -4945,11 +5759,13 @@ vec_nor(vector unsigned short __a, vector unsigned short __b) {...@@ -4945,11 +5759,13 @@ vec_nor(vector unsigned short __a, vector unsigned short __b) {
4945 return ~(__a | __b);5759 return ~(__a | __b);
4946}5760}
49475761
5762// This prototype is deprecated.
4948static inline __ATTRS_o_ai vector unsigned short5763static inline __ATTRS_o_ai vector unsigned short
4949vec_nor(vector bool short __a, vector unsigned short __b) {5764vec_nor(vector bool short __a, vector unsigned short __b) {
4950 return ~(__a | __b);5765 return ~(__a | __b);
4951}5766}
49525767
5768// This prototype is deprecated.
4953static inline __ATTRS_o_ai vector unsigned short5769static inline __ATTRS_o_ai vector unsigned short
4954vec_nor(vector unsigned short __a, vector bool short __b) {5770vec_nor(vector unsigned short __a, vector bool short __b) {
4955 return ~(__a | __b);5771 return ~(__a | __b);
...@@ -4965,11 +5781,13 @@ vec_nor(vector signed int __a, vector signed int __b) {...@@ -4965,11 +5781,13 @@ vec_nor(vector signed int __a, vector signed int __b) {
4965 return ~(__a | __b);5781 return ~(__a | __b);
4966}5782}
49675783
5784// This prototype is deprecated.
4968static inline __ATTRS_o_ai vector signed int5785static inline __ATTRS_o_ai vector signed int
4969vec_nor(vector bool int __a, vector signed int __b) {5786vec_nor(vector bool int __a, vector signed int __b) {
4970 return ~(__a | __b);5787 return ~(__a | __b);
4971}5788}
49725789
5790// This prototype is deprecated.
4973static inline __ATTRS_o_ai vector signed int5791static inline __ATTRS_o_ai vector signed int
4974vec_nor(vector signed int __a, vector bool int __b) {5792vec_nor(vector signed int __a, vector bool int __b) {
4975 return ~(__a | __b);5793 return ~(__a | __b);
...@@ -4980,11 +5798,13 @@ vec_nor(vector unsigned int __a, vector unsigned int __b) {...@@ -4980,11 +5798,13 @@ vec_nor(vector unsigned int __a, vector unsigned int __b) {
4980 return ~(__a | __b);5798 return ~(__a | __b);
4981}5799}
49825800
5801// This prototype is deprecated.
4983static inline __ATTRS_o_ai vector unsigned int5802static inline __ATTRS_o_ai vector unsigned int
4984vec_nor(vector bool int __a, vector unsigned int __b) {5803vec_nor(vector bool int __a, vector unsigned int __b) {
4985 return ~(__a | __b);5804 return ~(__a | __b);
4986}5805}
49875806
5807// This prototype is deprecated.
4988static inline __ATTRS_o_ai vector unsigned int5808static inline __ATTRS_o_ai vector unsigned int
4989vec_nor(vector unsigned int __a, vector bool int __b) {5809vec_nor(vector unsigned int __a, vector bool int __b) {
4990 return ~(__a | __b);5810 return ~(__a | __b);
...@@ -5000,11 +5820,13 @@ vec_nor(vector signed long long __a, vector signed long long __b) {...@@ -5000,11 +5820,13 @@ vec_nor(vector signed long long __a, vector signed long long __b) {
5000 return ~(__a | __b);5820 return ~(__a | __b);
5001}5821}
50025822
5823// This prototype is deprecated.
5003static inline __ATTRS_o_ai vector signed long long5824static inline __ATTRS_o_ai vector signed long long
5004vec_nor(vector bool long long __a, vector signed long long __b) {5825vec_nor(vector bool long long __a, vector signed long long __b) {
5005 return ~(__a | __b);5826 return ~(__a | __b);
5006}5827}
50075828
5829// This prototype is deprecated.
5008static inline __ATTRS_o_ai vector signed long long5830static inline __ATTRS_o_ai vector signed long long
5009vec_nor(vector signed long long __a, vector bool long long __b) {5831vec_nor(vector signed long long __a, vector bool long long __b) {
5010 return ~(__a | __b);5832 return ~(__a | __b);
...@@ -5015,34 +5837,274 @@ vec_nor(vector unsigned long long __a, vector unsigned long long __b) {...@@ -5015,34 +5837,274 @@ vec_nor(vector unsigned long long __a, vector unsigned long long __b) {
5015 return ~(__a | __b);5837 return ~(__a | __b);
5016}5838}
50175839
5840// This prototype is deprecated.
5018static inline __ATTRS_o_ai vector unsigned long long5841static inline __ATTRS_o_ai vector unsigned long long
5019vec_nor(vector bool long long __a, vector unsigned long long __b) {5842vec_nor(vector bool long long __a, vector unsigned long long __b) {
5020 return ~(__a | __b);5843 return ~(__a | __b);
5021}5844}
50225845
5846// This prototype is deprecated.
5023static inline __ATTRS_o_ai vector unsigned long long5847static inline __ATTRS_o_ai vector unsigned long long
5024vec_nor(vector unsigned long long __a, vector bool long long __b) {5848vec_nor(vector unsigned long long __a, vector bool long long __b) {
5025 return ~(__a | __b);5849 return ~(__a | __b);
5026}5850}
50275851
5852#if __ARCH__ >= 12
5853static inline __ATTRS_o_ai vector float
5854vec_nor(vector float __a, vector float __b) {
5855 return (vector float)~((vector unsigned int)__a |
5856 (vector unsigned int)__b);
5857}
5858#endif
5859
5028static inline __ATTRS_o_ai vector double5860static inline __ATTRS_o_ai vector double
5029vec_nor(vector double __a, vector double __b) {5861vec_nor(vector double __a, vector double __b) {
5030 return (vector double)~((vector unsigned long long)__a |5862 return (vector double)~((vector unsigned long long)__a |
5031 (vector unsigned long long)__b);5863 (vector unsigned long long)__b);
5032}5864}
50335865
5866// This prototype is deprecated.
5034static inline __ATTRS_o_ai vector double5867static inline __ATTRS_o_ai vector double
5035vec_nor(vector bool long long __a, vector double __b) {5868vec_nor(vector bool long long __a, vector double __b) {
5036 return (vector double)~((vector unsigned long long)__a |5869 return (vector double)~((vector unsigned long long)__a |
5037 (vector unsigned long long)__b);5870 (vector unsigned long long)__b);
5038}5871}
50395872
5873// This prototype is deprecated.
5040static inline __ATTRS_o_ai vector double5874static inline __ATTRS_o_ai vector double
5041vec_nor(vector double __a, vector bool long long __b) {5875vec_nor(vector double __a, vector bool long long __b) {
5042 return (vector double)~((vector unsigned long long)__a |5876 return (vector double)~((vector unsigned long long)__a |
5043 (vector unsigned long long)__b);5877 (vector unsigned long long)__b);
5044}5878}
50455879
5880/*-- vec_orc ----------------------------------------------------------------*/
5881
5882#if __ARCH__ >= 12
5883static inline __ATTRS_o_ai vector bool char
5884vec_orc(vector bool char __a, vector bool char __b) {
5885 return __a | ~__b;
5886}
5887
5888static inline __ATTRS_o_ai vector signed char
5889vec_orc(vector signed char __a, vector signed char __b) {
5890 return __a | ~__b;
5891}
5892
5893static inline __ATTRS_o_ai vector unsigned char
5894vec_orc(vector unsigned char __a, vector unsigned char __b) {
5895 return __a | ~__b;
5896}
5897
5898static inline __ATTRS_o_ai vector bool short
5899vec_orc(vector bool short __a, vector bool short __b) {
5900 return __a | ~__b;
5901}
5902
5903static inline __ATTRS_o_ai vector signed short
5904vec_orc(vector signed short __a, vector signed short __b) {
5905 return __a | ~__b;
5906}
5907
5908static inline __ATTRS_o_ai vector unsigned short
5909vec_orc(vector unsigned short __a, vector unsigned short __b) {
5910 return __a | ~__b;
5911}
5912
5913static inline __ATTRS_o_ai vector bool int
5914vec_orc(vector bool int __a, vector bool int __b) {
5915 return __a | ~__b;
5916}
5917
5918static inline __ATTRS_o_ai vector signed int
5919vec_orc(vector signed int __a, vector signed int __b) {
5920 return __a | ~__b;
5921}
5922
5923static inline __ATTRS_o_ai vector unsigned int
5924vec_orc(vector unsigned int __a, vector unsigned int __b) {
5925 return __a | ~__b;
5926}
5927
5928static inline __ATTRS_o_ai vector bool long long
5929vec_orc(vector bool long long __a, vector bool long long __b) {
5930 return __a | ~__b;
5931}
5932
5933static inline __ATTRS_o_ai vector signed long long
5934vec_orc(vector signed long long __a, vector signed long long __b) {
5935 return __a | ~__b;
5936}
5937
5938static inline __ATTRS_o_ai vector unsigned long long
5939vec_orc(vector unsigned long long __a, vector unsigned long long __b) {
5940 return __a | ~__b;
5941}
5942
5943static inline __ATTRS_o_ai vector float
5944vec_orc(vector float __a, vector float __b) {
5945 return (vector float)((vector unsigned int)__a &
5946 ~(vector unsigned int)__b);
5947}
5948
5949static inline __ATTRS_o_ai vector double
5950vec_orc(vector double __a, vector double __b) {
5951 return (vector double)((vector unsigned long long)__a &
5952 ~(vector unsigned long long)__b);
5953}
5954#endif
5955
5956/*-- vec_nand ---------------------------------------------------------------*/
5957
5958#if __ARCH__ >= 12
5959static inline __ATTRS_o_ai vector bool char
5960vec_nand(vector bool char __a, vector bool char __b) {
5961 return ~(__a & __b);
5962}
5963
5964static inline __ATTRS_o_ai vector signed char
5965vec_nand(vector signed char __a, vector signed char __b) {
5966 return ~(__a & __b);
5967}
5968
5969static inline __ATTRS_o_ai vector unsigned char
5970vec_nand(vector unsigned char __a, vector unsigned char __b) {
5971 return ~(__a & __b);
5972}
5973
5974static inline __ATTRS_o_ai vector bool short
5975vec_nand(vector bool short __a, vector bool short __b) {
5976 return ~(__a & __b);
5977}
5978
5979static inline __ATTRS_o_ai vector signed short
5980vec_nand(vector signed short __a, vector signed short __b) {
5981 return ~(__a & __b);
5982}
5983
5984static inline __ATTRS_o_ai vector unsigned short
5985vec_nand(vector unsigned short __a, vector unsigned short __b) {
5986 return ~(__a & __b);
5987}
5988
5989static inline __ATTRS_o_ai vector bool int
5990vec_nand(vector bool int __a, vector bool int __b) {
5991 return ~(__a & __b);
5992}
5993
5994static inline __ATTRS_o_ai vector signed int
5995vec_nand(vector signed int __a, vector signed int __b) {
5996 return ~(__a & __b);
5997}
5998
5999static inline __ATTRS_o_ai vector unsigned int
6000vec_nand(vector unsigned int __a, vector unsigned int __b) {
6001 return ~(__a & __b);
6002}
6003
6004static inline __ATTRS_o_ai vector bool long long
6005vec_nand(vector bool long long __a, vector bool long long __b) {
6006 return ~(__a & __b);
6007}
6008
6009static inline __ATTRS_o_ai vector signed long long
6010vec_nand(vector signed long long __a, vector signed long long __b) {
6011 return ~(__a & __b);
6012}
6013
6014static inline __ATTRS_o_ai vector unsigned long long
6015vec_nand(vector unsigned long long __a, vector unsigned long long __b) {
6016 return ~(__a & __b);
6017}
6018
6019static inline __ATTRS_o_ai vector float
6020vec_nand(vector float __a, vector float __b) {
6021 return (vector float)~((vector unsigned int)__a &
6022 (vector unsigned int)__b);
6023}
6024
6025static inline __ATTRS_o_ai vector double
6026vec_nand(vector double __a, vector double __b) {
6027 return (vector double)~((vector unsigned long long)__a &
6028 (vector unsigned long long)__b);
6029}
6030#endif
6031
6032/*-- vec_eqv ----------------------------------------------------------------*/
6033
6034#if __ARCH__ >= 12
6035static inline __ATTRS_o_ai vector bool char
6036vec_eqv(vector bool char __a, vector bool char __b) {
6037 return ~(__a ^ __b);
6038}
6039
6040static inline __ATTRS_o_ai vector signed char
6041vec_eqv(vector signed char __a, vector signed char __b) {
6042 return ~(__a ^ __b);
6043}
6044
6045static inline __ATTRS_o_ai vector unsigned char
6046vec_eqv(vector unsigned char __a, vector unsigned char __b) {
6047 return ~(__a ^ __b);
6048}
6049
6050static inline __ATTRS_o_ai vector bool short
6051vec_eqv(vector bool short __a, vector bool short __b) {
6052 return ~(__a ^ __b);
6053}
6054
6055static inline __ATTRS_o_ai vector signed short
6056vec_eqv(vector signed short __a, vector signed short __b) {
6057 return ~(__a ^ __b);
6058}
6059
6060static inline __ATTRS_o_ai vector unsigned short
6061vec_eqv(vector unsigned short __a, vector unsigned short __b) {
6062 return ~(__a ^ __b);
6063}
6064
6065static inline __ATTRS_o_ai vector bool int
6066vec_eqv(vector bool int __a, vector bool int __b) {
6067 return ~(__a ^ __b);
6068}
6069
6070static inline __ATTRS_o_ai vector signed int
6071vec_eqv(vector signed int __a, vector signed int __b) {
6072 return ~(__a ^ __b);
6073}
6074
6075static inline __ATTRS_o_ai vector unsigned int
6076vec_eqv(vector unsigned int __a, vector unsigned int __b) {
6077 return ~(__a ^ __b);
6078}
6079
6080static inline __ATTRS_o_ai vector bool long long
6081vec_eqv(vector bool long long __a, vector bool long long __b) {
6082 return ~(__a ^ __b);
6083}
6084
6085static inline __ATTRS_o_ai vector signed long long
6086vec_eqv(vector signed long long __a, vector signed long long __b) {
6087 return ~(__a ^ __b);
6088}
6089
6090static inline __ATTRS_o_ai vector unsigned long long
6091vec_eqv(vector unsigned long long __a, vector unsigned long long __b) {
6092 return ~(__a ^ __b);
6093}
6094
6095static inline __ATTRS_o_ai vector float
6096vec_eqv(vector float __a, vector float __b) {
6097 return (vector float)~((vector unsigned int)__a ^
6098 (vector unsigned int)__b);
6099}
6100
6101static inline __ATTRS_o_ai vector double
6102vec_eqv(vector double __a, vector double __b) {
6103 return (vector double)~((vector unsigned long long)__a ^
6104 (vector unsigned long long)__b);
6105}
6106#endif
6107
5046/*-- vec_cntlz --------------------------------------------------------------*/6108/*-- vec_cntlz --------------------------------------------------------------*/
50476109
5048static inline __ATTRS_o_ai vector unsigned char6110static inline __ATTRS_o_ai vector unsigned char
...@@ -5323,30 +6385,35 @@ vec_sll(vector signed char __a, vector unsigned char __b) {...@@ -5323,30 +6385,35 @@ vec_sll(vector signed char __a, vector unsigned char __b) {
5323 (vector unsigned char)__a, __b);6385 (vector unsigned char)__a, __b);
5324}6386}
53256387
6388// This prototype is deprecated.
5326static inline __ATTRS_o_ai vector signed char6389static inline __ATTRS_o_ai vector signed char
5327vec_sll(vector signed char __a, vector unsigned short __b) {6390vec_sll(vector signed char __a, vector unsigned short __b) {
5328 return (vector signed char)__builtin_s390_vsl(6391 return (vector signed char)__builtin_s390_vsl(
5329 (vector unsigned char)__a, (vector unsigned char)__b);6392 (vector unsigned char)__a, (vector unsigned char)__b);
5330}6393}
53316394
6395// This prototype is deprecated.
5332static inline __ATTRS_o_ai vector signed char6396static inline __ATTRS_o_ai vector signed char
5333vec_sll(vector signed char __a, vector unsigned int __b) {6397vec_sll(vector signed char __a, vector unsigned int __b) {
5334 return (vector signed char)__builtin_s390_vsl(6398 return (vector signed char)__builtin_s390_vsl(
5335 (vector unsigned char)__a, (vector unsigned char)__b);6399 (vector unsigned char)__a, (vector unsigned char)__b);
5336}6400}
53376401
6402// This prototype is deprecated.
5338static inline __ATTRS_o_ai vector bool char6403static inline __ATTRS_o_ai vector bool char
5339vec_sll(vector bool char __a, vector unsigned char __b) {6404vec_sll(vector bool char __a, vector unsigned char __b) {
5340 return (vector bool char)__builtin_s390_vsl(6405 return (vector bool char)__builtin_s390_vsl(
5341 (vector unsigned char)__a, __b);6406 (vector unsigned char)__a, __b);
5342}6407}
53436408
6409// This prototype is deprecated.
5344static inline __ATTRS_o_ai vector bool char6410static inline __ATTRS_o_ai vector bool char
5345vec_sll(vector bool char __a, vector unsigned short __b) {6411vec_sll(vector bool char __a, vector unsigned short __b) {
5346 return (vector bool char)__builtin_s390_vsl(6412 return (vector bool char)__builtin_s390_vsl(
5347 (vector unsigned char)__a, (vector unsigned char)__b);6413 (vector unsigned char)__a, (vector unsigned char)__b);
5348}6414}
53496415
6416// This prototype is deprecated.
5350static inline __ATTRS_o_ai vector bool char6417static inline __ATTRS_o_ai vector bool char
5351vec_sll(vector bool char __a, vector unsigned int __b) {6418vec_sll(vector bool char __a, vector unsigned int __b) {
5352 return (vector bool char)__builtin_s390_vsl(6419 return (vector bool char)__builtin_s390_vsl(
...@@ -5358,11 +6425,13 @@ vec_sll(vector unsigned char __a, vector unsigned char __b) {...@@ -5358,11 +6425,13 @@ vec_sll(vector unsigned char __a, vector unsigned char __b) {
5358 return __builtin_s390_vsl(__a, __b);6425 return __builtin_s390_vsl(__a, __b);
5359}6426}
53606427
6428// This prototype is deprecated.
5361static inline __ATTRS_o_ai vector unsigned char6429static inline __ATTRS_o_ai vector unsigned char
5362vec_sll(vector unsigned char __a, vector unsigned short __b) {6430vec_sll(vector unsigned char __a, vector unsigned short __b) {
5363 return __builtin_s390_vsl(__a, (vector unsigned char)__b);6431 return __builtin_s390_vsl(__a, (vector unsigned char)__b);
5364}6432}
53656433
6434// This prototype is deprecated.
5366static inline __ATTRS_o_ai vector unsigned char6435static inline __ATTRS_o_ai vector unsigned char
5367vec_sll(vector unsigned char __a, vector unsigned int __b) {6436vec_sll(vector unsigned char __a, vector unsigned int __b) {
5368 return __builtin_s390_vsl(__a, (vector unsigned char)__b);6437 return __builtin_s390_vsl(__a, (vector unsigned char)__b);
...@@ -5374,30 +6443,35 @@ vec_sll(vector signed short __a, vector unsigned char __b) {...@@ -5374,30 +6443,35 @@ vec_sll(vector signed short __a, vector unsigned char __b) {
5374 (vector unsigned char)__a, __b);6443 (vector unsigned char)__a, __b);
5375}6444}
53766445
6446// This prototype is deprecated.
5377static inline __ATTRS_o_ai vector signed short6447static inline __ATTRS_o_ai vector signed short
5378vec_sll(vector signed short __a, vector unsigned short __b) {6448vec_sll(vector signed short __a, vector unsigned short __b) {
5379 return (vector signed short)__builtin_s390_vsl(6449 return (vector signed short)__builtin_s390_vsl(
5380 (vector unsigned char)__a, (vector unsigned char)__b);6450 (vector unsigned char)__a, (vector unsigned char)__b);
5381}6451}
53826452
6453// This prototype is deprecated.
5383static inline __ATTRS_o_ai vector signed short6454static inline __ATTRS_o_ai vector signed short
5384vec_sll(vector signed short __a, vector unsigned int __b) {6455vec_sll(vector signed short __a, vector unsigned int __b) {
5385 return (vector signed short)__builtin_s390_vsl(6456 return (vector signed short)__builtin_s390_vsl(
5386 (vector unsigned char)__a, (vector unsigned char)__b);6457 (vector unsigned char)__a, (vector unsigned char)__b);
5387}6458}
53886459
6460// This prototype is deprecated.
5389static inline __ATTRS_o_ai vector bool short6461static inline __ATTRS_o_ai vector bool short
5390vec_sll(vector bool short __a, vector unsigned char __b) {6462vec_sll(vector bool short __a, vector unsigned char __b) {
5391 return (vector bool short)__builtin_s390_vsl(6463 return (vector bool short)__builtin_s390_vsl(
5392 (vector unsigned char)__a, __b);6464 (vector unsigned char)__a, __b);
5393}6465}
53946466
6467// This prototype is deprecated.
5395static inline __ATTRS_o_ai vector bool short6468static inline __ATTRS_o_ai vector bool short
5396vec_sll(vector bool short __a, vector unsigned short __b) {6469vec_sll(vector bool short __a, vector unsigned short __b) {
5397 return (vector bool short)__builtin_s390_vsl(6470 return (vector bool short)__builtin_s390_vsl(
5398 (vector unsigned char)__a, (vector unsigned char)__b);6471 (vector unsigned char)__a, (vector unsigned char)__b);
5399}6472}
54006473
6474// This prototype is deprecated.
5401static inline __ATTRS_o_ai vector bool short6475static inline __ATTRS_o_ai vector bool short
5402vec_sll(vector bool short __a, vector unsigned int __b) {6476vec_sll(vector bool short __a, vector unsigned int __b) {
5403 return (vector bool short)__builtin_s390_vsl(6477 return (vector bool short)__builtin_s390_vsl(
...@@ -5410,12 +6484,14 @@ vec_sll(vector unsigned short __a, vector unsigned char __b) {...@@ -5410,12 +6484,14 @@ vec_sll(vector unsigned short __a, vector unsigned char __b) {
5410 (vector unsigned char)__a, __b);6484 (vector unsigned char)__a, __b);
5411}6485}
54126486
6487// This prototype is deprecated.
5413static inline __ATTRS_o_ai vector unsigned short6488static inline __ATTRS_o_ai vector unsigned short
5414vec_sll(vector unsigned short __a, vector unsigned short __b) {6489vec_sll(vector unsigned short __a, vector unsigned short __b) {
5415 return (vector unsigned short)__builtin_s390_vsl(6490 return (vector unsigned short)__builtin_s390_vsl(
5416 (vector unsigned char)__a, (vector unsigned char)__b);6491 (vector unsigned char)__a, (vector unsigned char)__b);
5417}6492}
54186493
6494// This prototype is deprecated.
5419static inline __ATTRS_o_ai vector unsigned short6495static inline __ATTRS_o_ai vector unsigned short
5420vec_sll(vector unsigned short __a, vector unsigned int __b) {6496vec_sll(vector unsigned short __a, vector unsigned int __b) {
5421 return (vector unsigned short)__builtin_s390_vsl(6497 return (vector unsigned short)__builtin_s390_vsl(
...@@ -5428,30 +6504,35 @@ vec_sll(vector signed int __a, vector unsigned char __b) {...@@ -5428,30 +6504,35 @@ vec_sll(vector signed int __a, vector unsigned char __b) {
5428 (vector unsigned char)__a, __b);6504 (vector unsigned char)__a, __b);
5429}6505}
54306506
6507// This prototype is deprecated.
5431static inline __ATTRS_o_ai vector signed int6508static inline __ATTRS_o_ai vector signed int
5432vec_sll(vector signed int __a, vector unsigned short __b) {6509vec_sll(vector signed int __a, vector unsigned short __b) {
5433 return (vector signed int)__builtin_s390_vsl(6510 return (vector signed int)__builtin_s390_vsl(
5434 (vector unsigned char)__a, (vector unsigned char)__b);6511 (vector unsigned char)__a, (vector unsigned char)__b);
5435}6512}
54366513
6514// This prototype is deprecated.
5437static inline __ATTRS_o_ai vector signed int6515static inline __ATTRS_o_ai vector signed int
5438vec_sll(vector signed int __a, vector unsigned int __b) {6516vec_sll(vector signed int __a, vector unsigned int __b) {
5439 return (vector signed int)__builtin_s390_vsl(6517 return (vector signed int)__builtin_s390_vsl(
5440 (vector unsigned char)__a, (vector unsigned char)__b);6518 (vector unsigned char)__a, (vector unsigned char)__b);
5441}6519}
54426520
6521// This prototype is deprecated.
5443static inline __ATTRS_o_ai vector bool int6522static inline __ATTRS_o_ai vector bool int
5444vec_sll(vector bool int __a, vector unsigned char __b) {6523vec_sll(vector bool int __a, vector unsigned char __b) {
5445 return (vector bool int)__builtin_s390_vsl(6524 return (vector bool int)__builtin_s390_vsl(
5446 (vector unsigned char)__a, __b);6525 (vector unsigned char)__a, __b);
5447}6526}
54486527
6528// This prototype is deprecated.
5449static inline __ATTRS_o_ai vector bool int6529static inline __ATTRS_o_ai vector bool int
5450vec_sll(vector bool int __a, vector unsigned short __b) {6530vec_sll(vector bool int __a, vector unsigned short __b) {
5451 return (vector bool int)__builtin_s390_vsl(6531 return (vector bool int)__builtin_s390_vsl(
5452 (vector unsigned char)__a, (vector unsigned char)__b);6532 (vector unsigned char)__a, (vector unsigned char)__b);
5453}6533}
54546534
6535// This prototype is deprecated.
5455static inline __ATTRS_o_ai vector bool int6536static inline __ATTRS_o_ai vector bool int
5456vec_sll(vector bool int __a, vector unsigned int __b) {6537vec_sll(vector bool int __a, vector unsigned int __b) {
5457 return (vector bool int)__builtin_s390_vsl(6538 return (vector bool int)__builtin_s390_vsl(
...@@ -5464,12 +6545,14 @@ vec_sll(vector unsigned int __a, vector unsigned char __b) {...@@ -5464,12 +6545,14 @@ vec_sll(vector unsigned int __a, vector unsigned char __b) {
5464 (vector unsigned char)__a, __b);6545 (vector unsigned char)__a, __b);
5465}6546}
54666547
6548// This prototype is deprecated.
5467static inline __ATTRS_o_ai vector unsigned int6549static inline __ATTRS_o_ai vector unsigned int
5468vec_sll(vector unsigned int __a, vector unsigned short __b) {6550vec_sll(vector unsigned int __a, vector unsigned short __b) {
5469 return (vector unsigned int)__builtin_s390_vsl(6551 return (vector unsigned int)__builtin_s390_vsl(
5470 (vector unsigned char)__a, (vector unsigned char)__b);6552 (vector unsigned char)__a, (vector unsigned char)__b);
5471}6553}
54726554
6555// This prototype is deprecated.
5473static inline __ATTRS_o_ai vector unsigned int6556static inline __ATTRS_o_ai vector unsigned int
5474vec_sll(vector unsigned int __a, vector unsigned int __b) {6557vec_sll(vector unsigned int __a, vector unsigned int __b) {
5475 return (vector unsigned int)__builtin_s390_vsl(6558 return (vector unsigned int)__builtin_s390_vsl(
...@@ -5482,30 +6565,35 @@ vec_sll(vector signed long long __a, vector unsigned char __b) {...@@ -5482,30 +6565,35 @@ vec_sll(vector signed long long __a, vector unsigned char __b) {
5482 (vector unsigned char)__a, __b);6565 (vector unsigned char)__a, __b);
5483}6566}
54846567
6568// This prototype is deprecated.
5485static inline __ATTRS_o_ai vector signed long long6569static inline __ATTRS_o_ai vector signed long long
5486vec_sll(vector signed long long __a, vector unsigned short __b) {6570vec_sll(vector signed long long __a, vector unsigned short __b) {
5487 return (vector signed long long)__builtin_s390_vsl(6571 return (vector signed long long)__builtin_s390_vsl(
5488 (vector unsigned char)__a, (vector unsigned char)__b);6572 (vector unsigned char)__a, (vector unsigned char)__b);
5489}6573}
54906574
6575// This prototype is deprecated.
5491static inline __ATTRS_o_ai vector signed long long6576static inline __ATTRS_o_ai vector signed long long
5492vec_sll(vector signed long long __a, vector unsigned int __b) {6577vec_sll(vector signed long long __a, vector unsigned int __b) {
5493 return (vector signed long long)__builtin_s390_vsl(6578 return (vector signed long long)__builtin_s390_vsl(
5494 (vector unsigned char)__a, (vector unsigned char)__b);6579 (vector unsigned char)__a, (vector unsigned char)__b);
5495}6580}
54966581
6582// This prototype is deprecated.
5497static inline __ATTRS_o_ai vector bool long long6583static inline __ATTRS_o_ai vector bool long long
5498vec_sll(vector bool long long __a, vector unsigned char __b) {6584vec_sll(vector bool long long __a, vector unsigned char __b) {
5499 return (vector bool long long)__builtin_s390_vsl(6585 return (vector bool long long)__builtin_s390_vsl(
5500 (vector unsigned char)__a, __b);6586 (vector unsigned char)__a, __b);
5501}6587}
55026588
6589// This prototype is deprecated.
5503static inline __ATTRS_o_ai vector bool long long6590static inline __ATTRS_o_ai vector bool long long
5504vec_sll(vector bool long long __a, vector unsigned short __b) {6591vec_sll(vector bool long long __a, vector unsigned short __b) {
5505 return (vector bool long long)__builtin_s390_vsl(6592 return (vector bool long long)__builtin_s390_vsl(
5506 (vector unsigned char)__a, (vector unsigned char)__b);6593 (vector unsigned char)__a, (vector unsigned char)__b);
5507}6594}
55086595
6596// This prototype is deprecated.
5509static inline __ATTRS_o_ai vector bool long long6597static inline __ATTRS_o_ai vector bool long long
5510vec_sll(vector bool long long __a, vector unsigned int __b) {6598vec_sll(vector bool long long __a, vector unsigned int __b) {
5511 return (vector bool long long)__builtin_s390_vsl(6599 return (vector bool long long)__builtin_s390_vsl(
...@@ -5518,12 +6606,14 @@ vec_sll(vector unsigned long long __a, vector unsigned char __b) {...@@ -5518,12 +6606,14 @@ vec_sll(vector unsigned long long __a, vector unsigned char __b) {
5518 (vector unsigned char)__a, __b);6606 (vector unsigned char)__a, __b);
5519}6607}
55206608
6609// This prototype is deprecated.
5521static inline __ATTRS_o_ai vector unsigned long long6610static inline __ATTRS_o_ai vector unsigned long long
5522vec_sll(vector unsigned long long __a, vector unsigned short __b) {6611vec_sll(vector unsigned long long __a, vector unsigned short __b) {
5523 return (vector unsigned long long)__builtin_s390_vsl(6612 return (vector unsigned long long)__builtin_s390_vsl(
5524 (vector unsigned char)__a, (vector unsigned char)__b);6613 (vector unsigned char)__a, (vector unsigned char)__b);
5525}6614}
55266615
6616// This prototype is deprecated.
5527static inline __ATTRS_o_ai vector unsigned long long6617static inline __ATTRS_o_ai vector unsigned long long
5528vec_sll(vector unsigned long long __a, vector unsigned int __b) {6618vec_sll(vector unsigned long long __a, vector unsigned int __b) {
5529 return (vector unsigned long long)__builtin_s390_vsl(6619 return (vector unsigned long long)__builtin_s390_vsl(
...@@ -5626,6 +6716,20 @@ vec_slb(vector unsigned long long __a, vector unsigned long long __b) {...@@ -5626,6 +6716,20 @@ vec_slb(vector unsigned long long __a, vector unsigned long long __b) {
5626 (vector unsigned char)__a, (vector unsigned char)__b);6716 (vector unsigned char)__a, (vector unsigned char)__b);
5627}6717}
56286718
6719#if __ARCH__ >= 12
6720static inline __ATTRS_o_ai vector float
6721vec_slb(vector float __a, vector signed int __b) {
6722 return (vector float)__builtin_s390_vslb(
6723 (vector unsigned char)__a, (vector unsigned char)__b);
6724}
6725
6726static inline __ATTRS_o_ai vector float
6727vec_slb(vector float __a, vector unsigned int __b) {
6728 return (vector float)__builtin_s390_vslb(
6729 (vector unsigned char)__a, (vector unsigned char)__b);
6730}
6731#endif
6732
5629static inline __ATTRS_o_ai vector double6733static inline __ATTRS_o_ai vector double
5630vec_slb(vector double __a, vector signed long long __b) {6734vec_slb(vector double __a, vector signed long long __b) {
5631 return (vector double)__builtin_s390_vslb(6735 return (vector double)__builtin_s390_vslb(
...@@ -5644,6 +6748,10 @@ extern __ATTRS_o vector signed char...@@ -5644,6 +6748,10 @@ extern __ATTRS_o vector signed char
5644vec_sld(vector signed char __a, vector signed char __b, int __c)6748vec_sld(vector signed char __a, vector signed char __b, int __c)
5645 __constant_range(__c, 0, 15);6749 __constant_range(__c, 0, 15);
56466750
6751extern __ATTRS_o vector bool char
6752vec_sld(vector bool char __a, vector bool char __b, int __c)
6753 __constant_range(__c, 0, 15);
6754
5647extern __ATTRS_o vector unsigned char6755extern __ATTRS_o vector unsigned char
5648vec_sld(vector unsigned char __a, vector unsigned char __b, int __c)6756vec_sld(vector unsigned char __a, vector unsigned char __b, int __c)
5649 __constant_range(__c, 0, 15);6757 __constant_range(__c, 0, 15);
...@@ -5652,6 +6760,10 @@ extern __ATTRS_o vector signed short...@@ -5652,6 +6760,10 @@ extern __ATTRS_o vector signed short
5652vec_sld(vector signed short __a, vector signed short __b, int __c)6760vec_sld(vector signed short __a, vector signed short __b, int __c)
5653 __constant_range(__c, 0, 15);6761 __constant_range(__c, 0, 15);
56546762
6763extern __ATTRS_o vector bool short
6764vec_sld(vector bool short __a, vector bool short __b, int __c)
6765 __constant_range(__c, 0, 15);
6766
5655extern __ATTRS_o vector unsigned short6767extern __ATTRS_o vector unsigned short
5656vec_sld(vector unsigned short __a, vector unsigned short __b, int __c)6768vec_sld(vector unsigned short __a, vector unsigned short __b, int __c)
5657 __constant_range(__c, 0, 15);6769 __constant_range(__c, 0, 15);
...@@ -5660,6 +6772,10 @@ extern __ATTRS_o vector signed int...@@ -5660,6 +6772,10 @@ extern __ATTRS_o vector signed int
5660vec_sld(vector signed int __a, vector signed int __b, int __c)6772vec_sld(vector signed int __a, vector signed int __b, int __c)
5661 __constant_range(__c, 0, 15);6773 __constant_range(__c, 0, 15);
56626774
6775extern __ATTRS_o vector bool int
6776vec_sld(vector bool int __a, vector bool int __b, int __c)
6777 __constant_range(__c, 0, 15);
6778
5663extern __ATTRS_o vector unsigned int6779extern __ATTRS_o vector unsigned int
5664vec_sld(vector unsigned int __a, vector unsigned int __b, int __c)6780vec_sld(vector unsigned int __a, vector unsigned int __b, int __c)
5665 __constant_range(__c, 0, 15);6781 __constant_range(__c, 0, 15);
...@@ -5668,10 +6784,20 @@ extern __ATTRS_o vector signed long long...@@ -5668,10 +6784,20 @@ extern __ATTRS_o vector signed long long
5668vec_sld(vector signed long long __a, vector signed long long __b, int __c)6784vec_sld(vector signed long long __a, vector signed long long __b, int __c)
5669 __constant_range(__c, 0, 15);6785 __constant_range(__c, 0, 15);
56706786
6787extern __ATTRS_o vector bool long long
6788vec_sld(vector bool long long __a, vector bool long long __b, int __c)
6789 __constant_range(__c, 0, 15);
6790
5671extern __ATTRS_o vector unsigned long long6791extern __ATTRS_o vector unsigned long long
5672vec_sld(vector unsigned long long __a, vector unsigned long long __b, int __c)6792vec_sld(vector unsigned long long __a, vector unsigned long long __b, int __c)
5673 __constant_range(__c, 0, 15);6793 __constant_range(__c, 0, 15);
56746794
6795#if __ARCH__ >= 12
6796extern __ATTRS_o vector float
6797vec_sld(vector float __a, vector float __b, int __c)
6798 __constant_range(__c, 0, 15);
6799#endif
6800
5675extern __ATTRS_o vector double6801extern __ATTRS_o vector double
5676vec_sld(vector double __a, vector double __b, int __c)6802vec_sld(vector double __a, vector double __b, int __c)
5677 __constant_range(__c, 0, 15);6803 __constant_range(__c, 0, 15);
...@@ -5714,6 +6840,7 @@ extern __ATTRS_o vector unsigned long long...@@ -5714,6 +6840,7 @@ extern __ATTRS_o vector unsigned long long
5714vec_sldw(vector unsigned long long __a, vector unsigned long long __b, int __c)6840vec_sldw(vector unsigned long long __a, vector unsigned long long __b, int __c)
5715 __constant_range(__c, 0, 3);6841 __constant_range(__c, 0, 3);
57166842
6843// This prototype is deprecated.
5717extern __ATTRS_o vector double6844extern __ATTRS_o vector double
5718vec_sldw(vector double __a, vector double __b, int __c)6845vec_sldw(vector double __a, vector double __b, int __c)
5719 __constant_range(__c, 0, 3);6846 __constant_range(__c, 0, 3);
...@@ -5730,30 +6857,35 @@ vec_sral(vector signed char __a, vector unsigned char __b) {...@@ -5730,30 +6857,35 @@ vec_sral(vector signed char __a, vector unsigned char __b) {
5730 (vector unsigned char)__a, __b);6857 (vector unsigned char)__a, __b);
5731}6858}
57326859
6860// This prototype is deprecated.
5733static inline __ATTRS_o_ai vector signed char6861static inline __ATTRS_o_ai vector signed char
5734vec_sral(vector signed char __a, vector unsigned short __b) {6862vec_sral(vector signed char __a, vector unsigned short __b) {
5735 return (vector signed char)__builtin_s390_vsra(6863 return (vector signed char)__builtin_s390_vsra(
5736 (vector unsigned char)__a, (vector unsigned char)__b);6864 (vector unsigned char)__a, (vector unsigned char)__b);
5737}6865}
57386866
6867// This prototype is deprecated.
5739static inline __ATTRS_o_ai vector signed char6868static inline __ATTRS_o_ai vector signed char
5740vec_sral(vector signed char __a, vector unsigned int __b) {6869vec_sral(vector signed char __a, vector unsigned int __b) {
5741 return (vector signed char)__builtin_s390_vsra(6870 return (vector signed char)__builtin_s390_vsra(
5742 (vector unsigned char)__a, (vector unsigned char)__b);6871 (vector unsigned char)__a, (vector unsigned char)__b);
5743}6872}
57446873
6874// This prototype is deprecated.
5745static inline __ATTRS_o_ai vector bool char6875static inline __ATTRS_o_ai vector bool char
5746vec_sral(vector bool char __a, vector unsigned char __b) {6876vec_sral(vector bool char __a, vector unsigned char __b) {
5747 return (vector bool char)__builtin_s390_vsra(6877 return (vector bool char)__builtin_s390_vsra(
5748 (vector unsigned char)__a, __b);6878 (vector unsigned char)__a, __b);
5749}6879}
57506880
6881// This prototype is deprecated.
5751static inline __ATTRS_o_ai vector bool char6882static inline __ATTRS_o_ai vector bool char
5752vec_sral(vector bool char __a, vector unsigned short __b) {6883vec_sral(vector bool char __a, vector unsigned short __b) {
5753 return (vector bool char)__builtin_s390_vsra(6884 return (vector bool char)__builtin_s390_vsra(
5754 (vector unsigned char)__a, (vector unsigned char)__b);6885 (vector unsigned char)__a, (vector unsigned char)__b);
5755}6886}
57566887
6888// This prototype is deprecated.
5757static inline __ATTRS_o_ai vector bool char6889static inline __ATTRS_o_ai vector bool char
5758vec_sral(vector bool char __a, vector unsigned int __b) {6890vec_sral(vector bool char __a, vector unsigned int __b) {
5759 return (vector bool char)__builtin_s390_vsra(6891 return (vector bool char)__builtin_s390_vsra(
...@@ -5765,11 +6897,13 @@ vec_sral(vector unsigned char __a, vector unsigned char __b) {...@@ -5765,11 +6897,13 @@ vec_sral(vector unsigned char __a, vector unsigned char __b) {
5765 return __builtin_s390_vsra(__a, __b);6897 return __builtin_s390_vsra(__a, __b);
5766}6898}
57676899
6900// This prototype is deprecated.
5768static inline __ATTRS_o_ai vector unsigned char6901static inline __ATTRS_o_ai vector unsigned char
5769vec_sral(vector unsigned char __a, vector unsigned short __b) {6902vec_sral(vector unsigned char __a, vector unsigned short __b) {
5770 return __builtin_s390_vsra(__a, (vector unsigned char)__b);6903 return __builtin_s390_vsra(__a, (vector unsigned char)__b);
5771}6904}
57726905
6906// This prototype is deprecated.
5773static inline __ATTRS_o_ai vector unsigned char6907static inline __ATTRS_o_ai vector unsigned char
5774vec_sral(vector unsigned char __a, vector unsigned int __b) {6908vec_sral(vector unsigned char __a, vector unsigned int __b) {
5775 return __builtin_s390_vsra(__a, (vector unsigned char)__b);6909 return __builtin_s390_vsra(__a, (vector unsigned char)__b);
...@@ -5781,30 +6915,35 @@ vec_sral(vector signed short __a, vector unsigned char __b) {...@@ -5781,30 +6915,35 @@ vec_sral(vector signed short __a, vector unsigned char __b) {
5781 (vector unsigned char)__a, __b);6915 (vector unsigned char)__a, __b);
5782}6916}
57836917
6918// This prototype is deprecated.
5784static inline __ATTRS_o_ai vector signed short6919static inline __ATTRS_o_ai vector signed short
5785vec_sral(vector signed short __a, vector unsigned short __b) {6920vec_sral(vector signed short __a, vector unsigned short __b) {
5786 return (vector signed short)__builtin_s390_vsra(6921 return (vector signed short)__builtin_s390_vsra(
5787 (vector unsigned char)__a, (vector unsigned char)__b);6922 (vector unsigned char)__a, (vector unsigned char)__b);
5788}6923}
57896924
6925// This prototype is deprecated.
5790static inline __ATTRS_o_ai vector signed short6926static inline __ATTRS_o_ai vector signed short
5791vec_sral(vector signed short __a, vector unsigned int __b) {6927vec_sral(vector signed short __a, vector unsigned int __b) {
5792 return (vector signed short)__builtin_s390_vsra(6928 return (vector signed short)__builtin_s390_vsra(
5793 (vector unsigned char)__a, (vector unsigned char)__b);6929 (vector unsigned char)__a, (vector unsigned char)__b);
5794}6930}
57956931
6932// This prototype is deprecated.
5796static inline __ATTRS_o_ai vector bool short6933static inline __ATTRS_o_ai vector bool short
5797vec_sral(vector bool short __a, vector unsigned char __b) {6934vec_sral(vector bool short __a, vector unsigned char __b) {
5798 return (vector bool short)__builtin_s390_vsra(6935 return (vector bool short)__builtin_s390_vsra(
5799 (vector unsigned char)__a, __b);6936 (vector unsigned char)__a, __b);
5800}6937}
58016938
6939// This prototype is deprecated.
5802static inline __ATTRS_o_ai vector bool short6940static inline __ATTRS_o_ai vector bool short
5803vec_sral(vector bool short __a, vector unsigned short __b) {6941vec_sral(vector bool short __a, vector unsigned short __b) {
5804 return (vector bool short)__builtin_s390_vsra(6942 return (vector bool short)__builtin_s390_vsra(
5805 (vector unsigned char)__a, (vector unsigned char)__b);6943 (vector unsigned char)__a, (vector unsigned char)__b);
5806}6944}
58076945
6946// This prototype is deprecated.
5808static inline __ATTRS_o_ai vector bool short6947static inline __ATTRS_o_ai vector bool short
5809vec_sral(vector bool short __a, vector unsigned int __b) {6948vec_sral(vector bool short __a, vector unsigned int __b) {
5810 return (vector bool short)__builtin_s390_vsra(6949 return (vector bool short)__builtin_s390_vsra(
...@@ -5817,12 +6956,14 @@ vec_sral(vector unsigned short __a, vector unsigned char __b) {...@@ -5817,12 +6956,14 @@ vec_sral(vector unsigned short __a, vector unsigned char __b) {
5817 (vector unsigned char)__a, __b);6956 (vector unsigned char)__a, __b);
5818}6957}
58196958
6959// This prototype is deprecated.
5820static inline __ATTRS_o_ai vector unsigned short6960static inline __ATTRS_o_ai vector unsigned short
5821vec_sral(vector unsigned short __a, vector unsigned short __b) {6961vec_sral(vector unsigned short __a, vector unsigned short __b) {
5822 return (vector unsigned short)__builtin_s390_vsra(6962 return (vector unsigned short)__builtin_s390_vsra(
5823 (vector unsigned char)__a, (vector unsigned char)__b);6963 (vector unsigned char)__a, (vector unsigned char)__b);
5824}6964}
58256965
6966// This prototype is deprecated.
5826static inline __ATTRS_o_ai vector unsigned short6967static inline __ATTRS_o_ai vector unsigned short
5827vec_sral(vector unsigned short __a, vector unsigned int __b) {6968vec_sral(vector unsigned short __a, vector unsigned int __b) {
5828 return (vector unsigned short)__builtin_s390_vsra(6969 return (vector unsigned short)__builtin_s390_vsra(
...@@ -5835,30 +6976,35 @@ vec_sral(vector signed int __a, vector unsigned char __b) {...@@ -5835,30 +6976,35 @@ vec_sral(vector signed int __a, vector unsigned char __b) {
5835 (vector unsigned char)__a, __b);6976 (vector unsigned char)__a, __b);
5836}6977}
58376978
6979// This prototype is deprecated.
5838static inline __ATTRS_o_ai vector signed int6980static inline __ATTRS_o_ai vector signed int
5839vec_sral(vector signed int __a, vector unsigned short __b) {6981vec_sral(vector signed int __a, vector unsigned short __b) {
5840 return (vector signed int)__builtin_s390_vsra(6982 return (vector signed int)__builtin_s390_vsra(
5841 (vector unsigned char)__a, (vector unsigned char)__b);6983 (vector unsigned char)__a, (vector unsigned char)__b);
5842}6984}
58436985
6986// This prototype is deprecated.
5844static inline __ATTRS_o_ai vector signed int6987static inline __ATTRS_o_ai vector signed int
5845vec_sral(vector signed int __a, vector unsigned int __b) {6988vec_sral(vector signed int __a, vector unsigned int __b) {
5846 return (vector signed int)__builtin_s390_vsra(6989 return (vector signed int)__builtin_s390_vsra(
5847 (vector unsigned char)__a, (vector unsigned char)__b);6990 (vector unsigned char)__a, (vector unsigned char)__b);
5848}6991}
58496992
6993// This prototype is deprecated.
5850static inline __ATTRS_o_ai vector bool int6994static inline __ATTRS_o_ai vector bool int
5851vec_sral(vector bool int __a, vector unsigned char __b) {6995vec_sral(vector bool int __a, vector unsigned char __b) {
5852 return (vector bool int)__builtin_s390_vsra(6996 return (vector bool int)__builtin_s390_vsra(
5853 (vector unsigned char)__a, __b);6997 (vector unsigned char)__a, __b);
5854}6998}
58556999
7000// This prototype is deprecated.
5856static inline __ATTRS_o_ai vector bool int7001static inline __ATTRS_o_ai vector bool int
5857vec_sral(vector bool int __a, vector unsigned short __b) {7002vec_sral(vector bool int __a, vector unsigned short __b) {
5858 return (vector bool int)__builtin_s390_vsra(7003 return (vector bool int)__builtin_s390_vsra(
5859 (vector unsigned char)__a, (vector unsigned char)__b);7004 (vector unsigned char)__a, (vector unsigned char)__b);
5860}7005}
58617006
7007// This prototype is deprecated.
5862static inline __ATTRS_o_ai vector bool int7008static inline __ATTRS_o_ai vector bool int
5863vec_sral(vector bool int __a, vector unsigned int __b) {7009vec_sral(vector bool int __a, vector unsigned int __b) {
5864 return (vector bool int)__builtin_s390_vsra(7010 return (vector bool int)__builtin_s390_vsra(
...@@ -5871,12 +7017,14 @@ vec_sral(vector unsigned int __a, vector unsigned char __b) {...@@ -5871,12 +7017,14 @@ vec_sral(vector unsigned int __a, vector unsigned char __b) {
5871 (vector unsigned char)__a, __b);7017 (vector unsigned char)__a, __b);
5872}7018}
58737019
7020// This prototype is deprecated.
5874static inline __ATTRS_o_ai vector unsigned int7021static inline __ATTRS_o_ai vector unsigned int
5875vec_sral(vector unsigned int __a, vector unsigned short __b) {7022vec_sral(vector unsigned int __a, vector unsigned short __b) {
5876 return (vector unsigned int)__builtin_s390_vsra(7023 return (vector unsigned int)__builtin_s390_vsra(
5877 (vector unsigned char)__a, (vector unsigned char)__b);7024 (vector unsigned char)__a, (vector unsigned char)__b);
5878}7025}
58797026
7027// This prototype is deprecated.
5880static inline __ATTRS_o_ai vector unsigned int7028static inline __ATTRS_o_ai vector unsigned int
5881vec_sral(vector unsigned int __a, vector unsigned int __b) {7029vec_sral(vector unsigned int __a, vector unsigned int __b) {
5882 return (vector unsigned int)__builtin_s390_vsra(7030 return (vector unsigned int)__builtin_s390_vsra(
...@@ -5889,30 +7037,35 @@ vec_sral(vector signed long long __a, vector unsigned char __b) {...@@ -5889,30 +7037,35 @@ vec_sral(vector signed long long __a, vector unsigned char __b) {
5889 (vector unsigned char)__a, __b);7037 (vector unsigned char)__a, __b);
5890}7038}
58917039
7040// This prototype is deprecated.
5892static inline __ATTRS_o_ai vector signed long long7041static inline __ATTRS_o_ai vector signed long long
5893vec_sral(vector signed long long __a, vector unsigned short __b) {7042vec_sral(vector signed long long __a, vector unsigned short __b) {
5894 return (vector signed long long)__builtin_s390_vsra(7043 return (vector signed long long)__builtin_s390_vsra(
5895 (vector unsigned char)__a, (vector unsigned char)__b);7044 (vector unsigned char)__a, (vector unsigned char)__b);
5896}7045}
58977046
7047// This prototype is deprecated.
5898static inline __ATTRS_o_ai vector signed long long7048static inline __ATTRS_o_ai vector signed long long
5899vec_sral(vector signed long long __a, vector unsigned int __b) {7049vec_sral(vector signed long long __a, vector unsigned int __b) {
5900 return (vector signed long long)__builtin_s390_vsra(7050 return (vector signed long long)__builtin_s390_vsra(
5901 (vector unsigned char)__a, (vector unsigned char)__b);7051 (vector unsigned char)__a, (vector unsigned char)__b);
5902}7052}
59037053
7054// This prototype is deprecated.
5904static inline __ATTRS_o_ai vector bool long long7055static inline __ATTRS_o_ai vector bool long long
5905vec_sral(vector bool long long __a, vector unsigned char __b) {7056vec_sral(vector bool long long __a, vector unsigned char __b) {
5906 return (vector bool long long)__builtin_s390_vsra(7057 return (vector bool long long)__builtin_s390_vsra(
5907 (vector unsigned char)__a, __b);7058 (vector unsigned char)__a, __b);
5908}7059}
59097060
7061// This prototype is deprecated.
5910static inline __ATTRS_o_ai vector bool long long7062static inline __ATTRS_o_ai vector bool long long
5911vec_sral(vector bool long long __a, vector unsigned short __b) {7063vec_sral(vector bool long long __a, vector unsigned short __b) {
5912 return (vector bool long long)__builtin_s390_vsra(7064 return (vector bool long long)__builtin_s390_vsra(
5913 (vector unsigned char)__a, (vector unsigned char)__b);7065 (vector unsigned char)__a, (vector unsigned char)__b);
5914}7066}
59157067
7068// This prototype is deprecated.
5916static inline __ATTRS_o_ai vector bool long long7069static inline __ATTRS_o_ai vector bool long long
5917vec_sral(vector bool long long __a, vector unsigned int __b) {7070vec_sral(vector bool long long __a, vector unsigned int __b) {
5918 return (vector bool long long)__builtin_s390_vsra(7071 return (vector bool long long)__builtin_s390_vsra(
...@@ -5925,12 +7078,14 @@ vec_sral(vector unsigned long long __a, vector unsigned char __b) {...@@ -5925,12 +7078,14 @@ vec_sral(vector unsigned long long __a, vector unsigned char __b) {
5925 (vector unsigned char)__a, __b);7078 (vector unsigned char)__a, __b);
5926}7079}
59277080
7081// This prototype is deprecated.
5928static inline __ATTRS_o_ai vector unsigned long long7082static inline __ATTRS_o_ai vector unsigned long long
5929vec_sral(vector unsigned long long __a, vector unsigned short __b) {7083vec_sral(vector unsigned long long __a, vector unsigned short __b) {
5930 return (vector unsigned long long)__builtin_s390_vsra(7084 return (vector unsigned long long)__builtin_s390_vsra(
5931 (vector unsigned char)__a, (vector unsigned char)__b);7085 (vector unsigned char)__a, (vector unsigned char)__b);
5932}7086}
59337087
7088// This prototype is deprecated.
5934static inline __ATTRS_o_ai vector unsigned long long7089static inline __ATTRS_o_ai vector unsigned long long
5935vec_sral(vector unsigned long long __a, vector unsigned int __b) {7090vec_sral(vector unsigned long long __a, vector unsigned int __b) {
5936 return (vector unsigned long long)__builtin_s390_vsra(7091 return (vector unsigned long long)__builtin_s390_vsra(
...@@ -6033,6 +7188,20 @@ vec_srab(vector unsigned long long __a, vector unsigned long long __b) {...@@ -6033,6 +7188,20 @@ vec_srab(vector unsigned long long __a, vector unsigned long long __b) {
6033 (vector unsigned char)__a, (vector unsigned char)__b);7188 (vector unsigned char)__a, (vector unsigned char)__b);
6034}7189}
60357190
7191#if __ARCH__ >= 12
7192static inline __ATTRS_o_ai vector float
7193vec_srab(vector float __a, vector signed int __b) {
7194 return (vector float)__builtin_s390_vsrab(
7195 (vector unsigned char)__a, (vector unsigned char)__b);
7196}
7197
7198static inline __ATTRS_o_ai vector float
7199vec_srab(vector float __a, vector unsigned int __b) {
7200 return (vector float)__builtin_s390_vsrab(
7201 (vector unsigned char)__a, (vector unsigned char)__b);
7202}
7203#endif
7204
6036static inline __ATTRS_o_ai vector double7205static inline __ATTRS_o_ai vector double
6037vec_srab(vector double __a, vector signed long long __b) {7206vec_srab(vector double __a, vector signed long long __b) {
6038 return (vector double)__builtin_s390_vsrab(7207 return (vector double)__builtin_s390_vsrab(
...@@ -6053,30 +7222,35 @@ vec_srl(vector signed char __a, vector unsigned char __b) {...@@ -6053,30 +7222,35 @@ vec_srl(vector signed char __a, vector unsigned char __b) {
6053 (vector unsigned char)__a, __b);7222 (vector unsigned char)__a, __b);
6054}7223}
60557224
7225// This prototype is deprecated.
6056static inline __ATTRS_o_ai vector signed char7226static inline __ATTRS_o_ai vector signed char
6057vec_srl(vector signed char __a, vector unsigned short __b) {7227vec_srl(vector signed char __a, vector unsigned short __b) {
6058 return (vector signed char)__builtin_s390_vsrl(7228 return (vector signed char)__builtin_s390_vsrl(
6059 (vector unsigned char)__a, (vector unsigned char)__b);7229 (vector unsigned char)__a, (vector unsigned char)__b);
6060}7230}
60617231
7232// This prototype is deprecated.
6062static inline __ATTRS_o_ai vector signed char7233static inline __ATTRS_o_ai vector signed char
6063vec_srl(vector signed char __a, vector unsigned int __b) {7234vec_srl(vector signed char __a, vector unsigned int __b) {
6064 return (vector signed char)__builtin_s390_vsrl(7235 return (vector signed char)__builtin_s390_vsrl(
6065 (vector unsigned char)__a, (vector unsigned char)__b);7236 (vector unsigned char)__a, (vector unsigned char)__b);
6066}7237}
60677238
7239// This prototype is deprecated.
6068static inline __ATTRS_o_ai vector bool char7240static inline __ATTRS_o_ai vector bool char
6069vec_srl(vector bool char __a, vector unsigned char __b) {7241vec_srl(vector bool char __a, vector unsigned char __b) {
6070 return (vector bool char)__builtin_s390_vsrl(7242 return (vector bool char)__builtin_s390_vsrl(
6071 (vector unsigned char)__a, __b);7243 (vector unsigned char)__a, __b);
6072}7244}
60737245
7246// This prototype is deprecated.
6074static inline __ATTRS_o_ai vector bool char7247static inline __ATTRS_o_ai vector bool char
6075vec_srl(vector bool char __a, vector unsigned short __b) {7248vec_srl(vector bool char __a, vector unsigned short __b) {
6076 return (vector bool char)__builtin_s390_vsrl(7249 return (vector bool char)__builtin_s390_vsrl(
6077 (vector unsigned char)__a, (vector unsigned char)__b);7250 (vector unsigned char)__a, (vector unsigned char)__b);
6078}7251}
60797252
7253// This prototype is deprecated.
6080static inline __ATTRS_o_ai vector bool char7254static inline __ATTRS_o_ai vector bool char
6081vec_srl(vector bool char __a, vector unsigned int __b) {7255vec_srl(vector bool char __a, vector unsigned int __b) {
6082 return (vector bool char)__builtin_s390_vsrl(7256 return (vector bool char)__builtin_s390_vsrl(
...@@ -6088,11 +7262,13 @@ vec_srl(vector unsigned char __a, vector unsigned char __b) {...@@ -6088,11 +7262,13 @@ vec_srl(vector unsigned char __a, vector unsigned char __b) {
6088 return __builtin_s390_vsrl(__a, __b);7262 return __builtin_s390_vsrl(__a, __b);
6089}7263}
60907264
7265// This prototype is deprecated.
6091static inline __ATTRS_o_ai vector unsigned char7266static inline __ATTRS_o_ai vector unsigned char
6092vec_srl(vector unsigned char __a, vector unsigned short __b) {7267vec_srl(vector unsigned char __a, vector unsigned short __b) {
6093 return __builtin_s390_vsrl(__a, (vector unsigned char)__b);7268 return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
6094}7269}
60957270
7271// This prototype is deprecated.
6096static inline __ATTRS_o_ai vector unsigned char7272static inline __ATTRS_o_ai vector unsigned char
6097vec_srl(vector unsigned char __a, vector unsigned int __b) {7273vec_srl(vector unsigned char __a, vector unsigned int __b) {
6098 return __builtin_s390_vsrl(__a, (vector unsigned char)__b);7274 return __builtin_s390_vsrl(__a, (vector unsigned char)__b);
...@@ -6104,30 +7280,35 @@ vec_srl(vector signed short __a, vector unsigned char __b) {...@@ -6104,30 +7280,35 @@ vec_srl(vector signed short __a, vector unsigned char __b) {
6104 (vector unsigned char)__a, __b);7280 (vector unsigned char)__a, __b);
6105}7281}
61067282
7283// This prototype is deprecated.
6107static inline __ATTRS_o_ai vector signed short7284static inline __ATTRS_o_ai vector signed short
6108vec_srl(vector signed short __a, vector unsigned short __b) {7285vec_srl(vector signed short __a, vector unsigned short __b) {
6109 return (vector signed short)__builtin_s390_vsrl(7286 return (vector signed short)__builtin_s390_vsrl(
6110 (vector unsigned char)__a, (vector unsigned char)__b);7287 (vector unsigned char)__a, (vector unsigned char)__b);
6111}7288}
61127289
7290// This prototype is deprecated.
6113static inline __ATTRS_o_ai vector signed short7291static inline __ATTRS_o_ai vector signed short
6114vec_srl(vector signed short __a, vector unsigned int __b) {7292vec_srl(vector signed short __a, vector unsigned int __b) {
6115 return (vector signed short)__builtin_s390_vsrl(7293 return (vector signed short)__builtin_s390_vsrl(
6116 (vector unsigned char)__a, (vector unsigned char)__b);7294 (vector unsigned char)__a, (vector unsigned char)__b);
6117}7295}
61187296
7297// This prototype is deprecated.
6119static inline __ATTRS_o_ai vector bool short7298static inline __ATTRS_o_ai vector bool short
6120vec_srl(vector bool short __a, vector unsigned char __b) {7299vec_srl(vector bool short __a, vector unsigned char __b) {
6121 return (vector bool short)__builtin_s390_vsrl(7300 return (vector bool short)__builtin_s390_vsrl(
6122 (vector unsigned char)__a, __b);7301 (vector unsigned char)__a, __b);
6123}7302}
61247303
7304// This prototype is deprecated.
6125static inline __ATTRS_o_ai vector bool short7305static inline __ATTRS_o_ai vector bool short
6126vec_srl(vector bool short __a, vector unsigned short __b) {7306vec_srl(vector bool short __a, vector unsigned short __b) {
6127 return (vector bool short)__builtin_s390_vsrl(7307 return (vector bool short)__builtin_s390_vsrl(
6128 (vector unsigned char)__a, (vector unsigned char)__b);7308 (vector unsigned char)__a, (vector unsigned char)__b);
6129}7309}
61307310
7311// This prototype is deprecated.
6131static inline __ATTRS_o_ai vector bool short7312static inline __ATTRS_o_ai vector bool short
6132vec_srl(vector bool short __a, vector unsigned int __b) {7313vec_srl(vector bool short __a, vector unsigned int __b) {
6133 return (vector bool short)__builtin_s390_vsrl(7314 return (vector bool short)__builtin_s390_vsrl(
...@@ -6140,12 +7321,14 @@ vec_srl(vector unsigned short __a, vector unsigned char __b) {...@@ -6140,12 +7321,14 @@ vec_srl(vector unsigned short __a, vector unsigned char __b) {
6140 (vector unsigned char)__a, __b);7321 (vector unsigned char)__a, __b);
6141}7322}
61427323
7324// This prototype is deprecated.
6143static inline __ATTRS_o_ai vector unsigned short7325static inline __ATTRS_o_ai vector unsigned short
6144vec_srl(vector unsigned short __a, vector unsigned short __b) {7326vec_srl(vector unsigned short __a, vector unsigned short __b) {
6145 return (vector unsigned short)__builtin_s390_vsrl(7327 return (vector unsigned short)__builtin_s390_vsrl(
6146 (vector unsigned char)__a, (vector unsigned char)__b);7328 (vector unsigned char)__a, (vector unsigned char)__b);
6147}7329}
61487330
7331// This prototype is deprecated.
6149static inline __ATTRS_o_ai vector unsigned short7332static inline __ATTRS_o_ai vector unsigned short
6150vec_srl(vector unsigned short __a, vector unsigned int __b) {7333vec_srl(vector unsigned short __a, vector unsigned int __b) {
6151 return (vector unsigned short)__builtin_s390_vsrl(7334 return (vector unsigned short)__builtin_s390_vsrl(
...@@ -6158,30 +7341,35 @@ vec_srl(vector signed int __a, vector unsigned char __b) {...@@ -6158,30 +7341,35 @@ vec_srl(vector signed int __a, vector unsigned char __b) {
6158 (vector unsigned char)__a, __b);7341 (vector unsigned char)__a, __b);
6159}7342}
61607343
7344// This prototype is deprecated.
6161static inline __ATTRS_o_ai vector signed int7345static inline __ATTRS_o_ai vector signed int
6162vec_srl(vector signed int __a, vector unsigned short __b) {7346vec_srl(vector signed int __a, vector unsigned short __b) {
6163 return (vector signed int)__builtin_s390_vsrl(7347 return (vector signed int)__builtin_s390_vsrl(
6164 (vector unsigned char)__a, (vector unsigned char)__b);7348 (vector unsigned char)__a, (vector unsigned char)__b);
6165}7349}
61667350
7351// This prototype is deprecated.
6167static inline __ATTRS_o_ai vector signed int7352static inline __ATTRS_o_ai vector signed int
6168vec_srl(vector signed int __a, vector unsigned int __b) {7353vec_srl(vector signed int __a, vector unsigned int __b) {
6169 return (vector signed int)__builtin_s390_vsrl(7354 return (vector signed int)__builtin_s390_vsrl(
6170 (vector unsigned char)__a, (vector unsigned char)__b);7355 (vector unsigned char)__a, (vector unsigned char)__b);
6171}7356}
61727357
7358// This prototype is deprecated.
6173static inline __ATTRS_o_ai vector bool int7359static inline __ATTRS_o_ai vector bool int
6174vec_srl(vector bool int __a, vector unsigned char __b) {7360vec_srl(vector bool int __a, vector unsigned char __b) {
6175 return (vector bool int)__builtin_s390_vsrl(7361 return (vector bool int)__builtin_s390_vsrl(
6176 (vector unsigned char)__a, __b);7362 (vector unsigned char)__a, __b);
6177}7363}
61787364
7365// This prototype is deprecated.
6179static inline __ATTRS_o_ai vector bool int7366static inline __ATTRS_o_ai vector bool int
6180vec_srl(vector bool int __a, vector unsigned short __b) {7367vec_srl(vector bool int __a, vector unsigned short __b) {
6181 return (vector bool int)__builtin_s390_vsrl(7368 return (vector bool int)__builtin_s390_vsrl(
6182 (vector unsigned char)__a, (vector unsigned char)__b);7369 (vector unsigned char)__a, (vector unsigned char)__b);
6183}7370}
61847371
7372// This prototype is deprecated.
6185static inline __ATTRS_o_ai vector bool int7373static inline __ATTRS_o_ai vector bool int
6186vec_srl(vector bool int __a, vector unsigned int __b) {7374vec_srl(vector bool int __a, vector unsigned int __b) {
6187 return (vector bool int)__builtin_s390_vsrl(7375 return (vector bool int)__builtin_s390_vsrl(
...@@ -6194,12 +7382,14 @@ vec_srl(vector unsigned int __a, vector unsigned char __b) {...@@ -6194,12 +7382,14 @@ vec_srl(vector unsigned int __a, vector unsigned char __b) {
6194 (vector unsigned char)__a, __b);7382 (vector unsigned char)__a, __b);
6195}7383}
61967384
7385// This prototype is deprecated.
6197static inline __ATTRS_o_ai vector unsigned int7386static inline __ATTRS_o_ai vector unsigned int
6198vec_srl(vector unsigned int __a, vector unsigned short __b) {7387vec_srl(vector unsigned int __a, vector unsigned short __b) {
6199 return (vector unsigned int)__builtin_s390_vsrl(7388 return (vector unsigned int)__builtin_s390_vsrl(
6200 (vector unsigned char)__a, (vector unsigned char)__b);7389 (vector unsigned char)__a, (vector unsigned char)__b);
6201}7390}
62027391
7392// This prototype is deprecated.
6203static inline __ATTRS_o_ai vector unsigned int7393static inline __ATTRS_o_ai vector unsigned int
6204vec_srl(vector unsigned int __a, vector unsigned int __b) {7394vec_srl(vector unsigned int __a, vector unsigned int __b) {
6205 return (vector unsigned int)__builtin_s390_vsrl(7395 return (vector unsigned int)__builtin_s390_vsrl(
...@@ -6212,30 +7402,35 @@ vec_srl(vector signed long long __a, vector unsigned char __b) {...@@ -6212,30 +7402,35 @@ vec_srl(vector signed long long __a, vector unsigned char __b) {
6212 (vector unsigned char)__a, __b);7402 (vector unsigned char)__a, __b);
6213}7403}
62147404
7405// This prototype is deprecated.
6215static inline __ATTRS_o_ai vector signed long long7406static inline __ATTRS_o_ai vector signed long long
6216vec_srl(vector signed long long __a, vector unsigned short __b) {7407vec_srl(vector signed long long __a, vector unsigned short __b) {
6217 return (vector signed long long)__builtin_s390_vsrl(7408 return (vector signed long long)__builtin_s390_vsrl(
6218 (vector unsigned char)__a, (vector unsigned char)__b);7409 (vector unsigned char)__a, (vector unsigned char)__b);
6219}7410}
62207411
7412// This prototype is deprecated.
6221static inline __ATTRS_o_ai vector signed long long7413static inline __ATTRS_o_ai vector signed long long
6222vec_srl(vector signed long long __a, vector unsigned int __b) {7414vec_srl(vector signed long long __a, vector unsigned int __b) {
6223 return (vector signed long long)__builtin_s390_vsrl(7415 return (vector signed long long)__builtin_s390_vsrl(
6224 (vector unsigned char)__a, (vector unsigned char)__b);7416 (vector unsigned char)__a, (vector unsigned char)__b);
6225}7417}
62267418
7419// This prototype is deprecated.
6227static inline __ATTRS_o_ai vector bool long long7420static inline __ATTRS_o_ai vector bool long long
6228vec_srl(vector bool long long __a, vector unsigned char __b) {7421vec_srl(vector bool long long __a, vector unsigned char __b) {
6229 return (vector bool long long)__builtin_s390_vsrl(7422 return (vector bool long long)__builtin_s390_vsrl(
6230 (vector unsigned char)__a, __b);7423 (vector unsigned char)__a, __b);
6231}7424}
62327425
7426// This prototype is deprecated.
6233static inline __ATTRS_o_ai vector bool long long7427static inline __ATTRS_o_ai vector bool long long
6234vec_srl(vector bool long long __a, vector unsigned short __b) {7428vec_srl(vector bool long long __a, vector unsigned short __b) {
6235 return (vector bool long long)__builtin_s390_vsrl(7429 return (vector bool long long)__builtin_s390_vsrl(
6236 (vector unsigned char)__a, (vector unsigned char)__b);7430 (vector unsigned char)__a, (vector unsigned char)__b);
6237}7431}
62387432
7433// This prototype is deprecated.
6239static inline __ATTRS_o_ai vector bool long long7434static inline __ATTRS_o_ai vector bool long long
6240vec_srl(vector bool long long __a, vector unsigned int __b) {7435vec_srl(vector bool long long __a, vector unsigned int __b) {
6241 return (vector bool long long)__builtin_s390_vsrl(7436 return (vector bool long long)__builtin_s390_vsrl(
...@@ -6248,12 +7443,14 @@ vec_srl(vector unsigned long long __a, vector unsigned char __b) {...@@ -6248,12 +7443,14 @@ vec_srl(vector unsigned long long __a, vector unsigned char __b) {
6248 (vector unsigned char)__a, __b);7443 (vector unsigned char)__a, __b);
6249}7444}
62507445
7446// This prototype is deprecated.
6251static inline __ATTRS_o_ai vector unsigned long long7447static inline __ATTRS_o_ai vector unsigned long long
6252vec_srl(vector unsigned long long __a, vector unsigned short __b) {7448vec_srl(vector unsigned long long __a, vector unsigned short __b) {
6253 return (vector unsigned long long)__builtin_s390_vsrl(7449 return (vector unsigned long long)__builtin_s390_vsrl(
6254 (vector unsigned char)__a, (vector unsigned char)__b);7450 (vector unsigned char)__a, (vector unsigned char)__b);
6255}7451}
62567452
7453// This prototype is deprecated.
6257static inline __ATTRS_o_ai vector unsigned long long7454static inline __ATTRS_o_ai vector unsigned long long
6258vec_srl(vector unsigned long long __a, vector unsigned int __b) {7455vec_srl(vector unsigned long long __a, vector unsigned int __b) {
6259 return (vector unsigned long long)__builtin_s390_vsrl(7456 return (vector unsigned long long)__builtin_s390_vsrl(
...@@ -6356,6 +7553,20 @@ vec_srb(vector unsigned long long __a, vector unsigned long long __b) {...@@ -6356,6 +7553,20 @@ vec_srb(vector unsigned long long __a, vector unsigned long long __b) {
6356 (vector unsigned char)__a, (vector unsigned char)__b);7553 (vector unsigned char)__a, (vector unsigned char)__b);
6357}7554}
63587555
7556#if __ARCH__ >= 12
7557static inline __ATTRS_o_ai vector float
7558vec_srb(vector float __a, vector signed int __b) {
7559 return (vector float)__builtin_s390_vsrlb(
7560 (vector unsigned char)__a, (vector unsigned char)__b);
7561}
7562
7563static inline __ATTRS_o_ai vector float
7564vec_srb(vector float __a, vector unsigned int __b) {
7565 return (vector float)__builtin_s390_vsrlb(
7566 (vector unsigned char)__a, (vector unsigned char)__b);
7567}
7568#endif
7569
6359static inline __ATTRS_o_ai vector double7570static inline __ATTRS_o_ai vector double
6360vec_srb(vector double __a, vector signed long long __b) {7571vec_srb(vector double __a, vector signed long long __b) {
6361 return (vector double)__builtin_s390_vsrlb(7572 return (vector double)__builtin_s390_vsrlb(
...@@ -6390,6 +7601,13 @@ vec_abs(vector signed long long __a) {...@@ -6390,6 +7601,13 @@ vec_abs(vector signed long long __a) {
6390 return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed long long)0));7601 return vec_sel(__a, -__a, vec_cmplt(__a, (vector signed long long)0));
6391}7602}
63927603
7604#if __ARCH__ >= 12
7605static inline __ATTRS_o_ai vector float
7606vec_abs(vector float __a) {
7607 return __builtin_s390_vflpsb(__a);
7608}
7609#endif
7610
6393static inline __ATTRS_o_ai vector double7611static inline __ATTRS_o_ai vector double
6394vec_abs(vector double __a) {7612vec_abs(vector double __a) {
6395 return __builtin_s390_vflpdb(__a);7613 return __builtin_s390_vflpdb(__a);
...@@ -6397,7 +7615,14 @@ vec_abs(vector double __a) {...@@ -6397,7 +7615,14 @@ vec_abs(vector double __a) {
63977615
6398/*-- vec_nabs ---------------------------------------------------------------*/7616/*-- vec_nabs ---------------------------------------------------------------*/
63997617
6400static inline __ATTRS_ai vector double7618#if __ARCH__ >= 12
7619static inline __ATTRS_o_ai vector float
7620vec_nabs(vector float __a) {
7621 return __builtin_s390_vflnsb(__a);
7622}
7623#endif
7624
7625static inline __ATTRS_o_ai vector double
6401vec_nabs(vector double __a) {7626vec_nabs(vector double __a) {
6402 return __builtin_s390_vflndb(__a);7627 return __builtin_s390_vflndb(__a);
6403}7628}
...@@ -6409,12 +7634,14 @@ vec_max(vector signed char __a, vector signed char __b) {...@@ -6409,12 +7634,14 @@ vec_max(vector signed char __a, vector signed char __b) {
6409 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7634 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6410}7635}
64117636
7637// This prototype is deprecated.
6412static inline __ATTRS_o_ai vector signed char7638static inline __ATTRS_o_ai vector signed char
6413vec_max(vector signed char __a, vector bool char __b) {7639vec_max(vector signed char __a, vector bool char __b) {
6414 vector signed char __bc = (vector signed char)__b;7640 vector signed char __bc = (vector signed char)__b;
6415 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7641 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6416}7642}
64177643
7644// This prototype is deprecated.
6418static inline __ATTRS_o_ai vector signed char7645static inline __ATTRS_o_ai vector signed char
6419vec_max(vector bool char __a, vector signed char __b) {7646vec_max(vector bool char __a, vector signed char __b) {
6420 vector signed char __ac = (vector signed char)__a;7647 vector signed char __ac = (vector signed char)__a;
...@@ -6426,12 +7653,14 @@ vec_max(vector unsigned char __a, vector unsigned char __b) {...@@ -6426,12 +7653,14 @@ vec_max(vector unsigned char __a, vector unsigned char __b) {
6426 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7653 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6427}7654}
64287655
7656// This prototype is deprecated.
6429static inline __ATTRS_o_ai vector unsigned char7657static inline __ATTRS_o_ai vector unsigned char
6430vec_max(vector unsigned char __a, vector bool char __b) {7658vec_max(vector unsigned char __a, vector bool char __b) {
6431 vector unsigned char __bc = (vector unsigned char)__b;7659 vector unsigned char __bc = (vector unsigned char)__b;
6432 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7660 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6433}7661}
64347662
7663// This prototype is deprecated.
6435static inline __ATTRS_o_ai vector unsigned char7664static inline __ATTRS_o_ai vector unsigned char
6436vec_max(vector bool char __a, vector unsigned char __b) {7665vec_max(vector bool char __a, vector unsigned char __b) {
6437 vector unsigned char __ac = (vector unsigned char)__a;7666 vector unsigned char __ac = (vector unsigned char)__a;
...@@ -6443,12 +7672,14 @@ vec_max(vector signed short __a, vector signed short __b) {...@@ -6443,12 +7672,14 @@ vec_max(vector signed short __a, vector signed short __b) {
6443 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7672 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6444}7673}
64457674
7675// This prototype is deprecated.
6446static inline __ATTRS_o_ai vector signed short7676static inline __ATTRS_o_ai vector signed short
6447vec_max(vector signed short __a, vector bool short __b) {7677vec_max(vector signed short __a, vector bool short __b) {
6448 vector signed short __bc = (vector signed short)__b;7678 vector signed short __bc = (vector signed short)__b;
6449 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7679 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6450}7680}
64517681
7682// This prototype is deprecated.
6452static inline __ATTRS_o_ai vector signed short7683static inline __ATTRS_o_ai vector signed short
6453vec_max(vector bool short __a, vector signed short __b) {7684vec_max(vector bool short __a, vector signed short __b) {
6454 vector signed short __ac = (vector signed short)__a;7685 vector signed short __ac = (vector signed short)__a;
...@@ -6460,12 +7691,14 @@ vec_max(vector unsigned short __a, vector unsigned short __b) {...@@ -6460,12 +7691,14 @@ vec_max(vector unsigned short __a, vector unsigned short __b) {
6460 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7691 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6461}7692}
64627693
7694// This prototype is deprecated.
6463static inline __ATTRS_o_ai vector unsigned short7695static inline __ATTRS_o_ai vector unsigned short
6464vec_max(vector unsigned short __a, vector bool short __b) {7696vec_max(vector unsigned short __a, vector bool short __b) {
6465 vector unsigned short __bc = (vector unsigned short)__b;7697 vector unsigned short __bc = (vector unsigned short)__b;
6466 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7698 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6467}7699}
64687700
7701// This prototype is deprecated.
6469static inline __ATTRS_o_ai vector unsigned short7702static inline __ATTRS_o_ai vector unsigned short
6470vec_max(vector bool short __a, vector unsigned short __b) {7703vec_max(vector bool short __a, vector unsigned short __b) {
6471 vector unsigned short __ac = (vector unsigned short)__a;7704 vector unsigned short __ac = (vector unsigned short)__a;
...@@ -6477,12 +7710,14 @@ vec_max(vector signed int __a, vector signed int __b) {...@@ -6477,12 +7710,14 @@ vec_max(vector signed int __a, vector signed int __b) {
6477 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7710 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6478}7711}
64797712
7713// This prototype is deprecated.
6480static inline __ATTRS_o_ai vector signed int7714static inline __ATTRS_o_ai vector signed int
6481vec_max(vector signed int __a, vector bool int __b) {7715vec_max(vector signed int __a, vector bool int __b) {
6482 vector signed int __bc = (vector signed int)__b;7716 vector signed int __bc = (vector signed int)__b;
6483 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7717 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6484}7718}
64857719
7720// This prototype is deprecated.
6486static inline __ATTRS_o_ai vector signed int7721static inline __ATTRS_o_ai vector signed int
6487vec_max(vector bool int __a, vector signed int __b) {7722vec_max(vector bool int __a, vector signed int __b) {
6488 vector signed int __ac = (vector signed int)__a;7723 vector signed int __ac = (vector signed int)__a;
...@@ -6494,12 +7729,14 @@ vec_max(vector unsigned int __a, vector unsigned int __b) {...@@ -6494,12 +7729,14 @@ vec_max(vector unsigned int __a, vector unsigned int __b) {
6494 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7729 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6495}7730}
64967731
7732// This prototype is deprecated.
6497static inline __ATTRS_o_ai vector unsigned int7733static inline __ATTRS_o_ai vector unsigned int
6498vec_max(vector unsigned int __a, vector bool int __b) {7734vec_max(vector unsigned int __a, vector bool int __b) {
6499 vector unsigned int __bc = (vector unsigned int)__b;7735 vector unsigned int __bc = (vector unsigned int)__b;
6500 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7736 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6501}7737}
65027738
7739// This prototype is deprecated.
6503static inline __ATTRS_o_ai vector unsigned int7740static inline __ATTRS_o_ai vector unsigned int
6504vec_max(vector bool int __a, vector unsigned int __b) {7741vec_max(vector bool int __a, vector unsigned int __b) {
6505 vector unsigned int __ac = (vector unsigned int)__a;7742 vector unsigned int __ac = (vector unsigned int)__a;
...@@ -6511,12 +7748,14 @@ vec_max(vector signed long long __a, vector signed long long __b) {...@@ -6511,12 +7748,14 @@ vec_max(vector signed long long __a, vector signed long long __b) {
6511 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7748 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6512}7749}
65137750
7751// This prototype is deprecated.
6514static inline __ATTRS_o_ai vector signed long long7752static inline __ATTRS_o_ai vector signed long long
6515vec_max(vector signed long long __a, vector bool long long __b) {7753vec_max(vector signed long long __a, vector bool long long __b) {
6516 vector signed long long __bc = (vector signed long long)__b;7754 vector signed long long __bc = (vector signed long long)__b;
6517 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7755 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6518}7756}
65197757
7758// This prototype is deprecated.
6520static inline __ATTRS_o_ai vector signed long long7759static inline __ATTRS_o_ai vector signed long long
6521vec_max(vector bool long long __a, vector signed long long __b) {7760vec_max(vector bool long long __a, vector signed long long __b) {
6522 vector signed long long __ac = (vector signed long long)__a;7761 vector signed long long __ac = (vector signed long long)__a;
...@@ -6528,21 +7767,34 @@ vec_max(vector unsigned long long __a, vector unsigned long long __b) {...@@ -6528,21 +7767,34 @@ vec_max(vector unsigned long long __a, vector unsigned long long __b) {
6528 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7767 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
6529}7768}
65307769
7770// This prototype is deprecated.
6531static inline __ATTRS_o_ai vector unsigned long long7771static inline __ATTRS_o_ai vector unsigned long long
6532vec_max(vector unsigned long long __a, vector bool long long __b) {7772vec_max(vector unsigned long long __a, vector bool long long __b) {
6533 vector unsigned long long __bc = (vector unsigned long long)__b;7773 vector unsigned long long __bc = (vector unsigned long long)__b;
6534 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));7774 return vec_sel(__bc, __a, vec_cmpgt(__a, __bc));
6535}7775}
65367776
7777// This prototype is deprecated.
6537static inline __ATTRS_o_ai vector unsigned long long7778static inline __ATTRS_o_ai vector unsigned long long
6538vec_max(vector bool long long __a, vector unsigned long long __b) {7779vec_max(vector bool long long __a, vector unsigned long long __b) {
6539 vector unsigned long long __ac = (vector unsigned long long)__a;7780 vector unsigned long long __ac = (vector unsigned long long)__a;
6540 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));7781 return vec_sel(__b, __ac, vec_cmpgt(__ac, __b));
6541}7782}
65427783
7784#if __ARCH__ >= 12
7785static inline __ATTRS_o_ai vector float
7786vec_max(vector float __a, vector float __b) {
7787 return __builtin_s390_vfmaxsb(__a, __b, 0);
7788}
7789#endif
7790
6543static inline __ATTRS_o_ai vector double7791static inline __ATTRS_o_ai vector double
6544vec_max(vector double __a, vector double __b) {7792vec_max(vector double __a, vector double __b) {
7793#if __ARCH__ >= 12
7794 return __builtin_s390_vfmaxdb(__a, __b, 0);
7795#else
6545 return vec_sel(__b, __a, vec_cmpgt(__a, __b));7796 return vec_sel(__b, __a, vec_cmpgt(__a, __b));
7797#endif
6546}7798}
65477799
6548/*-- vec_min ----------------------------------------------------------------*/7800/*-- vec_min ----------------------------------------------------------------*/
...@@ -6552,12 +7804,14 @@ vec_min(vector signed char __a, vector signed char __b) {...@@ -6552,12 +7804,14 @@ vec_min(vector signed char __a, vector signed char __b) {
6552 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7804 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6553}7805}
65547806
7807// This prototype is deprecated.
6555static inline __ATTRS_o_ai vector signed char7808static inline __ATTRS_o_ai vector signed char
6556vec_min(vector signed char __a, vector bool char __b) {7809vec_min(vector signed char __a, vector bool char __b) {
6557 vector signed char __bc = (vector signed char)__b;7810 vector signed char __bc = (vector signed char)__b;
6558 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7811 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6559}7812}
65607813
7814// This prototype is deprecated.
6561static inline __ATTRS_o_ai vector signed char7815static inline __ATTRS_o_ai vector signed char
6562vec_min(vector bool char __a, vector signed char __b) {7816vec_min(vector bool char __a, vector signed char __b) {
6563 vector signed char __ac = (vector signed char)__a;7817 vector signed char __ac = (vector signed char)__a;
...@@ -6569,12 +7823,14 @@ vec_min(vector unsigned char __a, vector unsigned char __b) {...@@ -6569,12 +7823,14 @@ vec_min(vector unsigned char __a, vector unsigned char __b) {
6569 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7823 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6570}7824}
65717825
7826// This prototype is deprecated.
6572static inline __ATTRS_o_ai vector unsigned char7827static inline __ATTRS_o_ai vector unsigned char
6573vec_min(vector unsigned char __a, vector bool char __b) {7828vec_min(vector unsigned char __a, vector bool char __b) {
6574 vector unsigned char __bc = (vector unsigned char)__b;7829 vector unsigned char __bc = (vector unsigned char)__b;
6575 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7830 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6576}7831}
65777832
7833// This prototype is deprecated.
6578static inline __ATTRS_o_ai vector unsigned char7834static inline __ATTRS_o_ai vector unsigned char
6579vec_min(vector bool char __a, vector unsigned char __b) {7835vec_min(vector bool char __a, vector unsigned char __b) {
6580 vector unsigned char __ac = (vector unsigned char)__a;7836 vector unsigned char __ac = (vector unsigned char)__a;
...@@ -6586,12 +7842,14 @@ vec_min(vector signed short __a, vector signed short __b) {...@@ -6586,12 +7842,14 @@ vec_min(vector signed short __a, vector signed short __b) {
6586 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7842 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6587}7843}
65887844
7845// This prototype is deprecated.
6589static inline __ATTRS_o_ai vector signed short7846static inline __ATTRS_o_ai vector signed short
6590vec_min(vector signed short __a, vector bool short __b) {7847vec_min(vector signed short __a, vector bool short __b) {
6591 vector signed short __bc = (vector signed short)__b;7848 vector signed short __bc = (vector signed short)__b;
6592 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7849 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6593}7850}
65947851
7852// This prototype is deprecated.
6595static inline __ATTRS_o_ai vector signed short7853static inline __ATTRS_o_ai vector signed short
6596vec_min(vector bool short __a, vector signed short __b) {7854vec_min(vector bool short __a, vector signed short __b) {
6597 vector signed short __ac = (vector signed short)__a;7855 vector signed short __ac = (vector signed short)__a;
...@@ -6603,12 +7861,14 @@ vec_min(vector unsigned short __a, vector unsigned short __b) {...@@ -6603,12 +7861,14 @@ vec_min(vector unsigned short __a, vector unsigned short __b) {
6603 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7861 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6604}7862}
66057863
7864// This prototype is deprecated.
6606static inline __ATTRS_o_ai vector unsigned short7865static inline __ATTRS_o_ai vector unsigned short
6607vec_min(vector unsigned short __a, vector bool short __b) {7866vec_min(vector unsigned short __a, vector bool short __b) {
6608 vector unsigned short __bc = (vector unsigned short)__b;7867 vector unsigned short __bc = (vector unsigned short)__b;
6609 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7868 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6610}7869}
66117870
7871// This prototype is deprecated.
6612static inline __ATTRS_o_ai vector unsigned short7872static inline __ATTRS_o_ai vector unsigned short
6613vec_min(vector bool short __a, vector unsigned short __b) {7873vec_min(vector bool short __a, vector unsigned short __b) {
6614 vector unsigned short __ac = (vector unsigned short)__a;7874 vector unsigned short __ac = (vector unsigned short)__a;
...@@ -6620,12 +7880,14 @@ vec_min(vector signed int __a, vector signed int __b) {...@@ -6620,12 +7880,14 @@ vec_min(vector signed int __a, vector signed int __b) {
6620 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7880 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6621}7881}
66227882
7883// This prototype is deprecated.
6623static inline __ATTRS_o_ai vector signed int7884static inline __ATTRS_o_ai vector signed int
6624vec_min(vector signed int __a, vector bool int __b) {7885vec_min(vector signed int __a, vector bool int __b) {
6625 vector signed int __bc = (vector signed int)__b;7886 vector signed int __bc = (vector signed int)__b;
6626 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7887 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6627}7888}
66287889
7890// This prototype is deprecated.
6629static inline __ATTRS_o_ai vector signed int7891static inline __ATTRS_o_ai vector signed int
6630vec_min(vector bool int __a, vector signed int __b) {7892vec_min(vector bool int __a, vector signed int __b) {
6631 vector signed int __ac = (vector signed int)__a;7893 vector signed int __ac = (vector signed int)__a;
...@@ -6637,12 +7899,14 @@ vec_min(vector unsigned int __a, vector unsigned int __b) {...@@ -6637,12 +7899,14 @@ vec_min(vector unsigned int __a, vector unsigned int __b) {
6637 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7899 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6638}7900}
66397901
7902// This prototype is deprecated.
6640static inline __ATTRS_o_ai vector unsigned int7903static inline __ATTRS_o_ai vector unsigned int
6641vec_min(vector unsigned int __a, vector bool int __b) {7904vec_min(vector unsigned int __a, vector bool int __b) {
6642 vector unsigned int __bc = (vector unsigned int)__b;7905 vector unsigned int __bc = (vector unsigned int)__b;
6643 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7906 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6644}7907}
66457908
7909// This prototype is deprecated.
6646static inline __ATTRS_o_ai vector unsigned int7910static inline __ATTRS_o_ai vector unsigned int
6647vec_min(vector bool int __a, vector unsigned int __b) {7911vec_min(vector bool int __a, vector unsigned int __b) {
6648 vector unsigned int __ac = (vector unsigned int)__a;7912 vector unsigned int __ac = (vector unsigned int)__a;
...@@ -6654,12 +7918,14 @@ vec_min(vector signed long long __a, vector signed long long __b) {...@@ -6654,12 +7918,14 @@ vec_min(vector signed long long __a, vector signed long long __b) {
6654 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7918 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6655}7919}
66567920
7921// This prototype is deprecated.
6657static inline __ATTRS_o_ai vector signed long long7922static inline __ATTRS_o_ai vector signed long long
6658vec_min(vector signed long long __a, vector bool long long __b) {7923vec_min(vector signed long long __a, vector bool long long __b) {
6659 vector signed long long __bc = (vector signed long long)__b;7924 vector signed long long __bc = (vector signed long long)__b;
6660 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7925 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6661}7926}
66627927
7928// This prototype is deprecated.
6663static inline __ATTRS_o_ai vector signed long long7929static inline __ATTRS_o_ai vector signed long long
6664vec_min(vector bool long long __a, vector signed long long __b) {7930vec_min(vector bool long long __a, vector signed long long __b) {
6665 vector signed long long __ac = (vector signed long long)__a;7931 vector signed long long __ac = (vector signed long long)__a;
...@@ -6671,21 +7937,34 @@ vec_min(vector unsigned long long __a, vector unsigned long long __b) {...@@ -6671,21 +7937,34 @@ vec_min(vector unsigned long long __a, vector unsigned long long __b) {
6671 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7937 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
6672}7938}
66737939
7940// This prototype is deprecated.
6674static inline __ATTRS_o_ai vector unsigned long long7941static inline __ATTRS_o_ai vector unsigned long long
6675vec_min(vector unsigned long long __a, vector bool long long __b) {7942vec_min(vector unsigned long long __a, vector bool long long __b) {
6676 vector unsigned long long __bc = (vector unsigned long long)__b;7943 vector unsigned long long __bc = (vector unsigned long long)__b;
6677 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));7944 return vec_sel(__a, __bc, vec_cmpgt(__a, __bc));
6678}7945}
66797946
7947// This prototype is deprecated.
6680static inline __ATTRS_o_ai vector unsigned long long7948static inline __ATTRS_o_ai vector unsigned long long
6681vec_min(vector bool long long __a, vector unsigned long long __b) {7949vec_min(vector bool long long __a, vector unsigned long long __b) {
6682 vector unsigned long long __ac = (vector unsigned long long)__a;7950 vector unsigned long long __ac = (vector unsigned long long)__a;
6683 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));7951 return vec_sel(__ac, __b, vec_cmpgt(__ac, __b));
6684}7952}
66857953
7954#if __ARCH__ >= 12
7955static inline __ATTRS_o_ai vector float
7956vec_min(vector float __a, vector float __b) {
7957 return __builtin_s390_vfminsb(__a, __b, 0);
7958}
7959#endif
7960
6686static inline __ATTRS_o_ai vector double7961static inline __ATTRS_o_ai vector double
6687vec_min(vector double __a, vector double __b) {7962vec_min(vector double __a, vector double __b) {
7963#if __ARCH__ >= 12
7964 return __builtin_s390_vfmindb(__a, __b, 0);
7965#else
6688 return vec_sel(__a, __b, vec_cmpgt(__a, __b));7966 return vec_sel(__a, __b, vec_cmpgt(__a, __b));
7967#endif
6689}7968}
66907969
6691/*-- vec_add_u128 -----------------------------------------------------------*/7970/*-- vec_add_u128 -----------------------------------------------------------*/
...@@ -7126,6 +8405,13 @@ vec_mulo(vector unsigned int __a, vector unsigned int __b) {...@@ -7126,6 +8405,13 @@ vec_mulo(vector unsigned int __a, vector unsigned int __b) {
7126 return __builtin_s390_vmlof(__a, __b);8405 return __builtin_s390_vmlof(__a, __b);
7127}8406}
71288407
8408/*-- vec_msum_u128 ----------------------------------------------------------*/
8409
8410#if __ARCH__ >= 12
8411#define vec_msum_u128(X, Y, Z, W) \
8412 ((vector unsigned char)__builtin_s390_vmslg((X), (Y), (Z), (W)));
8413#endif
8414
7129/*-- vec_sub_u128 -----------------------------------------------------------*/8415/*-- vec_sub_u128 -----------------------------------------------------------*/
71308416
7131static inline __ATTRS_ai vector unsigned char8417static inline __ATTRS_ai vector unsigned char
...@@ -7263,6 +8549,14 @@ vec_test_mask(vector unsigned long long __a, vector unsigned long long __b) {...@@ -7263,6 +8549,14 @@ vec_test_mask(vector unsigned long long __a, vector unsigned long long __b) {
7263 (vector unsigned char)__b);8549 (vector unsigned char)__b);
7264}8550}
72658551
8552#if __ARCH__ >= 12
8553static inline __ATTRS_o_ai int
8554vec_test_mask(vector float __a, vector unsigned int __b) {
8555 return __builtin_s390_vtm((vector unsigned char)__a,
8556 (vector unsigned char)__b);
8557}
8558#endif
8559
7266static inline __ATTRS_o_ai int8560static inline __ATTRS_o_ai int
7267vec_test_mask(vector double __a, vector unsigned long long __b) {8561vec_test_mask(vector double __a, vector unsigned long long __b) {
7268 return __builtin_s390_vtm((vector unsigned char)__a,8562 return __builtin_s390_vtm((vector unsigned char)__a,
...@@ -7271,27 +8565,77 @@ vec_test_mask(vector double __a, vector unsigned long long __b) {...@@ -7271,27 +8565,77 @@ vec_test_mask(vector double __a, vector unsigned long long __b) {
72718565
7272/*-- vec_madd ---------------------------------------------------------------*/8566/*-- vec_madd ---------------------------------------------------------------*/
72738567
7274static inline __ATTRS_ai vector double8568#if __ARCH__ >= 12
8569static inline __ATTRS_o_ai vector float
8570vec_madd(vector float __a, vector float __b, vector float __c) {
8571 return __builtin_s390_vfmasb(__a, __b, __c);
8572}
8573#endif
8574
8575static inline __ATTRS_o_ai vector double
7275vec_madd(vector double __a, vector double __b, vector double __c) {8576vec_madd(vector double __a, vector double __b, vector double __c) {
7276 return __builtin_s390_vfmadb(__a, __b, __c);8577 return __builtin_s390_vfmadb(__a, __b, __c);
7277}8578}
72788579
7279/*-- vec_msub ---------------------------------------------------------------*/8580/*-- vec_msub ---------------------------------------------------------------*/
72808581
7281static inline __ATTRS_ai vector double8582#if __ARCH__ >= 12
8583static inline __ATTRS_o_ai vector float
8584vec_msub(vector float __a, vector float __b, vector float __c) {
8585 return __builtin_s390_vfmssb(__a, __b, __c);
8586}
8587#endif
8588
8589static inline __ATTRS_o_ai vector double
7282vec_msub(vector double __a, vector double __b, vector double __c) {8590vec_msub(vector double __a, vector double __b, vector double __c) {
7283 return __builtin_s390_vfmsdb(__a, __b, __c);8591 return __builtin_s390_vfmsdb(__a, __b, __c);
7284}8592}
72858593
8594/*-- vec_nmadd ---------------------------------------------------------------*/
8595
8596#if __ARCH__ >= 12
8597static inline __ATTRS_o_ai vector float
8598vec_nmadd(vector float __a, vector float __b, vector float __c) {
8599 return __builtin_s390_vfnmasb(__a, __b, __c);
8600}
8601
8602static inline __ATTRS_o_ai vector double
8603vec_nmadd(vector double __a, vector double __b, vector double __c) {
8604 return __builtin_s390_vfnmadb(__a, __b, __c);
8605}
8606#endif
8607
8608/*-- vec_nmsub ---------------------------------------------------------------*/
8609
8610#if __ARCH__ >= 12
8611static inline __ATTRS_o_ai vector float
8612vec_nmsub(vector float __a, vector float __b, vector float __c) {
8613 return __builtin_s390_vfnmssb(__a, __b, __c);
8614}
8615
8616static inline __ATTRS_o_ai vector double
8617vec_nmsub(vector double __a, vector double __b, vector double __c) {
8618 return __builtin_s390_vfnmsdb(__a, __b, __c);
8619}
8620#endif
8621
7286/*-- vec_sqrt ---------------------------------------------------------------*/8622/*-- vec_sqrt ---------------------------------------------------------------*/
72878623
7288static inline __ATTRS_ai vector double8624#if __ARCH__ >= 12
8625static inline __ATTRS_o_ai vector float
8626vec_sqrt(vector float __a) {
8627 return __builtin_s390_vfsqsb(__a);
8628}
8629#endif
8630
8631static inline __ATTRS_o_ai vector double
7289vec_sqrt(vector double __a) {8632vec_sqrt(vector double __a) {
7290 return __builtin_s390_vfsqdb(__a);8633 return __builtin_s390_vfsqdb(__a);
7291}8634}
72928635
7293/*-- vec_ld2f ---------------------------------------------------------------*/8636/*-- vec_ld2f ---------------------------------------------------------------*/
72948637
8638// This prototype is deprecated.
7295static inline __ATTRS_ai vector double8639static inline __ATTRS_ai vector double
7296vec_ld2f(const float *__ptr) {8640vec_ld2f(const float *__ptr) {
7297 typedef float __v2f32 __attribute__((__vector_size__(8)));8641 typedef float __v2f32 __attribute__((__vector_size__(8)));
...@@ -7300,6 +8644,7 @@ vec_ld2f(const float *__ptr) {...@@ -7300,6 +8644,7 @@ vec_ld2f(const float *__ptr) {
73008644
7301/*-- vec_st2f ---------------------------------------------------------------*/8645/*-- vec_st2f ---------------------------------------------------------------*/
73028646
8647// This prototype is deprecated.
7303static inline __ATTRS_ai void8648static inline __ATTRS_ai void
7304vec_st2f(vector double __a, float *__ptr) {8649vec_st2f(vector double __a, float *__ptr) {
7305 typedef float __v2f32 __attribute__((__vector_size__(8)));8650 typedef float __v2f32 __attribute__((__vector_size__(8)));
...@@ -7308,6 +8653,7 @@ vec_st2f(vector double __a, float *__ptr) {...@@ -7308,6 +8653,7 @@ vec_st2f(vector double __a, float *__ptr) {
73088653
7309/*-- vec_ctd ----------------------------------------------------------------*/8654/*-- vec_ctd ----------------------------------------------------------------*/
73108655
8656// This prototype is deprecated.
7311static inline __ATTRS_o_ai vector double8657static inline __ATTRS_o_ai vector double
7312vec_ctd(vector signed long long __a, int __b)8658vec_ctd(vector signed long long __a, int __b)
7313 __constant_range(__b, 0, 31) {8659 __constant_range(__b, 0, 31) {
...@@ -7316,6 +8662,7 @@ vec_ctd(vector signed long long __a, int __b)...@@ -7316,6 +8662,7 @@ vec_ctd(vector signed long long __a, int __b)
7316 return __conv;8662 return __conv;
7317}8663}
73188664
8665// This prototype is deprecated.
7319static inline __ATTRS_o_ai vector double8666static inline __ATTRS_o_ai vector double
7320vec_ctd(vector unsigned long long __a, int __b)8667vec_ctd(vector unsigned long long __a, int __b)
7321 __constant_range(__b, 0, 31) {8668 __constant_range(__b, 0, 31) {
...@@ -7326,6 +8673,7 @@ vec_ctd(vector unsigned long long __a, int __b)...@@ -7326,6 +8673,7 @@ vec_ctd(vector unsigned long long __a, int __b)
73268673
7327/*-- vec_ctsl ---------------------------------------------------------------*/8674/*-- vec_ctsl ---------------------------------------------------------------*/
73288675
8676// This prototype is deprecated.
7329static inline __ATTRS_o_ai vector signed long long8677static inline __ATTRS_o_ai vector signed long long
7330vec_ctsl(vector double __a, int __b)8678vec_ctsl(vector double __a, int __b)
7331 __constant_range(__b, 0, 31) {8679 __constant_range(__b, 0, 31) {
...@@ -7335,6 +8683,7 @@ vec_ctsl(vector double __a, int __b)...@@ -7335,6 +8683,7 @@ vec_ctsl(vector double __a, int __b)
73358683
7336/*-- vec_ctul ---------------------------------------------------------------*/8684/*-- vec_ctul ---------------------------------------------------------------*/
73378685
8686// This prototype is deprecated.
7338static inline __ATTRS_o_ai vector unsigned long long8687static inline __ATTRS_o_ai vector unsigned long long
7339vec_ctul(vector double __a, int __b)8688vec_ctul(vector double __a, int __b)
7340 __constant_range(__b, 0, 31) {8689 __constant_range(__b, 0, 31) {
...@@ -7342,16 +8691,79 @@ vec_ctul(vector double __a, int __b)...@@ -7342,16 +8691,79 @@ vec_ctul(vector double __a, int __b)
7342 return __builtin_convertvector(__a, vector unsigned long long);8691 return __builtin_convertvector(__a, vector unsigned long long);
7343}8692}
73448693
7345/*-- vec_roundp -------------------------------------------------------------*/8694/*-- vec_doublee ------------------------------------------------------------*/
73468695
8696#if __ARCH__ >= 12
7347static inline __ATTRS_ai vector double8697static inline __ATTRS_ai vector double
8698vec_doublee(vector float __a) {
8699 typedef float __v2f32 __attribute__((__vector_size__(8)));
8700 __v2f32 __pack = __builtin_shufflevector(__a, __a, 0, 2);
8701 return __builtin_convertvector(__pack, vector double);
8702}
8703#endif
8704
8705/*-- vec_floate -------------------------------------------------------------*/
8706
8707#if __ARCH__ >= 12
8708static inline __ATTRS_ai vector float
8709vec_floate(vector double __a) {
8710 typedef float __v2f32 __attribute__((__vector_size__(8)));
8711 __v2f32 __pack = __builtin_convertvector(__a, __v2f32);
8712 return __builtin_shufflevector(__pack, __pack, 0, -1, 1, -1);
8713}
8714#endif
8715
8716/*-- vec_double -------------------------------------------------------------*/
8717
8718static inline __ATTRS_o_ai vector double
8719vec_double(vector signed long long __a) {
8720 return __builtin_convertvector(__a, vector double);
8721}
8722
8723static inline __ATTRS_o_ai vector double
8724vec_double(vector unsigned long long __a) {
8725 return __builtin_convertvector(__a, vector double);
8726}
8727
8728/*-- vec_signed -------------------------------------------------------------*/
8729
8730static inline __ATTRS_o_ai vector signed long long
8731vec_signed(vector double __a) {
8732 return __builtin_convertvector(__a, vector signed long long);
8733}
8734
8735/*-- vec_unsigned -----------------------------------------------------------*/
8736
8737static inline __ATTRS_o_ai vector unsigned long long
8738vec_unsigned(vector double __a) {
8739 return __builtin_convertvector(__a, vector unsigned long long);
8740}
8741
8742/*-- vec_roundp -------------------------------------------------------------*/
8743
8744#if __ARCH__ >= 12
8745static inline __ATTRS_o_ai vector float
8746vec_roundp(vector float __a) {
8747 return __builtin_s390_vfisb(__a, 4, 6);
8748}
8749#endif
8750
8751static inline __ATTRS_o_ai vector double
7348vec_roundp(vector double __a) {8752vec_roundp(vector double __a) {
7349 return __builtin_s390_vfidb(__a, 4, 6);8753 return __builtin_s390_vfidb(__a, 4, 6);
7350}8754}
73518755
7352/*-- vec_ceil ---------------------------------------------------------------*/8756/*-- vec_ceil ---------------------------------------------------------------*/
73538757
7354static inline __ATTRS_ai vector double8758#if __ARCH__ >= 12
8759static inline __ATTRS_o_ai vector float
8760vec_ceil(vector float __a) {
8761 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
8762 return __builtin_s390_vfisb(__a, 4, 6);
8763}
8764#endif
8765
8766static inline __ATTRS_o_ai vector double
7355vec_ceil(vector double __a) {8767vec_ceil(vector double __a) {
7356 // On this platform, vec_ceil never triggers the IEEE-inexact exception.8768 // On this platform, vec_ceil never triggers the IEEE-inexact exception.
7357 return __builtin_s390_vfidb(__a, 4, 6);8769 return __builtin_s390_vfidb(__a, 4, 6);
...@@ -7359,14 +8771,29 @@ vec_ceil(vector double __a) {...@@ -7359,14 +8771,29 @@ vec_ceil(vector double __a) {
73598771
7360/*-- vec_roundm -------------------------------------------------------------*/8772/*-- vec_roundm -------------------------------------------------------------*/
73618773
7362static inline __ATTRS_ai vector double8774#if __ARCH__ >= 12
8775static inline __ATTRS_o_ai vector float
8776vec_roundm(vector float __a) {
8777 return __builtin_s390_vfisb(__a, 4, 7);
8778}
8779#endif
8780
8781static inline __ATTRS_o_ai vector double
7363vec_roundm(vector double __a) {8782vec_roundm(vector double __a) {
7364 return __builtin_s390_vfidb(__a, 4, 7);8783 return __builtin_s390_vfidb(__a, 4, 7);
7365}8784}
73668785
7367/*-- vec_floor --------------------------------------------------------------*/8786/*-- vec_floor --------------------------------------------------------------*/
73688787
7369static inline __ATTRS_ai vector double8788#if __ARCH__ >= 12
8789static inline __ATTRS_o_ai vector float
8790vec_floor(vector float __a) {
8791 // On this platform, vec_floor never triggers the IEEE-inexact exception.
8792 return __builtin_s390_vfisb(__a, 4, 7);
8793}
8794#endif
8795
8796static inline __ATTRS_o_ai vector double
7370vec_floor(vector double __a) {8797vec_floor(vector double __a) {
7371 // On this platform, vec_floor never triggers the IEEE-inexact exception.8798 // On this platform, vec_floor never triggers the IEEE-inexact exception.
7372 return __builtin_s390_vfidb(__a, 4, 7);8799 return __builtin_s390_vfidb(__a, 4, 7);
...@@ -7374,14 +8801,29 @@ vec_floor(vector double __a) {...@@ -7374,14 +8801,29 @@ vec_floor(vector double __a) {
73748801
7375/*-- vec_roundz -------------------------------------------------------------*/8802/*-- vec_roundz -------------------------------------------------------------*/
73768803
7377static inline __ATTRS_ai vector double8804#if __ARCH__ >= 12
8805static inline __ATTRS_o_ai vector float
8806vec_roundz(vector float __a) {
8807 return __builtin_s390_vfisb(__a, 4, 5);
8808}
8809#endif
8810
8811static inline __ATTRS_o_ai vector double
7378vec_roundz(vector double __a) {8812vec_roundz(vector double __a) {
7379 return __builtin_s390_vfidb(__a, 4, 5);8813 return __builtin_s390_vfidb(__a, 4, 5);
7380}8814}
73818815
7382/*-- vec_trunc --------------------------------------------------------------*/8816/*-- vec_trunc --------------------------------------------------------------*/
73838817
7384static inline __ATTRS_ai vector double8818#if __ARCH__ >= 12
8819static inline __ATTRS_o_ai vector float
8820vec_trunc(vector float __a) {
8821 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
8822 return __builtin_s390_vfisb(__a, 4, 5);
8823}
8824#endif
8825
8826static inline __ATTRS_o_ai vector double
7385vec_trunc(vector double __a) {8827vec_trunc(vector double __a) {
7386 // On this platform, vec_trunc never triggers the IEEE-inexact exception.8828 // On this platform, vec_trunc never triggers the IEEE-inexact exception.
7387 return __builtin_s390_vfidb(__a, 4, 5);8829 return __builtin_s390_vfidb(__a, 4, 5);
...@@ -7389,22 +8831,104 @@ vec_trunc(vector double __a) {...@@ -7389,22 +8831,104 @@ vec_trunc(vector double __a) {
73898831
7390/*-- vec_roundc -------------------------------------------------------------*/8832/*-- vec_roundc -------------------------------------------------------------*/
73918833
7392static inline __ATTRS_ai vector double8834#if __ARCH__ >= 12
8835static inline __ATTRS_o_ai vector float
8836vec_roundc(vector float __a) {
8837 return __builtin_s390_vfisb(__a, 4, 0);
8838}
8839#endif
8840
8841static inline __ATTRS_o_ai vector double
7393vec_roundc(vector double __a) {8842vec_roundc(vector double __a) {
7394 return __builtin_s390_vfidb(__a, 4, 0);8843 return __builtin_s390_vfidb(__a, 4, 0);
7395}8844}
73968845
8846/*-- vec_rint ---------------------------------------------------------------*/
8847
8848#if __ARCH__ >= 12
8849static inline __ATTRS_o_ai vector float
8850vec_rint(vector float __a) {
8851 // vec_rint may trigger the IEEE-inexact exception.
8852 return __builtin_s390_vfisb(__a, 0, 0);
8853}
8854#endif
8855
8856static inline __ATTRS_o_ai vector double
8857vec_rint(vector double __a) {
8858 // vec_rint may trigger the IEEE-inexact exception.
8859 return __builtin_s390_vfidb(__a, 0, 0);
8860}
8861
7397/*-- vec_round --------------------------------------------------------------*/8862/*-- vec_round --------------------------------------------------------------*/
73988863
7399static inline __ATTRS_ai vector double8864#if __ARCH__ >= 12
8865static inline __ATTRS_o_ai vector float
8866vec_round(vector float __a) {
8867 return __builtin_s390_vfisb(__a, 4, 4);
8868}
8869#endif
8870
8871static inline __ATTRS_o_ai vector double
7400vec_round(vector double __a) {8872vec_round(vector double __a) {
7401 return __builtin_s390_vfidb(__a, 4, 4);8873 return __builtin_s390_vfidb(__a, 4, 4);
7402}8874}
74038875
7404/*-- vec_fp_test_data_class -------------------------------------------------*/8876/*-- vec_fp_test_data_class -------------------------------------------------*/
74058877
8878#if __ARCH__ >= 12
8879extern __ATTRS_o vector bool int
8880vec_fp_test_data_class(vector float __a, int __b, int *__c)
8881 __constant_range(__b, 0, 4095);
8882
8883extern __ATTRS_o vector bool long long
8884vec_fp_test_data_class(vector double __a, int __b, int *__c)
8885 __constant_range(__b, 0, 4095);
8886
8887#define vec_fp_test_data_class(X, Y, Z) \
8888 ((__typeof__((vec_fp_test_data_class)((X), (Y), (Z)))) \
8889 __extension__ ({ \
8890 vector unsigned char __res; \
8891 vector unsigned char __x = (vector unsigned char)(X); \
8892 int *__z = (Z); \
8893 switch (sizeof ((X)[0])) { \
8894 case 4: __res = (vector unsigned char) \
8895 __builtin_s390_vftcisb((vector float)__x, (Y), __z); \
8896 break; \
8897 default: __res = (vector unsigned char) \
8898 __builtin_s390_vftcidb((vector double)__x, (Y), __z); \
8899 break; \
8900 } __res; }))
8901#else
7406#define vec_fp_test_data_class(X, Y, Z) \8902#define vec_fp_test_data_class(X, Y, Z) \
7407 ((vector bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))8903 ((vector bool long long)__builtin_s390_vftcidb((X), (Y), (Z)))
8904#endif
8905
8906#define __VEC_CLASS_FP_ZERO_P (1 << 11)
8907#define __VEC_CLASS_FP_ZERO_N (1 << 10)
8908#define __VEC_CLASS_FP_ZERO (__VEC_CLASS_FP_ZERO_P | __VEC_CLASS_FP_ZERO_N)
8909#define __VEC_CLASS_FP_NORMAL_P (1 << 9)
8910#define __VEC_CLASS_FP_NORMAL_N (1 << 8)
8911#define __VEC_CLASS_FP_NORMAL (__VEC_CLASS_FP_NORMAL_P | \
8912 __VEC_CLASS_FP_NORMAL_N)
8913#define __VEC_CLASS_FP_SUBNORMAL_P (1 << 7)
8914#define __VEC_CLASS_FP_SUBNORMAL_N (1 << 6)
8915#define __VEC_CLASS_FP_SUBNORMAL (__VEC_CLASS_FP_SUBNORMAL_P | \
8916 __VEC_CLASS_FP_SUBNORMAL_N)
8917#define __VEC_CLASS_FP_INFINITY_P (1 << 5)
8918#define __VEC_CLASS_FP_INFINITY_N (1 << 4)
8919#define __VEC_CLASS_FP_INFINITY (__VEC_CLASS_FP_INFINITY_P | \
8920 __VEC_CLASS_FP_INFINITY_N)
8921#define __VEC_CLASS_FP_QNAN_P (1 << 3)
8922#define __VEC_CLASS_FP_QNAN_N (1 << 2)
8923#define __VEC_CLASS_FP_QNAN (__VEC_CLASS_FP_QNAN_P | __VEC_CLASS_FP_QNAN_N)
8924#define __VEC_CLASS_FP_SNAN_P (1 << 1)
8925#define __VEC_CLASS_FP_SNAN_N (1 << 0)
8926#define __VEC_CLASS_FP_SNAN (__VEC_CLASS_FP_SNAN_P | __VEC_CLASS_FP_SNAN_N)
8927#define __VEC_CLASS_FP_NAN (__VEC_CLASS_FP_QNAN | __VEC_CLASS_FP_SNAN)
8928#define __VEC_CLASS_FP_NOT_NORMAL (__VEC_CLASS_FP_NAN | \
8929 __VEC_CLASS_FP_SUBNORMAL | \
8930 __VEC_CLASS_FP_ZERO | \
8931 __VEC_CLASS_FP_INFINITY)
74088932
7409/*-- vec_cp_until_zero ------------------------------------------------------*/8933/*-- vec_cp_until_zero ------------------------------------------------------*/
74108934
c_headers/x86intrin.h+7-1
...@@ -72,6 +72,10 @@...@@ -72,6 +72,10 @@
72#include <tbmintrin.h>72#include <tbmintrin.h>
73#endif73#endif
7474
75#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LWP__)
76#include <lwpintrin.h>
77#endif
78
75#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__)79#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__)
76#include <f16cintrin.h>80#include <f16cintrin.h>
77#endif81#endif
...@@ -80,6 +84,8 @@...@@ -80,6 +84,8 @@
80#include <mwaitxintrin.h>84#include <mwaitxintrin.h>
81#endif85#endif
8286
83/* FIXME: LWP */87#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLZERO__)
88#include <clzerointrin.h>
89#endif
8490
85#endif /* __X86INTRIN_H */91#endif /* __X86INTRIN_H */
c_headers/xmmintrin.h+34-37
...@@ -2067,7 +2067,7 @@ _mm_storer_ps(float *__p, __m128 __a)...@@ -2067,7 +2067,7 @@ _mm_storer_ps(float *__p, __m128 __a)
2067/// _MM_HINT_T1: Move data using the T1 hint. The PREFETCHT1 instruction will2067/// _MM_HINT_T1: Move data using the T1 hint. The PREFETCHT1 instruction will
2068/// be generated. \n2068/// be generated. \n
2069/// _MM_HINT_T2: Move data using the T2 hint. The PREFETCHT2 instruction will2069/// _MM_HINT_T2: Move data using the T2 hint. The PREFETCHT2 instruction will
2070/// be generated. 2070/// be generated.
2071#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))2071#define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, (sel)))
2072#endif2072#endif
20732073
...@@ -2099,7 +2099,7 @@ _mm_stream_pi(__m64 *__p, __m64 __a)...@@ -2099,7 +2099,7 @@ _mm_stream_pi(__m64 *__p, __m64 __a)
2099///2099///
2100/// \param __p2100/// \param __p
2101/// A pointer to a 128-bit aligned memory location that will receive the2101/// A pointer to a 128-bit aligned memory location that will receive the
2102/// integer values.2102/// single-precision floating-point values.
2103/// \param __a2103/// \param __a
2104/// A 128-bit vector of [4 x float] containing the values to be moved.2104/// A 128-bit vector of [4 x float] containing the values to be moved.
2105static __inline__ void __DEFAULT_FN_ATTRS2105static __inline__ void __DEFAULT_FN_ATTRS
...@@ -2133,7 +2133,7 @@ void _mm_sfence(void);...@@ -2133,7 +2133,7 @@ void _mm_sfence(void);
2133/// \headerfile <x86intrin.h>2133/// \headerfile <x86intrin.h>
2134///2134///
2135/// \code2135/// \code
2136/// void _mm_extract_pi(__m64 a, int n);2136/// int _mm_extract_pi16(__m64 a, int n);
2137/// \endcode2137/// \endcode
2138///2138///
2139/// This intrinsic corresponds to the <c> VPEXTRW / PEXTRW </c> instruction.2139/// This intrinsic corresponds to the <c> VPEXTRW / PEXTRW </c> instruction.
...@@ -2157,7 +2157,7 @@ void _mm_sfence(void);...@@ -2157,7 +2157,7 @@ void _mm_sfence(void);
2157/// \headerfile <x86intrin.h>2157/// \headerfile <x86intrin.h>
2158///2158///
2159/// \code2159/// \code
2160/// void _mm_insert_pi(__m64 a, int d, int n);2160/// __m64 _mm_insert_pi16(__m64 a, int d, int n);
2161/// \endcode2161/// \endcode
2162///2162///
2163/// This intrinsic corresponds to the <c> VPINSRW / PINSRW </c> instruction.2163/// This intrinsic corresponds to the <c> VPINSRW / PINSRW </c> instruction.
...@@ -2331,8 +2331,10 @@ _mm_mulhi_pu16(__m64 __a, __m64 __b)...@@ -2331,8 +2331,10 @@ _mm_mulhi_pu16(__m64 __a, __m64 __b)
2331/// \brief Conditionally copies the values from each 8-bit element in the first2331/// \brief Conditionally copies the values from each 8-bit element in the first
2332/// 64-bit integer vector operand to the specified memory location, as2332/// 64-bit integer vector operand to the specified memory location, as
2333/// specified by the most significant bit in the corresponding element in the2333/// specified by the most significant bit in the corresponding element in the
2334/// second 64-bit integer vector operand. To minimize caching, the data is2334/// second 64-bit integer vector operand.
2335/// flagged as non-temporal (unlikely to be used again soon).2335///
2336/// To minimize caching, the data is flagged as non-temporal
2337/// (unlikely to be used again soon).
2336///2338///
2337/// \headerfile <x86intrin.h>2339/// \headerfile <x86intrin.h>
2338///2340///
...@@ -2435,17 +2437,17 @@ extern "C" {...@@ -2435,17 +2437,17 @@ extern "C" {
2435/// For checking exception masks: _MM_MASK_UNDERFLOW, _MM_MASK_OVERFLOW,2437/// For checking exception masks: _MM_MASK_UNDERFLOW, _MM_MASK_OVERFLOW,
2436/// _MM_MASK_INVALID, _MM_MASK_DENORM, _MM_MASK_DIV_ZERO, _MM_MASK_INEXACT.2438/// _MM_MASK_INVALID, _MM_MASK_DENORM, _MM_MASK_DIV_ZERO, _MM_MASK_INEXACT.
2437/// There is a convenience wrapper _MM_GET_EXCEPTION_MASK().2439/// There is a convenience wrapper _MM_GET_EXCEPTION_MASK().
2438/// </li> 2440/// </li>
2439/// <li>2441/// <li>
2440/// For checking rounding modes: _MM_ROUND_NEAREST, _MM_ROUND_DOWN,2442/// For checking rounding modes: _MM_ROUND_NEAREST, _MM_ROUND_DOWN,
2441/// _MM_ROUND_UP, _MM_ROUND_TOWARD_ZERO. There is a convenience wrapper2443/// _MM_ROUND_UP, _MM_ROUND_TOWARD_ZERO. There is a convenience wrapper
2442/// _MM_GET_ROUNDING_MODE(x) where x is one of these macros.2444/// _MM_GET_ROUNDING_MODE(x) where x is one of these macros.
2443/// </li>2445/// </li>
2444/// <li> 2446/// <li>
2445/// For checking flush-to-zero mode: _MM_FLUSH_ZERO_ON, _MM_FLUSH_ZERO_OFF.2447/// For checking flush-to-zero mode: _MM_FLUSH_ZERO_ON, _MM_FLUSH_ZERO_OFF.
2446/// There is a convenience wrapper _MM_GET_FLUSH_ZERO_MODE().2448/// There is a convenience wrapper _MM_GET_FLUSH_ZERO_MODE().
2447/// </li>2449/// </li>
2448/// <li> 2450/// <li>
2449/// For checking denormals-are-zero mode: _MM_DENORMALS_ZERO_ON,2451/// For checking denormals-are-zero mode: _MM_DENORMALS_ZERO_ON,
2450/// _MM_DENORMALS_ZERO_OFF. There is a convenience wrapper2452/// _MM_DENORMALS_ZERO_OFF. There is a convenience wrapper
2451/// _MM_GET_DENORMALS_ZERO_MODE().2453/// _MM_GET_DENORMALS_ZERO_MODE().
...@@ -2468,11 +2470,11 @@ extern "C" {...@@ -2468,11 +2470,11 @@ extern "C" {
2468unsigned int _mm_getcsr(void);2470unsigned int _mm_getcsr(void);
24692471
2470/// \brief Sets the MXCSR register with the 32-bit unsigned integer value.2472/// \brief Sets the MXCSR register with the 32-bit unsigned integer value.
2471/// 2473///
2472/// There are several groups of macros associated with this intrinsic,2474/// There are several groups of macros associated with this intrinsic,
2473/// including:2475/// including:
2474/// <ul>2476/// <ul>
2475/// <li> 2477/// <li>
2476/// For setting exception states: _MM_EXCEPT_INVALID, _MM_EXCEPT_DIV_ZERO,2478/// For setting exception states: _MM_EXCEPT_INVALID, _MM_EXCEPT_DIV_ZERO,
2477/// _MM_EXCEPT_DENORM, _MM_EXCEPT_OVERFLOW, _MM_EXCEPT_UNDERFLOW,2479/// _MM_EXCEPT_DENORM, _MM_EXCEPT_OVERFLOW, _MM_EXCEPT_UNDERFLOW,
2478/// _MM_EXCEPT_INEXACT. There is a convenience wrapper2480/// _MM_EXCEPT_INEXACT. There is a convenience wrapper
...@@ -2517,7 +2519,7 @@ unsigned int _mm_getcsr(void);...@@ -2517,7 +2519,7 @@ unsigned int _mm_getcsr(void);
2517///2519///
2518/// \param __i2520/// \param __i
2519/// A 32-bit unsigned integer value to be written to the MXCSR register.2521/// A 32-bit unsigned integer value to be written to the MXCSR register.
2520void _mm_setcsr(unsigned int);2522void _mm_setcsr(unsigned int __i);
25212523
2522#if defined(__cplusplus)2524#if defined(__cplusplus)
2523} // extern "C"2525} // extern "C"
...@@ -2540,7 +2542,7 @@ void _mm_setcsr(unsigned int);...@@ -2540,7 +2542,7 @@ void _mm_setcsr(unsigned int);
2540/// A 128-bit vector of [4 x float].2542/// A 128-bit vector of [4 x float].
2541/// \param mask2543/// \param mask
2542/// An immediate value containing an 8-bit value specifying which elements to2544/// An immediate value containing an 8-bit value specifying which elements to
2543/// copy from \ a and \a b. \n2545/// copy from \a a and \a b. \n
2544/// Bits [3:0] specify the values copied from operand \a a. \n2546/// Bits [3:0] specify the values copied from operand \a a. \n
2545/// Bits [7:4] specify the values copied from operand \a b. \n2547/// Bits [7:4] specify the values copied from operand \a b. \n
2546/// The destinations within the 128-bit destination are assigned values as2548/// The destinations within the 128-bit destination are assigned values as
...@@ -2678,8 +2680,7 @@ _mm_movelh_ps(__m128 __a, __m128 __b)...@@ -2678,8 +2680,7 @@ _mm_movelh_ps(__m128 __a, __m128 __b)
2678///2680///
2679/// \headerfile <x86intrin.h>2681/// \headerfile <x86intrin.h>
2680///2682///
2681/// This intrinsic corresponds to the <c> CVTPI2PS + \c COMPOSITE </c>2683/// This intrinsic corresponds to the <c> CVTPI2PS + COMPOSITE </c> instruction.
2682/// instruction.
2683///2684///
2684/// \param __a2685/// \param __a
2685/// A 64-bit vector of [4 x i16]. The elements of the destination are copied2686/// A 64-bit vector of [4 x i16]. The elements of the destination are copied
...@@ -2709,8 +2710,7 @@ _mm_cvtpi16_ps(__m64 __a)...@@ -2709,8 +2710,7 @@ _mm_cvtpi16_ps(__m64 __a)
2709///2710///
2710/// \headerfile <x86intrin.h>2711/// \headerfile <x86intrin.h>
2711///2712///
2712/// This intrinsic corresponds to the <c> CVTPI2PS + \c COMPOSITE </c>2713/// This intrinsic corresponds to the <c> CVTPI2PS + COMPOSITE </c> instruction.
2713/// instruction.
2714///2714///
2715/// \param __a2715/// \param __a
2716/// A 64-bit vector of 16-bit unsigned integer values. The elements of the2716/// A 64-bit vector of 16-bit unsigned integer values. The elements of the
...@@ -2739,8 +2739,7 @@ _mm_cvtpu16_ps(__m64 __a)...@@ -2739,8 +2739,7 @@ _mm_cvtpu16_ps(__m64 __a)
2739///2739///
2740/// \headerfile <x86intrin.h>2740/// \headerfile <x86intrin.h>
2741///2741///
2742/// This intrinsic corresponds to the <c> CVTPI2PS + \c COMPOSITE </c>2742/// This intrinsic corresponds to the <c> CVTPI2PS + COMPOSITE </c> instruction.
2743/// instruction.
2744///2743///
2745/// \param __a2744/// \param __a
2746/// A 64-bit vector of [8 x i8]. The elements of the destination are copied2745/// A 64-bit vector of [8 x i8]. The elements of the destination are copied
...@@ -2764,8 +2763,7 @@ _mm_cvtpi8_ps(__m64 __a)...@@ -2764,8 +2763,7 @@ _mm_cvtpi8_ps(__m64 __a)
2764///2763///
2765/// \headerfile <x86intrin.h>2764/// \headerfile <x86intrin.h>
2766///2765///
2767/// This intrinsic corresponds to the <c> CVTPI2PS + \c COMPOSITE </c>2766/// This intrinsic corresponds to the <c> CVTPI2PS + COMPOSITE </c> instruction.
2768/// instruction.
2769///2767///
2770/// \param __a2768/// \param __a
2771/// A 64-bit vector of unsigned 8-bit integer values. The elements of the2769/// A 64-bit vector of unsigned 8-bit integer values. The elements of the
...@@ -2789,8 +2787,7 @@ _mm_cvtpu8_ps(__m64 __a)...@@ -2789,8 +2787,7 @@ _mm_cvtpu8_ps(__m64 __a)
2789///2787///
2790/// \headerfile <x86intrin.h>2788/// \headerfile <x86intrin.h>
2791///2789///
2792/// This intrinsic corresponds to the <c> CVTPI2PS + \c COMPOSITE </c>2790/// This intrinsic corresponds to the <c> CVTPI2PS + COMPOSITE </c> instruction.
2793/// instruction.
2794///2791///
2795/// \param __a2792/// \param __a
2796/// A 64-bit vector of [2 x i32]. The lower elements of the destination are2793/// A 64-bit vector of [2 x i32]. The lower elements of the destination are
...@@ -2815,16 +2812,16 @@ _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)...@@ -2815,16 +2812,16 @@ _mm_cvtpi32x2_ps(__m64 __a, __m64 __b)
28152812
2816/// \brief Converts each single-precision floating-point element of a 128-bit2813/// \brief Converts each single-precision floating-point element of a 128-bit
2817/// floating-point vector of [4 x float] into a 16-bit signed integer, and2814/// floating-point vector of [4 x float] into a 16-bit signed integer, and
2818/// packs the results into a 64-bit integer vector of [4 x i16]. If the2815/// packs the results into a 64-bit integer vector of [4 x i16].
2819/// floating-point element is NaN or infinity, or if the floating-point2816///
2820/// element is greater than 0x7FFFFFFF or less than -0x8000, it is converted2817/// If the floating-point element is NaN or infinity, or if the
2821/// to 0x8000. Otherwise if the floating-point element is greater than2818/// floating-point element is greater than 0x7FFFFFFF or less than -0x8000,
2822/// 0x7FFF, it is converted to 0x7FFF.2819/// it is converted to 0x8000. Otherwise if the floating-point element is
2820/// greater than 0x7FFF, it is converted to 0x7FFF.
2823///2821///
2824/// \headerfile <x86intrin.h>2822/// \headerfile <x86intrin.h>
2825///2823///
2826/// This intrinsic corresponds to the <c> CVTPS2PI + \c COMPOSITE </c>2824/// This intrinsic corresponds to the <c> CVTPS2PI + COMPOSITE </c> instruction.
2827/// instruction.
2828///2825///
2829/// \param __a2826/// \param __a
2830/// A 128-bit floating-point vector of [4 x float].2827/// A 128-bit floating-point vector of [4 x float].
...@@ -2845,16 +2842,16 @@ _mm_cvtps_pi16(__m128 __a)...@@ -2845,16 +2842,16 @@ _mm_cvtps_pi16(__m128 __a)
2845/// \brief Converts each single-precision floating-point element of a 128-bit2842/// \brief Converts each single-precision floating-point element of a 128-bit
2846/// floating-point vector of [4 x float] into an 8-bit signed integer, and2843/// floating-point vector of [4 x float] into an 8-bit signed integer, and
2847/// packs the results into the lower 32 bits of a 64-bit integer vector of2844/// packs the results into the lower 32 bits of a 64-bit integer vector of
2848/// [8 x i8]. The upper 32 bits of the vector are set to 0. If the2845/// [8 x i8]. The upper 32 bits of the vector are set to 0.
2849/// floating-point element is NaN or infinity, or if the floating-point2846///
2850/// element is greater than 0x7FFFFFFF or less than -0x80, it is converted2847/// If the floating-point element is NaN or infinity, or if the
2851/// to 0x80. Otherwise if the floating-point element is greater than 0x7F,2848/// floating-point element is greater than 0x7FFFFFFF or less than -0x80, it
2852/// it is converted to 0x7F.2849/// is converted to 0x80. Otherwise if the floating-point element is greater
2850/// than 0x7F, it is converted to 0x7F.
2853///2851///
2854/// \headerfile <x86intrin.h>2852/// \headerfile <x86intrin.h>
2855///2853///
2856/// This intrinsic corresponds to the <c> CVTPS2PI + \c COMPOSITE </c>2854/// This intrinsic corresponds to the <c> CVTPS2PI + COMPOSITE </c> instruction.
2857/// instruction.
2858///2855///
2859/// \param __a2856/// \param __a
2860/// 128-bit floating-point vector of [4 x float].2857/// 128-bit floating-point vector of [4 x float].
c_headers/xopintrin.h+2-2
...@@ -198,13 +198,13 @@ _mm_hsubq_epi32(__m128i __A)...@@ -198,13 +198,13 @@ _mm_hsubq_epi32(__m128i __A)
198static __inline__ __m128i __DEFAULT_FN_ATTRS198static __inline__ __m128i __DEFAULT_FN_ATTRS
199_mm_cmov_si128(__m128i __A, __m128i __B, __m128i __C)199_mm_cmov_si128(__m128i __A, __m128i __B, __m128i __C)
200{200{
201 return (__m128i)__builtin_ia32_vpcmov((__v2di)__A, (__v2di)__B, (__v2di)__C);201 return (__m128i)(((__v2du)__A & (__v2du)__C) | ((__v2du)__B & ~(__v2du)__C));
202}202}
203203
204static __inline__ __m256i __DEFAULT_FN_ATTRS204static __inline__ __m256i __DEFAULT_FN_ATTRS
205_mm256_cmov_si256(__m256i __A, __m256i __B, __m256i __C)205_mm256_cmov_si256(__m256i __A, __m256i __B, __m256i __C)
206{206{
207 return (__m256i)__builtin_ia32_vpcmov_256((__v4di)__A, (__v4di)__B, (__v4di)__C);207 return (__m256i)(((__v4du)__A & (__v4du)__C) | ((__v4du)__B & ~(__v4du)__C));
208}208}
209209
210static __inline__ __m128i __DEFAULT_FN_ATTRS210static __inline__ __m128i __DEFAULT_FN_ATTRS
doc/targets.md+1-1
...@@ -2,7 +2,7 @@...@@ -2,7 +2,7 @@
22
3Create bootstrap code in std/bootstrap.zig and add conditional compilation3Create bootstrap code in std/bootstrap.zig and add conditional compilation
4logic. This code is responsible for the real executable entry point, calling4logic. This code is responsible for the real executable entry point, calling
5main(argc, argv, env) and making the exit syscall when main returns.5main() and making the exit syscall when main returns.
66
7How to pass a byvalue struct parameter in the C calling convention is7How to pass a byvalue struct parameter in the C calling convention is
8target-specific. Add logic for how to do function prototypes and function calls8target-specific. Add logic for how to do function prototypes and function calls