]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/config/i386/immintrin.h
Enable support for bfloat16 which will be in Future Cooper Lake.
[thirdparty/gcc.git] / gcc / config / i386 / immintrin.h
1 /* Copyright (C) 2008-2019 Free Software Foundation, Inc.
2
3 This file is part of GCC.
4
5 GCC is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
8 any later version.
9
10 GCC is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 Under Section 7 of GPL version 3, you are granted additional
16 permissions described in the GCC Runtime Library Exception, version
17 3.1, as published by the Free Software Foundation.
18
19 You should have received a copy of the GNU General Public License and
20 a copy of the GCC Runtime Library Exception along with this program;
21 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 <http://www.gnu.org/licenses/>. */
23
24 #ifndef _IMMINTRIN_H_INCLUDED
25 #define _IMMINTRIN_H_INCLUDED
26
27 #include <mmintrin.h>
28
29 #include <xmmintrin.h>
30
31 #include <emmintrin.h>
32
33 #include <pmmintrin.h>
34
35 #include <tmmintrin.h>
36
37 #include <smmintrin.h>
38
39 #include <wmmintrin.h>
40
41 #include <fxsrintrin.h>
42
43 #include <xsaveintrin.h>
44
45 #include <xsaveoptintrin.h>
46
47 #include <xsavesintrin.h>
48
49 #include <xsavecintrin.h>
50
51 #include <avxintrin.h>
52
53 #include <avx2intrin.h>
54
55 #include <avx512fintrin.h>
56
57 #include <avx512erintrin.h>
58
59 #include <avx512pfintrin.h>
60
61 #include <avx512cdintrin.h>
62
63 #include <avx512vlintrin.h>
64
65 #include <avx512bwintrin.h>
66
67 #include <avx512dqintrin.h>
68
69 #include <avx512vlbwintrin.h>
70
71 #include <avx512vldqintrin.h>
72
73 #include <avx512ifmaintrin.h>
74
75 #include <avx512ifmavlintrin.h>
76
77 #include <avx512vbmiintrin.h>
78
79 #include <avx512vbmivlintrin.h>
80
81 #include <avx5124fmapsintrin.h>
82
83 #include <avx5124vnniwintrin.h>
84
85 #include <avx512vpopcntdqintrin.h>
86
87 #include <avx512vbmi2intrin.h>
88
89 #include <avx512vbmi2vlintrin.h>
90
91 #include <avx512vnniintrin.h>
92
93 #include <avx512vnnivlintrin.h>
94
95 #include <avx512vpopcntdqvlintrin.h>
96
97 #include <avx512bitalgintrin.h>
98
99 #include <shaintrin.h>
100
101 #include <lzcntintrin.h>
102
103 #include <bmiintrin.h>
104
105 #include <bmi2intrin.h>
106
107 #include <fmaintrin.h>
108
109 #include <f16cintrin.h>
110
111 #include <rtmintrin.h>
112
113 #include <xtestintrin.h>
114
115 #include <cetintrin.h>
116
117 #include <gfniintrin.h>
118
119 #include <vaesintrin.h>
120
121 #include <vpclmulqdqintrin.h>
122
123 #include <movdirintrin.h>
124
125 #include <sgxintrin.h>
126
127 #include <pconfigintrin.h>
128
129 #include <waitpkgintrin.h>
130
131 #include <cldemoteintrin.h>
132
133 #include <avx512bf16vlintrin.h>
134
135 #include <avx512bf16intrin.h>
136
137 #include <rdseedintrin.h>
138
139 #include <prfchwintrin.h>
140
141 #include <adxintrin.h>
142
143 #include <clwbintrin.h>
144
145 #include <clflushoptintrin.h>
146
147 #include <wbnoinvdintrin.h>
148
149 #include <pkuintrin.h>
150
151 extern __inline void
152 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
153 _wbinvd (void)
154 {
155 __builtin_ia32_wbinvd ();
156 }
157
158 #ifndef __RDRND__
159 #pragma GCC push_options
160 #pragma GCC target("rdrnd")
161 #define __DISABLE_RDRND__
162 #endif /* __RDRND__ */
163 extern __inline int
164 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
165 _rdrand16_step (unsigned short *__P)
166 {
167 return __builtin_ia32_rdrand16_step (__P);
168 }
169
170 extern __inline int
171 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
172 _rdrand32_step (unsigned int *__P)
173 {
174 return __builtin_ia32_rdrand32_step (__P);
175 }
176 #ifdef __DISABLE_RDRND__
177 #undef __DISABLE_RDRND__
178 #pragma GCC pop_options
179 #endif /* __DISABLE_RDRND__ */
180
181 #ifndef __RDPID__
182 #pragma GCC push_options
183 #pragma GCC target("rdpid")
184 #define __DISABLE_RDPID__
185 #endif /* __RDPID__ */
186 extern __inline unsigned int
187 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
188 _rdpid_u32 (void)
189 {
190 return __builtin_ia32_rdpid ();
191 }
192 #ifdef __DISABLE_RDPID__
193 #undef __DISABLE_RDPID__
194 #pragma GCC pop_options
195 #endif /* __DISABLE_RDPID__ */
196
197 #ifdef __x86_64__
198
199 #ifndef __FSGSBASE__
200 #pragma GCC push_options
201 #pragma GCC target("fsgsbase")
202 #define __DISABLE_FSGSBASE__
203 #endif /* __FSGSBASE__ */
204 extern __inline unsigned int
205 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
206 _readfsbase_u32 (void)
207 {
208 return __builtin_ia32_rdfsbase32 ();
209 }
210
211 extern __inline unsigned long long
212 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
213 _readfsbase_u64 (void)
214 {
215 return __builtin_ia32_rdfsbase64 ();
216 }
217
218 extern __inline unsigned int
219 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
220 _readgsbase_u32 (void)
221 {
222 return __builtin_ia32_rdgsbase32 ();
223 }
224
225 extern __inline unsigned long long
226 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
227 _readgsbase_u64 (void)
228 {
229 return __builtin_ia32_rdgsbase64 ();
230 }
231
232 extern __inline void
233 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
234 _writefsbase_u32 (unsigned int __B)
235 {
236 __builtin_ia32_wrfsbase32 (__B);
237 }
238
239 extern __inline void
240 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
241 _writefsbase_u64 (unsigned long long __B)
242 {
243 __builtin_ia32_wrfsbase64 (__B);
244 }
245
246 extern __inline void
247 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
248 _writegsbase_u32 (unsigned int __B)
249 {
250 __builtin_ia32_wrgsbase32 (__B);
251 }
252
253 extern __inline void
254 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
255 _writegsbase_u64 (unsigned long long __B)
256 {
257 __builtin_ia32_wrgsbase64 (__B);
258 }
259 #ifdef __DISABLE_FSGSBASE__
260 #undef __DISABLE_FSGSBASE__
261 #pragma GCC pop_options
262 #endif /* __DISABLE_FSGSBASE__ */
263
264 #ifndef __RDRND__
265 #pragma GCC push_options
266 #pragma GCC target("rdrnd")
267 #define __DISABLE_RDRND__
268 #endif /* __RDRND__ */
269 extern __inline int
270 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
271 _rdrand64_step (unsigned long long *__P)
272 {
273 return __builtin_ia32_rdrand64_step (__P);
274 }
275 #ifdef __DISABLE_RDRND__
276 #undef __DISABLE_RDRND__
277 #pragma GCC pop_options
278 #endif /* __DISABLE_RDRND__ */
279
280 #endif /* __x86_64__ */
281
282 #ifndef __PTWRITE__
283 #pragma GCC push_options
284 #pragma GCC target("ptwrite")
285 #define __DISABLE_PTWRITE__
286 #endif
287
288 #ifdef __x86_64__
289 extern __inline void
290 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
291 _ptwrite64 (unsigned long long __B)
292 {
293 __builtin_ia32_ptwrite64 (__B);
294 }
295 #endif /* __x86_64__ */
296
297 extern __inline void
298 __attribute__((__gnu_inline__, __always_inline__, __artificial__))
299 _ptwrite32 (unsigned __B)
300 {
301 __builtin_ia32_ptwrite32 (__B);
302 }
303 #ifdef __DISABLE_PTWRITE__
304 #undef __DISABLE_PTWRITE__
305 #pragma GCC pop_options
306 #endif /* __DISABLE_PTWRITE__ */
307
308 #endif /* _IMMINTRIN_H_INCLUDED */