ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
pmmintrin.h
Go to the documentation of this file.
1 /*===---- pmmintrin.h - SSE3 intrinsics ------------------------------------===
2  *
3  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4  * See https://llvm.org/LICENSE.txt for license information.
5  * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6  *
7  *===-----------------------------------------------------------------------===
8  */
9 
10 #ifndef __PMMINTRIN_H
11 #define __PMMINTRIN_H
12 
13 #include <emmintrin.h>
14 
15 /* Define the default attributes for the functions in this file. */
16 #define __DEFAULT_FN_ATTRS \
17  __attribute__((__always_inline__, __nodebug__, __target__("sse3"), __min_vector_width__(128)))
18 
33 static __inline__ __m128i __DEFAULT_FN_ATTRS
34 _mm_lddqu_si128(__m128i const *__p)
35 {
36  return (__m128i)__builtin_ia32_lddqu((char const *)__p);
37 }
38 
52 static __inline__ __m128 __DEFAULT_FN_ATTRS
53 _mm_addsub_ps(__m128 __a, __m128 __b)
54 {
55  return __builtin_ia32_addsubps((__v4sf)__a, (__v4sf)__b);
56 }
57 
75 static __inline__ __m128 __DEFAULT_FN_ATTRS
76 _mm_hadd_ps(__m128 __a, __m128 __b)
77 {
78  return __builtin_ia32_haddps((__v4sf)__a, (__v4sf)__b);
79 }
80 
98 static __inline__ __m128 __DEFAULT_FN_ATTRS
99 _mm_hsub_ps(__m128 __a, __m128 __b)
100 {
101  return __builtin_ia32_hsubps((__v4sf)__a, (__v4sf)__b);
102 }
103 
120 static __inline__ __m128 __DEFAULT_FN_ATTRS
122 {
123  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 1, 1, 3, 3);
124 }
125 
141 static __inline__ __m128 __DEFAULT_FN_ATTRS
143 {
144  return __builtin_shufflevector((__v4sf)__a, (__v4sf)__a, 0, 0, 2, 2);
145 }
146 
160 static __inline__ __m128d __DEFAULT_FN_ATTRS
161 _mm_addsub_pd(__m128d __a, __m128d __b)
162 {
163  return __builtin_ia32_addsubpd((__v2df)__a, (__v2df)__b);
164 }
165 
183 static __inline__ __m128d __DEFAULT_FN_ATTRS
184 _mm_hadd_pd(__m128d __a, __m128d __b)
185 {
186  return __builtin_ia32_haddpd((__v2df)__a, (__v2df)__b);
187 }
188 
206 static __inline__ __m128d __DEFAULT_FN_ATTRS
207 _mm_hsub_pd(__m128d __a, __m128d __b)
208 {
209  return __builtin_ia32_hsubpd((__v2df)__a, (__v2df)__b);
210 }
211 
227 #define _mm_loaddup_pd(dp) _mm_load1_pd(dp)
228 
242 static __inline__ __m128d __DEFAULT_FN_ATTRS
244 {
245  return __builtin_shufflevector((__v2df)__a, (__v2df)__a, 0, 0);
246 }
247 
263 static __inline__ void __DEFAULT_FN_ATTRS
264 _mm_monitor(void const *__p, unsigned __extensions, unsigned __hints)
265 {
266  __builtin_ia32_monitor(__p, __extensions, __hints);
267 }
268 
282 static __inline__ void __DEFAULT_FN_ATTRS
283 _mm_mwait(unsigned __extensions, unsigned __hints)
284 {
285  __builtin_ia32_mwait(__extensions, __hints);
286 }
287 
288 #undef __DEFAULT_FN_ATTRS
289 
290 #endif /* __PMMINTRIN_H */
static __inline unsigned char unsigned int unsigned int unsigned int * __p
Definition: adxintrin.h:24
static __inline__ vector float vector float __b
Definition: altivec.h:520
static __inline__ void int __a
Definition: emmintrin.h:4185
static __inline__ __m128i __DEFAULT_FN_ATTRS _mm_lddqu_si128(__m128i const *__p)
Loads data from an unaligned memory location to elements in a 128-bit vector.
Definition: pmmintrin.h:34
static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_hadd_pd(__m128d __a, __m128d __b)
Horizontally adds the pairs of values contained in two 128-bit vectors of [2 x double].
Definition: pmmintrin.h:184
static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_movedup_pd(__m128d __a)
Moves and duplicates the double-precision value in the lower bits of a 128-bit vector of [2 x double]...
Definition: pmmintrin.h:243
#define __DEFAULT_FN_ATTRS
Definition: pmmintrin.h:16
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_hadd_ps(__m128 __a, __m128 __b)
Horizontally adds the adjacent pairs of values contained in two 128-bit vectors of [4 x float].
Definition: pmmintrin.h:76
static __inline__ void __DEFAULT_FN_ATTRS _mm_mwait(unsigned __extensions, unsigned __hints)
Used with the MONITOR instruction to wait while the processor is in the monitor event pending state.
Definition: pmmintrin.h:283
static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_addsub_pd(__m128d __a, __m128d __b)
Adds the even-indexed values and subtracts the odd-indexed values of two 128-bit vectors of [2 x doub...
Definition: pmmintrin.h:161
static __inline__ __m128d __DEFAULT_FN_ATTRS _mm_hsub_pd(__m128d __a, __m128d __b)
Horizontally subtracts the pairs of values contained in two 128-bit vectors of [2 x double].
Definition: pmmintrin.h:207
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_movehdup_ps(__m128 __a)
Moves and duplicates odd-indexed values from a 128-bit vector of [4 x float] to float values stored i...
Definition: pmmintrin.h:121
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_moveldup_ps(__m128 __a)
Duplicates even-indexed values from a 128-bit vector of [4 x float] to float values stored in a 128-b...
Definition: pmmintrin.h:142
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_addsub_ps(__m128 __a, __m128 __b)
Adds the even-indexed values and subtracts the odd-indexed values of two 128-bit vectors of [4 x floa...
Definition: pmmintrin.h:53
static __inline__ __m128 __DEFAULT_FN_ATTRS _mm_hsub_ps(__m128 __a, __m128 __b)
Horizontally subtracts the adjacent pairs of values contained in two 128-bit vectors of [4 x float].
Definition: pmmintrin.h:99
static __inline__ void __DEFAULT_FN_ATTRS _mm_monitor(void const *__p, unsigned __extensions, unsigned __hints)
Establishes a linear address memory range to be monitored and puts the processor in the monitor event...
Definition: pmmintrin.h:264