]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/i386/immintrin.h
Daily bump.
[thirdparty/gcc.git] / gcc / config / i386 / immintrin.h
CommitLineData
cbe34bb5 1/* Copyright (C) 2008-2017 Free Software Foundation, Inc.
21898431
L
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
748086b7 7 the Free Software Foundation; either version 3, or (at your option)
21898431
L
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
748086b7
JJ
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/>. */
21898431
L
23
24#ifndef _IMMINTRIN_H_INCLUDED
25#define _IMMINTRIN_H_INCLUDED
26
21898431 27#include <mmintrin.h>
21898431 28
21898431 29#include <xmmintrin.h>
21898431 30
21898431 31#include <emmintrin.h>
21898431 32
21898431 33#include <pmmintrin.h>
21898431 34
21898431 35#include <tmmintrin.h>
21898431 36
21898431 37#include <smmintrin.h>
21898431 38
21898431 39#include <wmmintrin.h>
21898431 40
21898431 41#include <avxintrin.h>
21898431 42
977e83a3 43#include <avx2intrin.h>
977e83a3 44
756c5857
AI
45#include <avx512fintrin.h>
46
47#include <avx512erintrin.h>
48
49#include <avx512pfintrin.h>
50
51#include <avx512cdintrin.h>
52
936c0fe4
AI
53#include <avx512vlintrin.h>
54
55#include <avx512bwintrin.h>
56
57#include <avx512dqintrin.h>
58
59#include <avx512vlbwintrin.h>
60
61#include <avx512vldqintrin.h>
62
4190ea38
IT
63#include <avx512ifmaintrin.h>
64
65#include <avx512ifmavlintrin.h>
66
3dcc8af5
IT
67#include <avx512vbmiintrin.h>
68
69#include <avx512vbmivlintrin.h>
70
5fbb13a7
KY
71#include <avx5124fmapsintrin.h>
72
73#include <avx5124vnniwintrin.h>
74
79fc8ffe
AS
75#include <avx512vpopcntdqintrin.h>
76
c1618f82
AI
77#include <shaintrin.h>
78
f13677ba 79#include <lzcntintrin.h>
f13677ba 80
f13677ba 81#include <bmiintrin.h>
f13677ba 82
f13677ba 83#include <bmi2intrin.h>
f13677ba 84
2ddd46d6 85#include <fmaintrin.h>
2ddd46d6 86
87ca01b7 87#include <f16cintrin.h>
87ca01b7 88
bf2eaa3f 89#include <rtmintrin.h>
bf2eaa3f 90
bf2eaa3f 91#include <xtestintrin.h>
bf2eaa3f 92
2a25448c
IT
93#include <cetintrin.h>
94
97db2bf7
ST
95#ifndef __RDRND__
96#pragma GCC push_options
97#pragma GCC target("rdrnd")
98#define __DISABLE_RDRND__
99#endif /* __RDRND__ */
11c4a1c0 100extern __inline int
4ee89d5f 101__attribute__((__gnu_inline__, __always_inline__, __artificial__))
11c4a1c0 102_rdrand16_step (unsigned short *__P)
4ee89d5f 103{
11c4a1c0 104 return __builtin_ia32_rdrand16_step (__P);
4ee89d5f
L
105}
106
11c4a1c0 107extern __inline int
4ee89d5f 108__attribute__((__gnu_inline__, __always_inline__, __artificial__))
11c4a1c0 109_rdrand32_step (unsigned int *__P)
4ee89d5f 110{
11c4a1c0 111 return __builtin_ia32_rdrand32_step (__P);
4ee89d5f 112}
97db2bf7
ST
113#ifdef __DISABLE_RDRND__
114#undef __DISABLE_RDRND__
115#pragma GCC pop_options
116#endif /* __DISABLE_RDRND__ */
4ee89d5f 117
1d516992
JK
118#ifndef __RDPID__
119#pragma GCC push_options
120#pragma GCC target("rdpid")
121#define __DISABLE_RDPID__
122#endif /* __RDPID__ */
123extern __inline unsigned int
124__attribute__((__gnu_inline__, __always_inline__, __artificial__))
125_rdpid_u32 (void)
126{
127 return __builtin_ia32_rdpid ();
128}
129#ifdef __DISABLE_RDPID__
130#undef __DISABLE_RDPID__
131#pragma GCC pop_options
132#endif /* __DISABLE_RDPID__ */
133
4ee89d5f 134#ifdef __x86_64__
97db2bf7
ST
135
136#ifndef __FSGSBASE__
137#pragma GCC push_options
138#pragma GCC target("fsgsbase")
139#define __DISABLE_FSGSBASE__
140#endif /* __FSGSBASE__ */
4ee89d5f
L
141extern __inline unsigned int
142__attribute__((__gnu_inline__, __always_inline__, __artificial__))
143_readfsbase_u32 (void)
144{
145 return __builtin_ia32_rdfsbase32 ();
146}
147
148extern __inline unsigned long long
149__attribute__((__gnu_inline__, __always_inline__, __artificial__))
150_readfsbase_u64 (void)
151{
152 return __builtin_ia32_rdfsbase64 ();
153}
154
155extern __inline unsigned int
156__attribute__((__gnu_inline__, __always_inline__, __artificial__))
157_readgsbase_u32 (void)
158{
159 return __builtin_ia32_rdgsbase32 ();
160}
161
162extern __inline unsigned long long
163__attribute__((__gnu_inline__, __always_inline__, __artificial__))
164_readgsbase_u64 (void)
165{
166 return __builtin_ia32_rdgsbase64 ();
167}
168
169extern __inline void
170__attribute__((__gnu_inline__, __always_inline__, __artificial__))
171_writefsbase_u32 (unsigned int __B)
172{
173 __builtin_ia32_wrfsbase32 (__B);
174}
175
176extern __inline void
177__attribute__((__gnu_inline__, __always_inline__, __artificial__))
178_writefsbase_u64 (unsigned long long __B)
179{
180 __builtin_ia32_wrfsbase64 (__B);
181}
182
183extern __inline void
184__attribute__((__gnu_inline__, __always_inline__, __artificial__))
185_writegsbase_u32 (unsigned int __B)
186{
187 __builtin_ia32_wrgsbase32 (__B);
188}
189
190extern __inline void
191__attribute__((__gnu_inline__, __always_inline__, __artificial__))
192_writegsbase_u64 (unsigned long long __B)
193{
194 __builtin_ia32_wrgsbase64 (__B);
195}
97db2bf7
ST
196#ifdef __DISABLE_FSGSBASE__
197#undef __DISABLE_FSGSBASE__
198#pragma GCC pop_options
199#endif /* __DISABLE_FSGSBASE__ */
200
201#ifndef __RDRND__
202#pragma GCC push_options
203#pragma GCC target("rdrnd")
204#define __DISABLE_RDRND__
205#endif /* __RDRND__ */
11c4a1c0 206extern __inline int
4ee89d5f 207__attribute__((__gnu_inline__, __always_inline__, __artificial__))
11c4a1c0 208_rdrand64_step (unsigned long long *__P)
4ee89d5f 209{
11c4a1c0 210 return __builtin_ia32_rdrand64_step (__P);
4ee89d5f 211}
97db2bf7
ST
212#ifdef __DISABLE_RDRND__
213#undef __DISABLE_RDRND__
214#pragma GCC pop_options
215#endif /* __DISABLE_RDRND__ */
216
4ee89d5f
L
217#endif /* __x86_64__ */
218
21898431 219#endif /* _IMMINTRIN_H_INCLUDED */