blob: 7f91d49fbcec0126cf9dd3a7862a62be33fd7977 [file] [log] [blame]
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +00001/*===---- immintrin.h - Intel 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 __IMMINTRIN_H
25#define __IMMINTRIN_H
26
Nico Weber379a1952016-05-16 18:14:07 +000027#if !defined(_MSC_VER) || __has_feature(modules) || defined(__MMX__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000028#include <mmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000029#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000030
Nico Weber379a1952016-05-16 18:14:07 +000031#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000032#include <xmmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000033#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000034
Nico Weber379a1952016-05-16 18:14:07 +000035#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE2__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000036#include <emmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000037#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000038
Nico Weber379a1952016-05-16 18:14:07 +000039#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSE3__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000040#include <pmmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000041#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000042
Nico Weber379a1952016-05-16 18:14:07 +000043#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SSSE3__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000044#include <tmmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000045#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000046
Nico Weber379a1952016-05-16 18:14:07 +000047#if !defined(_MSC_VER) || __has_feature(modules) || \
48 (defined(__SSE4_2__) || defined(__SSE4_1__))
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000049#include <smmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000050#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000051
Nico Weber379a1952016-05-16 18:14:07 +000052#if !defined(_MSC_VER) || __has_feature(modules) || \
53 (defined(__AES__) || defined(__PCLMUL__))
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000054#include <wmmintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000055#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000056
Michael Zuckermanb9206652016-07-05 15:56:03 +000057#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLFLUSHOPT__)
58#include <clflushoptintrin.h>
59#endif
60
Nico Weber379a1952016-05-16 18:14:07 +000061#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000062#include <avxintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000063#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000064
Nico Weber379a1952016-05-16 18:14:07 +000065#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX2__)
Craig Topperdec792e2011-12-19 05:04:33 +000066#include <avx2intrin.h>
Craig Topperdec792e2011-12-19 05:04:33 +000067
Paul Robinson941bc912015-12-02 18:41:52 +000068/* The 256-bit versions of functions in f16cintrin.h.
69 Intel documents these as being in immintrin.h, and
70 they depend on typedefs from avxintrin.h. */
71
Ekaterina Romanovabf667b22016-11-20 08:35:05 +000072/// \brief Converts a 256-bit vector of [8 x float] into a 128-bit vector
73/// containing 16-bit half-precision float values.
74///
75/// \headerfile <x86intrin.h>
76///
77/// \code
78/// __m128i _mm256_cvtps_ph(__m256 a, const int imm);
79/// \endcode
80///
Ekaterina Romanova0c1c3bb2016-12-09 18:35:50 +000081/// This intrinsic corresponds to the <c> VCVTPS2PH </c> instruction.
Ekaterina Romanovabf667b22016-11-20 08:35:05 +000082///
83/// \param a
84/// A 256-bit vector containing 32-bit single-precision float values to be
85/// converted to 16-bit half-precision float values.
86/// \param imm
Ekaterina Romanovadffe45b2016-12-27 00:49:38 +000087/// An immediate value controlling rounding using bits [2:0]: \n
88/// 000: Nearest \n
89/// 001: Down \n
90/// 010: Up \n
91/// 011: Truncate \n
Ekaterina Romanovabf667b22016-11-20 08:35:05 +000092/// 1XX: Use MXCSR.RC for rounding
93/// \returns A 128-bit vector containing the converted 16-bit half-precision
94/// float values.
Paul Robinson941bc912015-12-02 18:41:52 +000095#define _mm256_cvtps_ph(a, imm) __extension__ ({ \
96 (__m128i)__builtin_ia32_vcvtps2ph256((__v8sf)(__m256)(a), (imm)); })
97
Ekaterina Romanovabf667b22016-11-20 08:35:05 +000098/// \brief Converts a 128-bit vector containing 16-bit half-precision float
99/// values into a 256-bit vector of [8 x float].
100///
101/// \headerfile <x86intrin.h>
102///
Ekaterina Romanova0c1c3bb2016-12-09 18:35:50 +0000103/// This intrinsic corresponds to the <c> VCVTPH2PS </c> instruction.
Ekaterina Romanovabf667b22016-11-20 08:35:05 +0000104///
105/// \param __a
106/// A 128-bit vector containing 16-bit half-precision float values to be
107/// converted to 32-bit single-precision float values.
108/// \returns A vector of [8 x float] containing the converted 32-bit
109/// single-precision float values.
Paul Robinson941bc912015-12-02 18:41:52 +0000110static __inline __m256 __attribute__((__always_inline__, __nodebug__, __target__("f16c")))
111_mm256_cvtph_ps(__m128i __a)
112{
113 return (__m256)__builtin_ia32_vcvtph2ps256((__v8hi)__a);
114}
Nico Weber379a1952016-05-16 18:14:07 +0000115#endif /* __AVX2__ */
Paul Robinson941bc912015-12-02 18:41:52 +0000116
Nico Weber379a1952016-05-16 18:14:07 +0000117#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__)
Craig Topperf2855ad2011-12-25 06:25:37 +0000118#include <bmiintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000119#endif
Craig Topperf2855ad2011-12-25 06:25:37 +0000120
Nico Weber379a1952016-05-16 18:14:07 +0000121#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__)
Craig Topperc334dd62011-12-26 02:31:10 +0000122#include <bmi2intrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000123#endif
Craig Topperc334dd62011-12-26 02:31:10 +0000124
Nico Weber379a1952016-05-16 18:14:07 +0000125#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__)
Craig Topperf2855ad2011-12-25 06:25:37 +0000126#include <lzcntintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000127#endif
Craig Topperf2855ad2011-12-25 06:25:37 +0000128
Nico Weber379a1952016-05-16 18:14:07 +0000129#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA__)
Craig Topper2b1eda32012-06-04 03:42:47 +0000130#include <fmaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000131#endif
Craig Topper2b1eda32012-06-04 03:42:47 +0000132
Nico Weber379a1952016-05-16 18:14:07 +0000133#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512F__)
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000134#include <avx512fintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000135#endif
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000136
Nico Weber379a1952016-05-16 18:14:07 +0000137#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VL__)
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000138#include <avx512vlintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000139#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000140
Nico Weber379a1952016-05-16 18:14:07 +0000141#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BW__)
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000142#include <avx512bwintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000143#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000144
Nico Weber379a1952016-05-16 18:14:07 +0000145#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512CD__)
Asaf Badouha45b7ca2015-06-29 12:51:53 +0000146#include <avx512cdintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000147#endif
Asaf Badouha45b7ca2015-06-29 12:51:53 +0000148
Nico Weber379a1952016-05-16 18:14:07 +0000149#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__)
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000150#include <avx512dqintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000151#endif
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000152
Nico Weber379a1952016-05-16 18:14:07 +0000153#if !defined(_MSC_VER) || __has_feature(modules) || \
154 (defined(__AVX512VL__) && defined(__AVX512BW__))
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000155#include <avx512vlbwintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000156#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000157
Nico Weber379a1952016-05-16 18:14:07 +0000158#if !defined(_MSC_VER) || __has_feature(modules) || \
159 (defined(__AVX512VL__) && defined(__AVX512CD__))
Michael Zuckerman8c2900f2016-04-27 11:43:14 +0000160#include <avx512vlcdintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000161#endif
Michael Zuckerman8c2900f2016-04-27 11:43:14 +0000162
Nico Weber379a1952016-05-16 18:14:07 +0000163#if !defined(_MSC_VER) || __has_feature(modules) || \
164 (defined(__AVX512VL__) && defined(__AVX512DQ__))
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000165#include <avx512vldqintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000166#endif
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000167
Nico Weber379a1952016-05-16 18:14:07 +0000168#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512ER__)
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000169#include <avx512erintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000170#endif
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000171
Nico Weber379a1952016-05-16 18:14:07 +0000172#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512IFMA__)
Michael Zuckerman0190c652016-03-07 09:55:55 +0000173#include <avx512ifmaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000174#endif
Michael Zuckerman0190c652016-03-07 09:55:55 +0000175
Nico Weber379a1952016-05-16 18:14:07 +0000176#if !defined(_MSC_VER) || __has_feature(modules) || \
177 (defined(__AVX512IFMA__) && defined(__AVX512VL__))
Michael Zuckerman0190c652016-03-07 09:55:55 +0000178#include <avx512ifmavlintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000179#endif
Michael Zuckerman0190c652016-03-07 09:55:55 +0000180
Nico Weber379a1952016-05-16 18:14:07 +0000181#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI__)
Michael Zuckerman9f338482016-03-07 17:04:11 +0000182#include <avx512vbmiintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000183#endif
Michael Zuckerman9f338482016-03-07 17:04:11 +0000184
Nico Weber379a1952016-05-16 18:14:07 +0000185#if !defined(_MSC_VER) || __has_feature(modules) || \
186 (defined(__AVX512VBMI__) && defined(__AVX512VL__))
Michael Zuckerman9f338482016-03-07 17:04:11 +0000187#include <avx512vbmivlintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000188#endif
Michael Zuckerman9f338482016-03-07 17:04:11 +0000189
Nico Weber379a1952016-05-16 18:14:07 +0000190#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512PF__)
Michael Zuckerman4fa96af2016-04-21 12:47:27 +0000191#include <avx512pfintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000192#endif
Michael Zuckerman4fa96af2016-04-21 12:47:27 +0000193
Nico Weber379a1952016-05-16 18:14:07 +0000194#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PKU__)
Asaf Badouha9d1e182015-12-31 14:14:07 +0000195#include <pkuintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000196#endif
Asaf Badouha9d1e182015-12-31 14:14:07 +0000197
Nico Weber379a1952016-05-16 18:14:07 +0000198#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDRND__)
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000199static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
Benjamin Kramera43b6992012-07-12 09:33:03 +0000200_rdrand16_step(unsigned short *__p)
201{
202 return __builtin_ia32_rdrand16_step(__p);
203}
204
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000205static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
Benjamin Kramera43b6992012-07-12 09:33:03 +0000206_rdrand32_step(unsigned int *__p)
207{
208 return __builtin_ia32_rdrand32_step(__p);
209}
210
Michael Zuckermane54093f2016-06-01 12:21:00 +0000211/* __bit_scan_forward */
212static __inline__ int __attribute__((__always_inline__, __nodebug__))
213_bit_scan_forward(int __A) {
David Majnemerd4235742016-06-13 17:26:16 +0000214 return __builtin_ctz(__A);
Michael Zuckermane54093f2016-06-01 12:21:00 +0000215}
216
217/* __bit_scan_reverse */
218static __inline__ int __attribute__((__always_inline__, __nodebug__))
219_bit_scan_reverse(int __A) {
David Majnemerd4235742016-06-13 17:26:16 +0000220 return 31 - __builtin_clz(__A);
Michael Zuckermane54093f2016-06-01 12:21:00 +0000221}
222
Benjamin Kramera43b6992012-07-12 09:33:03 +0000223#ifdef __x86_64__
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000224static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
Benjamin Kramera43b6992012-07-12 09:33:03 +0000225_rdrand64_step(unsigned long long *__p)
226{
227 return __builtin_ia32_rdrand64_step(__p);
228}
229#endif
Nico Weber379a1952016-05-16 18:14:07 +0000230#endif /* __RDRND__ */
Benjamin Kramera43b6992012-07-12 09:33:03 +0000231
Nico Weber379a1952016-05-16 18:14:07 +0000232#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__)
Craig Topper8c7f2512014-11-03 06:51:41 +0000233#ifdef __x86_64__
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000234static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000235_readfsbase_u32(void)
236{
237 return __builtin_ia32_rdfsbase32();
238}
239
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000240static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000241_readfsbase_u64(void)
242{
243 return __builtin_ia32_rdfsbase64();
244}
245
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000246static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000247_readgsbase_u32(void)
248{
249 return __builtin_ia32_rdgsbase32();
250}
251
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000252static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000253_readgsbase_u64(void)
254{
255 return __builtin_ia32_rdgsbase64();
256}
257
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000258static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000259_writefsbase_u32(unsigned int __V)
260{
261 return __builtin_ia32_wrfsbase32(__V);
262}
263
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000264static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000265_writefsbase_u64(unsigned long long __V)
266{
267 return __builtin_ia32_wrfsbase64(__V);
268}
269
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000270static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000271_writegsbase_u32(unsigned int __V)
272{
273 return __builtin_ia32_wrgsbase32(__V);
274}
275
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000276static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000277_writegsbase_u64(unsigned long long __V)
278{
279 return __builtin_ia32_wrgsbase64(__V);
280}
Michael Zuckermane54093f2016-06-01 12:21:00 +0000281
Craig Topper8c7f2512014-11-03 06:51:41 +0000282#endif
Nico Weber379a1952016-05-16 18:14:07 +0000283#endif /* __FSGSBASE__ */
Craig Topper8c7f2512014-11-03 06:51:41 +0000284
Nico Weber379a1952016-05-16 18:14:07 +0000285#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RTM__)
Michael Liao625a8752012-11-10 05:17:46 +0000286#include <rtmintrin.h>
Eric Christopher3d920ee2015-06-17 18:42:07 +0000287#include <xtestintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000288#endif
Michael Liao4442f792013-03-29 05:14:06 +0000289
Nico Weber379a1952016-05-16 18:14:07 +0000290#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHA__)
Ben Langmuir6efe3a82013-09-19 14:00:22 +0000291#include <shaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000292#endif
Ben Langmuir6efe3a82013-09-19 14:00:22 +0000293
Nico Weber379a1952016-05-16 18:14:07 +0000294#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FXSR__)
Michael Kupersteina3c7b742015-06-30 09:45:38 +0000295#include <fxsrintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000296#endif
Michael Kupersteina3c7b742015-06-30 09:45:38 +0000297
Nico Weber379a1952016-05-16 18:14:07 +0000298#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVE__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000299#include <xsaveintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000300#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000301
Nico Weber379a1952016-05-16 18:14:07 +0000302#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEOPT__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000303#include <xsaveoptintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000304#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000305
Nico Weber379a1952016-05-16 18:14:07 +0000306#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEC__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000307#include <xsavecintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000308#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000309
Nico Weber379a1952016-05-16 18:14:07 +0000310#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVES__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000311#include <xsavesintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000312#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000313
Eric Christopher29b78092015-06-17 18:42:03 +0000314/* Some intrinsics inside adxintrin.h are available only on processors with ADX,
315 * whereas others are also available at all times. */
Robert Khasanov83c419b2014-09-19 10:17:06 +0000316#include <adxintrin.h>
317
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +0000318#endif /* __IMMINTRIN_H */