15 #ifndef NO_WARN_X86_INTRINSICS
26 "Please read comment above. Use -DNO_WARN_X86_INTRINSICS to disable this error."
32 #if defined(__linux__) && defined(__ppc64__)
35 #include <emmintrin.h>
38 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
40 return (
unsigned char)((__v16qi)__X)[__N & 15];
44 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
46 return ((__v4si)__X)[__N & 3];
50 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
51 _mm_extract_epi64(__m128i __X,
const int __N) {
52 return ((__v2di)__X)[__N & 1];
56 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
58 return ((__v4si)__X)[__N & 3];
61 extern __inline __m128i
62 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
64 __v16qi __charmask =
vec_splats((
signed char)__imm8);
65 __charmask = vec_gb(__charmask);
66 __v8hu __shortmask = (__v8hu)
vec_unpackh(__charmask);
70 return (__m128i)
vec_sel((__v8hu)__A, (__v8hu)__B, __shortmask);
73 extern __inline __m128i
74 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
76 const __v16qu __seven =
vec_splats((
unsigned char)0x07);
77 __v16qu __lmask =
vec_sra((__v16qu)__mask, __seven);
78 return (__m128i)
vec_sel((__v16qu)__A, (__v16qu)__B, __lmask);
82 #include_next <smmintrin.h>
_Float16 __2f16 __attribute__((ext_vector_type(2)))
Zeroes the upper 128 bits (bits 255:128) of all YMM registers.
static __inline__ vector signed char __ATTRS_o_ai vec_sra(vector signed char __a, vector unsigned char __b)
static __ATTRS_o_ai vector bool char vec_reve(vector bool char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_splats(signed char __a)
static __inline__ vector signed char __ATTRS_o_ai vec_sel(vector signed char __a, vector signed char __b, vector unsigned char __c)
static __inline__ vector short __ATTRS_o_ai vec_unpackh(vector signed char __a)
#define _mm_blend_epi16(V1, V2, M)
Returns a 128-bit vector of [8 x i16] where the values are selected from either of the first or secon...
#define _mm_extract_epi8(X, N)
Extracts an 8-bit element from the 128-bit integer vector of [16 x i8], using the immediate value par...
#define _mm_extract_ps(X, N)
Extracts a 32-bit integer from a 128-bit vector of [4 x float] and returns it, using the immediate va...
#define _mm_extract_epi32(X, N)
Extracts a 32-bit element from the 128-bit integer vector of [4 x i32], using the immediate value par...
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_blendv_epi8(__m128i __V1, __m128i __V2, __m128i __M)
Returns a 128-bit vector of [16 x i8] where the values are selected from either of the first or secon...