blob: 3eead044976a25a5f2664c8ac294f233fba1c802 [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
Craig Topper89cd7532017-10-12 18:57:15 +000061#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLWB__)
62#include <clwbintrin.h>
63#endif
64
Nico Weber379a1952016-05-16 18:14:07 +000065#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX__)
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000066#include <avxintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000067#endif
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +000068
Nico Weber379a1952016-05-16 18:14:07 +000069#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX2__)
Craig Topperdec792e2011-12-19 05:04:33 +000070#include <avx2intrin.h>
Craig Topper1fceff92018-05-22 20:33:04 +000071#endif
Craig Topperdec792e2011-12-19 05:04:33 +000072
Craig Topper34c8c0d2018-05-22 18:54:19 +000073#if !defined(_MSC_VER) || __has_feature(modules) || defined(__F16C__)
74#include <f16cintrin.h>
Craig Topper1fceff92018-05-22 20:33:04 +000075#endif
Paul Robinson941bc912015-12-02 18:41:52 +000076
Coby Tayreecf96c872017-12-27 09:00:31 +000077#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VPCLMULQDQ__)
78#include <vpclmulqdqintrin.h>
79#endif
80
Nico Weber379a1952016-05-16 18:14:07 +000081#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI__)
Craig Topperf2855ad2011-12-25 06:25:37 +000082#include <bmiintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000083#endif
Craig Topperf2855ad2011-12-25 06:25:37 +000084
Nico Weber379a1952016-05-16 18:14:07 +000085#if !defined(_MSC_VER) || __has_feature(modules) || defined(__BMI2__)
Craig Topperc334dd62011-12-26 02:31:10 +000086#include <bmi2intrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000087#endif
Craig Topperc334dd62011-12-26 02:31:10 +000088
Nico Weber379a1952016-05-16 18:14:07 +000089#if !defined(_MSC_VER) || __has_feature(modules) || defined(__LZCNT__)
Craig Topperf2855ad2011-12-25 06:25:37 +000090#include <lzcntintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000091#endif
Craig Topperf2855ad2011-12-25 06:25:37 +000092
Craig Topper664af9b2018-05-23 18:32:58 +000093#if !defined(_MSC_VER) || __has_feature(modules) || defined(__POPCNT__)
94#include <popcntintrin.h>
95#endif
96
Nico Weber379a1952016-05-16 18:14:07 +000097#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FMA__)
Craig Topper2b1eda32012-06-04 03:42:47 +000098#include <fmaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +000099#endif
Craig Topper2b1eda32012-06-04 03:42:47 +0000100
Nico Weber379a1952016-05-16 18:14:07 +0000101#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512F__)
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000102#include <avx512fintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000103#endif
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000104
Nico Weber379a1952016-05-16 18:14:07 +0000105#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VL__)
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000106#include <avx512vlintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000107#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000108
Nico Weber379a1952016-05-16 18:14:07 +0000109#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BW__)
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000110#include <avx512bwintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000111#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000112
Coby Tayree22685762017-12-27 10:01:00 +0000113#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512BITALG__)
114#include <avx512bitalgintrin.h>
115#endif
116
Nico Weber379a1952016-05-16 18:14:07 +0000117#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512CD__)
Asaf Badouha45b7ca2015-06-29 12:51:53 +0000118#include <avx512cdintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000119#endif
Asaf Badouha45b7ca2015-06-29 12:51:53 +0000120
Oren Ben Simhon140c1fb2017-05-25 13:44:11 +0000121#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VPOPCNTDQ__)
122#include <avx512vpopcntdqintrin.h>
123#endif
124
Craig Topperb846d1f2017-12-16 06:02:31 +0000125#if !defined(_MSC_VER) || __has_feature(modules) || \
126 (defined(__AVX512VL__) && defined(__AVX512VPOPCNTDQ__))
127#include <avx512vpopcntdqvlintrin.h>
128#endif
129
Coby Tayree3d9c88c2017-12-27 10:37:51 +0000130#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VNNI__)
131#include <avx512vnniintrin.h>
132#endif
133
134#if !defined(_MSC_VER) || __has_feature(modules) || \
135 (defined(__AVX512VL__) && defined(__AVX512VNNI__))
136#include <avx512vlvnniintrin.h>
137#endif
138
Nico Weber379a1952016-05-16 18:14:07 +0000139#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512DQ__)
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000140#include <avx512dqintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000141#endif
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000142
Nico Weber379a1952016-05-16 18:14:07 +0000143#if !defined(_MSC_VER) || __has_feature(modules) || \
Coby Tayree22685762017-12-27 10:01:00 +0000144 (defined(__AVX512VL__) && defined(__AVX512BITALG__))
145#include <avx512vlbitalgintrin.h>
146#endif
147
148#if !defined(_MSC_VER) || __has_feature(modules) || \
Nico Weber379a1952016-05-16 18:14:07 +0000149 (defined(__AVX512VL__) && defined(__AVX512BW__))
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000150#include <avx512vlbwintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000151#endif
Robert Khasanovb9f3a912014-10-08 17:18:13 +0000152
Nico Weber379a1952016-05-16 18:14:07 +0000153#if !defined(_MSC_VER) || __has_feature(modules) || \
154 (defined(__AVX512VL__) && defined(__AVX512CD__))
Michael Zuckerman8c2900f2016-04-27 11:43:14 +0000155#include <avx512vlcdintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000156#endif
Michael Zuckerman8c2900f2016-04-27 11:43:14 +0000157
Nico Weber379a1952016-05-16 18:14:07 +0000158#if !defined(_MSC_VER) || __has_feature(modules) || \
159 (defined(__AVX512VL__) && defined(__AVX512DQ__))
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000160#include <avx512vldqintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000161#endif
Elena Demikhovskye7d4c2e2015-04-30 09:24:29 +0000162
Nico Weber379a1952016-05-16 18:14:07 +0000163#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512ER__)
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000164#include <avx512erintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000165#endif
Elena Demikhovskyfcc6df32014-07-22 11:31:39 +0000166
Nico Weber379a1952016-05-16 18:14:07 +0000167#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512IFMA__)
Michael Zuckerman0190c652016-03-07 09:55:55 +0000168#include <avx512ifmaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000169#endif
Michael Zuckerman0190c652016-03-07 09:55:55 +0000170
Nico Weber379a1952016-05-16 18:14:07 +0000171#if !defined(_MSC_VER) || __has_feature(modules) || \
172 (defined(__AVX512IFMA__) && defined(__AVX512VL__))
Michael Zuckerman0190c652016-03-07 09:55:55 +0000173#include <avx512ifmavlintrin.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) || defined(__AVX512VBMI__)
Michael Zuckerman9f338482016-03-07 17:04:11 +0000177#include <avx512vbmiintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000178#endif
Michael Zuckerman9f338482016-03-07 17:04:11 +0000179
Nico Weber379a1952016-05-16 18:14:07 +0000180#if !defined(_MSC_VER) || __has_feature(modules) || \
181 (defined(__AVX512VBMI__) && defined(__AVX512VL__))
Michael Zuckerman9f338482016-03-07 17:04:11 +0000182#include <avx512vbmivlintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000183#endif
Michael Zuckerman9f338482016-03-07 17:04:11 +0000184
Coby Tayreea09663a2017-12-27 11:25:07 +0000185#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512VBMI2__)
186#include <avx512vbmi2intrin.h>
187#endif
188
189#if !defined(_MSC_VER) || __has_feature(modules) || \
190 (defined(__AVX512VBMI2__) && defined(__AVX512VL__))
191#include <avx512vlvbmi2intrin.h>
192#endif
193
Nico Weber379a1952016-05-16 18:14:07 +0000194#if !defined(_MSC_VER) || __has_feature(modules) || defined(__AVX512PF__)
Michael Zuckerman4fa96af2016-04-21 12:47:27 +0000195#include <avx512pfintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000196#endif
Michael Zuckerman4fa96af2016-04-21 12:47:27 +0000197
Nico Weber379a1952016-05-16 18:14:07 +0000198#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PKU__)
Asaf Badouha9d1e182015-12-31 14:14:07 +0000199#include <pkuintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000200#endif
Asaf Badouha9d1e182015-12-31 14:14:07 +0000201
Coby Tayreea1e5f0c2017-12-27 08:16:54 +0000202#if !defined(_MSC_VER) || __has_feature(modules) || defined(__VAES__)
203#include <vaesintrin.h>
204#endif
205
Coby Tayreef4811eb2017-12-27 08:37:47 +0000206#if !defined(_MSC_VER) || __has_feature(modules) || defined(__GFNI__)
207#include <gfniintrin.h>
208#endif
209
Craig Topper8cdb9492018-01-20 18:36:52 +0000210#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDPID__)
Adrian Prantl9fc8faf2018-05-09 01:00:01 +0000211/// Returns the value of the IA32_TSC_AUX MSR (0xc0000103).
Craig Topper8cdb9492018-01-20 18:36:52 +0000212///
213/// \headerfile <immintrin.h>
214///
215/// This intrinsic corresponds to the <c> RDPID </c> instruction.
216static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("rdpid")))
217_rdpid_u32(void) {
218 return __builtin_ia32_rdpid();
219}
220#endif // __RDPID__
221
Nico Weber379a1952016-05-16 18:14:07 +0000222#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDRND__)
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000223static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
Benjamin Kramera43b6992012-07-12 09:33:03 +0000224_rdrand16_step(unsigned short *__p)
225{
226 return __builtin_ia32_rdrand16_step(__p);
227}
228
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000229static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
Benjamin Kramera43b6992012-07-12 09:33:03 +0000230_rdrand32_step(unsigned int *__p)
231{
232 return __builtin_ia32_rdrand32_step(__p);
233}
234
Zvi Rackover064f0002017-07-10 07:13:56 +0000235#ifdef __x86_64__
236static __inline__ int __attribute__((__always_inline__, __nodebug__, __target__("rdrnd")))
237_rdrand64_step(unsigned long long *__p)
238{
239 return __builtin_ia32_rdrand64_step(__p);
240}
241#endif
242#endif /* __RDRND__ */
243
Michael Zuckermane54093f2016-06-01 12:21:00 +0000244/* __bit_scan_forward */
245static __inline__ int __attribute__((__always_inline__, __nodebug__))
246_bit_scan_forward(int __A) {
David Majnemerd4235742016-06-13 17:26:16 +0000247 return __builtin_ctz(__A);
Michael Zuckermane54093f2016-06-01 12:21:00 +0000248}
249
250/* __bit_scan_reverse */
251static __inline__ int __attribute__((__always_inline__, __nodebug__))
252_bit_scan_reverse(int __A) {
David Majnemerd4235742016-06-13 17:26:16 +0000253 return 31 - __builtin_clz(__A);
Michael Zuckermane54093f2016-06-01 12:21:00 +0000254}
255
Nico Weber379a1952016-05-16 18:14:07 +0000256#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FSGSBASE__)
Craig Topper8c7f2512014-11-03 06:51:41 +0000257#ifdef __x86_64__
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000258static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000259_readfsbase_u32(void)
260{
261 return __builtin_ia32_rdfsbase32();
262}
263
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000264static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000265_readfsbase_u64(void)
266{
267 return __builtin_ia32_rdfsbase64();
268}
269
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000270static __inline__ unsigned int __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000271_readgsbase_u32(void)
272{
273 return __builtin_ia32_rdgsbase32();
274}
275
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000276static __inline__ unsigned long long __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000277_readgsbase_u64(void)
278{
279 return __builtin_ia32_rdgsbase64();
280}
281
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000282static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000283_writefsbase_u32(unsigned int __V)
284{
Craig Topper819f2a22018-05-30 17:23:45 +0000285 __builtin_ia32_wrfsbase32(__V);
Craig Topper8c7f2512014-11-03 06:51:41 +0000286}
287
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000288static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000289_writefsbase_u64(unsigned long long __V)
290{
Craig Topper819f2a22018-05-30 17:23:45 +0000291 __builtin_ia32_wrfsbase64(__V);
Craig Topper8c7f2512014-11-03 06:51:41 +0000292}
293
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000294static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000295_writegsbase_u32(unsigned int __V)
296{
Craig Topper819f2a22018-05-30 17:23:45 +0000297 __builtin_ia32_wrgsbase32(__V);
Craig Topper8c7f2512014-11-03 06:51:41 +0000298}
299
Eric Christopher9fc7fb22015-06-17 07:09:32 +0000300static __inline__ void __attribute__((__always_inline__, __nodebug__, __target__("fsgsbase")))
Craig Topper8c7f2512014-11-03 06:51:41 +0000301_writegsbase_u64(unsigned long long __V)
302{
Craig Topper819f2a22018-05-30 17:23:45 +0000303 __builtin_ia32_wrgsbase64(__V);
Craig Topper8c7f2512014-11-03 06:51:41 +0000304}
Michael Zuckermane54093f2016-06-01 12:21:00 +0000305
Craig Topper8c7f2512014-11-03 06:51:41 +0000306#endif
Nico Weber379a1952016-05-16 18:14:07 +0000307#endif /* __FSGSBASE__ */
Craig Topper8c7f2512014-11-03 06:51:41 +0000308
Nico Weber379a1952016-05-16 18:14:07 +0000309#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RTM__)
Michael Liao625a8752012-11-10 05:17:46 +0000310#include <rtmintrin.h>
Eric Christopher3d920ee2015-06-17 18:42:07 +0000311#include <xtestintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000312#endif
Michael Liao4442f792013-03-29 05:14:06 +0000313
Nico Weber379a1952016-05-16 18:14:07 +0000314#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHA__)
Ben Langmuir6efe3a82013-09-19 14:00:22 +0000315#include <shaintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000316#endif
Ben Langmuir6efe3a82013-09-19 14:00:22 +0000317
Nico Weber379a1952016-05-16 18:14:07 +0000318#if !defined(_MSC_VER) || __has_feature(modules) || defined(__FXSR__)
Michael Kupersteina3c7b742015-06-30 09:45:38 +0000319#include <fxsrintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000320#endif
Michael Kupersteina3c7b742015-06-30 09:45:38 +0000321
Nico Weber379a1952016-05-16 18:14:07 +0000322#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVE__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000323#include <xsaveintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000324#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000325
Nico Weber379a1952016-05-16 18:14:07 +0000326#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEOPT__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000327#include <xsaveoptintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000328#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000329
Nico Weber379a1952016-05-16 18:14:07 +0000330#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVEC__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000331#include <xsavecintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000332#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000333
Nico Weber379a1952016-05-16 18:14:07 +0000334#if !defined(_MSC_VER) || __has_feature(modules) || defined(__XSAVES__)
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000335#include <xsavesintrin.h>
Nico Weber379a1952016-05-16 18:14:07 +0000336#endif
Amjad Aboud2b9b8a52015-10-13 12:29:35 +0000337
Oren Ben Simhonfec21ec2017-11-26 12:34:54 +0000338#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SHSTK__)
339#include <cetintrin.h>
340#endif
341
Eric Christopher29b78092015-06-17 18:42:03 +0000342/* Some intrinsics inside adxintrin.h are available only on processors with ADX,
343 * whereas others are also available at all times. */
Robert Khasanov83c419b2014-09-19 10:17:06 +0000344#include <adxintrin.h>
345
Craig Topper664af9b2018-05-23 18:32:58 +0000346#if !defined(_MSC_VER) || __has_feature(modules) || defined(__RDSEED__)
347#include <rdseedintrin.h>
348#endif
349
Craig Topper664af9b2018-05-23 18:32:58 +0000350#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WBNOINVD__)
351#include <wbnoinvdintrin.h>
352#endif
353
354#if !defined(_MSC_VER) || __has_feature(modules) || defined(__CLDEMOTE__)
355#include <cldemoteintrin.h>
356#endif
357
358#if !defined(_MSC_VER) || __has_feature(modules) || defined(__WAITPKG__)
359#include <waitpkgintrin.h>
360#endif
361
362#if !defined(_MSC_VER) || __has_feature(modules) || \
363 defined(__MOVDIRI__) || defined(__MOVDIR64B__)
364#include <movdirintrin.h>
365#endif
366
367#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PCONFIG__)
368#include <pconfigintrin.h>
369#endif
370
371#if !defined(_MSC_VER) || __has_feature(modules) || defined(__SGX__)
372#include <sgxintrin.h>
373#endif
374
375#if !defined(_MSC_VER) || __has_feature(modules) || defined(__PTWRITE__)
376#include <ptwriteintrin.h>
377#endif
378
Gabor Buella078bb992018-05-25 06:34:42 +0000379#if !defined(_MSC_VER) || __has_feature(modules) || defined(__INVPCID__)
380#include <invpcidintrin.h>
381#endif
382
Benjamin Kramer65b9f7b2010-08-20 18:04:07 +0000383#endif /* __IMMINTRIN_H */