13#if !defined(__i386__) && !defined(__x86_64__)
14#error "This header is only meant to be used on x86 and x64 architecture"
20#define __DEFAULT_FN_ATTRS \
21 __attribute__((__always_inline__, __nodebug__, \
22 __target__("ssse3,no-evex512"), __min_vector_width__(128)))
25 (__m64) __builtin_shufflevector((__v2di)(x), __extension__(__v2di){}, 0)
26#define __anyext128(x) \
27 (__m128i) __builtin_shufflevector((__v2si)(x), __extension__(__v2si){}, 0, \
45 return (__m64)__builtin_elementwise_abs((__v8qs)
__a);
63 return (__m128i)__builtin_elementwise_abs((__v16qs)
__a);
81 return (__m64)__builtin_elementwise_abs((__v4hi)
__a);
99 return (__m128i)__builtin_elementwise_abs((__v8hi)
__a);
117 return (__m64)__builtin_elementwise_abs((__v2si)
__a);
135 return (__m128i)__builtin_elementwise_abs((__v4si)
__a);
158#define _mm_alignr_epi8(a, b, n) \
159 ((__m128i)__builtin_ia32_palignr128((__v16qi)(__m128i)(a), \
160 (__v16qi)(__m128i)(b), (n)))
181#define _mm_alignr_pi8(a, b, n) \
182 ((__m64)__builtin_shufflevector( \
183 __builtin_ia32_psrldqi128_byteshift( \
184 __builtin_shufflevector((__v1di)(a), (__v1di)(b), 1, 0), \
185 (n)), __extension__ (__v2di){}, 0))
207 return (__m128i)__builtin_ia32_phaddw128((__v8hi)
__a, (__v8hi)
__b);
230 return (__m128i)__builtin_ia32_phaddd128((__v4si)
__a, (__v4si)
__b);
253 return __trunc64(__builtin_ia32_phaddw128(
254 (__v8hi)__builtin_shufflevector(
__a,
__b, 0, 1), (__v8hi){}));
277 return __trunc64(__builtin_ia32_phaddd128(
278 (__v4si)__builtin_shufflevector(
__a,
__b, 0, 1), (__v4si){}));
304 return (__m128i)__builtin_ia32_phaddsw128((__v8hi)
__a, (__v8hi)
__b);
330 return __trunc64(__builtin_ia32_phaddsw128(
331 (__v8hi)__builtin_shufflevector(
__a,
__b, 0, 1), (__v8hi){}));
354 return (__m128i)__builtin_ia32_phsubw128((__v8hi)
__a, (__v8hi)
__b);
377 return (__m128i)__builtin_ia32_phsubd128((__v4si)
__a, (__v4si)
__b);
400 return __trunc64(__builtin_ia32_phsubw128(
401 (__v8hi)__builtin_shufflevector(
__a,
__b, 0, 1), (__v8hi){}));
424 return __trunc64(__builtin_ia32_phsubd128(
425 (__v4si)__builtin_shufflevector(
__a,
__b, 0, 1), (__v4si){}));
451 return (__m128i)__builtin_ia32_phsubsw128((__v8hi)
__a, (__v8hi)
__b);
477 return __trunc64(__builtin_ia32_phsubsw128(
478 (__v8hi)__builtin_shufflevector(
__a,
__b, 0, 1), (__v8hi){}));
512 return (__m128i)__builtin_ia32_pmaddubsw128((__v16qi)
__a, (__v16qi)
__b);
563 return (__m128i)__builtin_ia32_pmulhrsw128((__v8hi)
__a, (__v8hi)
__b);
610 return (__m128i)__builtin_ia32_pshufb128((__v16qi)
__a, (__v16qi)
__b);
635 return __trunc64(__builtin_ia32_pshufb128(
636 (__v16qi)__builtin_shufflevector(
637 (__v2si)(
__a), __extension__ (__v2si){}, 0, 1, 0, 1),
664 return (__m128i)__builtin_ia32_psignb128((__v16qi)
__a, (__v16qi)
__b);
690 return (__m128i)__builtin_ia32_psignw128((__v8hi)
__a, (__v8hi)
__b);
716 return (__m128i)__builtin_ia32_psignd128((__v4si)
__a, (__v4si)
__b);
802#undef __DEFAULT_FN_ATTRS
static __inline__ vector float vector float __b
static __inline__ void int __a
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi16(__m128i __a, __m128i __b)
For each 16-bit integer in the first source operand, perform one of the following actions as specifie...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_mulhrs_pi16(__m64 __a, __m64 __b)
Multiplies packed 16-bit signed integer values, truncates the 32-bit products to the 18 most signific...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadd_epi32(__m128i __a, __m128i __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 128-bit vectors of [4 x i32].
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_abs_pi16(__m64 __a)
Computes the absolute value of each of the packed 16-bit signed integers in the source operand and st...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_abs_pi8(__m64 __a)
Computes the absolute value of each of the packed 8-bit signed integers in the source operand and sto...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hsub_pi32(__m64 __a, __m64 __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 64-bit vectors of [2 x i32]...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_maddubs_pi16(__m64 __a, __m64 __b)
Multiplies corresponding pairs of packed 8-bit unsigned integer values contained in the first source ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hsubs_pi16(__m64 __a, __m64 __b)
Horizontally subtracts, with saturation, the adjacent pairs of values contained in two packed 64-bit ...
#define __DEFAULT_FN_ATTRS
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsub_epi32(__m128i __a, __m128i __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 128-bit vectors of [4 x i32...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi8(__m128i __a)
Computes the absolute value of each of the packed 8-bit signed integers in the source operand and sto...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hadd_pi32(__m64 __a, __m64 __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 64-bit vectors of [2 x i32].
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sign_pi16(__m64 __a, __m64 __b)
For each 16-bit integer in the first source operand, perform one of the following actions as specifie...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_mulhrs_epi16(__m128i __a, __m128i __b)
Multiplies packed 16-bit signed integer values, truncates the 32-bit products to the 18 most signific...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi16(__m128i __a)
Computes the absolute value of each of the packed 16-bit signed integers in the source operand and st...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sign_pi8(__m64 __a, __m64 __b)
For each 8-bit integer in the first source operand, perform one of the following actions as specified...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_maddubs_epi16(__m128i __a, __m128i __b)
Multiplies corresponding pairs of packed 8-bit unsigned integer values contained in the first source ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_sign_pi32(__m64 __a, __m64 __b)
For each 32-bit integer in the first source operand, perform one of the following actions as specifie...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi8(__m128i __a, __m128i __b)
For each 8-bit integer in the first source operand, perform one of the following actions as specified...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsub_epi16(__m128i __a, __m128i __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hsubs_epi16(__m128i __a, __m128i __b)
Horizontally subtracts, with saturation, the adjacent pairs of values contained in two packed 128-bit...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hadd_pi16(__m64 __a, __m64 __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16].
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_abs_pi32(__m64 __a)
Computes the absolute value of each of the packed 32-bit signed integers in the source operand and st...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hsub_pi16(__m64 __a, __m64 __b)
Horizontally subtracts the adjacent pairs of values contained in 2 packed 64-bit vectors of [4 x i16]...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadds_epi16(__m128i __a, __m128i __b)
Horizontally adds, with saturation, the adjacent pairs of values contained in two packed 128-bit vect...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_sign_epi32(__m128i __a, __m128i __b)
For each 32-bit integer in the first source operand, perform one of the following actions as specifie...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_hadd_epi16(__m128i __a, __m128i __b)
Horizontally adds the adjacent pairs of values contained in 2 packed 128-bit vectors of [8 x i16].
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_shuffle_epi8(__m128i __a, __m128i __b)
Copies the 8-bit integers from a 128-bit integer vector to the destination or clears 8-bit values in ...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_hadds_pi16(__m64 __a, __m64 __b)
Horizontally adds, with saturation, the adjacent pairs of values contained in two packed 64-bit vecto...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_abs_epi32(__m128i __a)
Computes the absolute value of each of the packed 32-bit signed integers in the source operand and st...
static __inline__ __m64 __DEFAULT_FN_ATTRS _mm_shuffle_pi8(__m64 __a, __m64 __b)
Copies the 8-bit integers from a 64-bit integer vector to the destination or clears 8-bit values in t...