Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/i386/cetintrin.h @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* Copyright (C) 2015-2017 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 #if !defined _IMMINTRIN_H_INCLUDED | |
25 # error "Never use <cetintrin.h> directly; include <x86intrin.h> instead." | |
26 #endif | |
27 | |
28 #ifndef _CETINTRIN_H_INCLUDED | |
29 #define _CETINTRIN_H_INCLUDED | |
30 | |
31 #ifndef __SHSTK__ | |
32 #pragma GCC push_options | |
33 #pragma GCC target ("shstk") | |
34 #define __DISABLE_SHSTK__ | |
35 #endif /* __SHSTK__ */ | |
36 | |
37 extern __inline unsigned int | |
38 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
39 _rdsspd (unsigned int __B) | |
40 { | |
41 return __builtin_ia32_rdsspd (__B); | |
42 } | |
43 | |
44 #ifdef __x86_64__ | |
45 extern __inline unsigned long long | |
46 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
47 _rdsspq (unsigned long long __B) | |
48 { | |
49 return __builtin_ia32_rdsspq (__B); | |
50 } | |
51 #endif | |
52 | |
53 extern __inline void | |
54 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
55 _incsspd (unsigned int __B) | |
56 { | |
57 __builtin_ia32_incsspd (__B); | |
58 } | |
59 | |
60 #ifdef __x86_64__ | |
61 extern __inline void | |
62 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
63 _incsspq (unsigned long long __B) | |
64 { | |
65 __builtin_ia32_incsspq (__B); | |
66 } | |
67 #endif | |
68 | |
69 extern __inline void | |
70 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
71 _saveprevssp (void) | |
72 { | |
73 __builtin_ia32_saveprevssp (); | |
74 } | |
75 | |
76 extern __inline void | |
77 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
78 _rstorssp (void *__B) | |
79 { | |
80 __builtin_ia32_rstorssp (__B); | |
81 } | |
82 | |
83 extern __inline void | |
84 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
85 _wrssd (unsigned int __B, void *__C) | |
86 { | |
87 __builtin_ia32_wrssd (__B, __C); | |
88 } | |
89 | |
90 #ifdef __x86_64__ | |
91 extern __inline void | |
92 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
93 _wrssq (unsigned long long __B, void *__C) | |
94 { | |
95 __builtin_ia32_wrssq (__B, __C); | |
96 } | |
97 #endif | |
98 | |
99 extern __inline void | |
100 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
101 _wrussd (unsigned int __B, void *__C) | |
102 { | |
103 __builtin_ia32_wrussd (__B, __C); | |
104 } | |
105 | |
106 #ifdef __x86_64__ | |
107 extern __inline void | |
108 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
109 _wrussq (unsigned long long __B, void *__C) | |
110 { | |
111 __builtin_ia32_wrussq (__B, __C); | |
112 } | |
113 #endif | |
114 | |
115 extern __inline void | |
116 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
117 _setssbsy (void) | |
118 { | |
119 __builtin_ia32_setssbsy (); | |
120 } | |
121 | |
122 extern __inline void | |
123 __attribute__((__gnu_inline__, __always_inline__, __artificial__)) | |
124 _clrssbsy (void *__B) | |
125 { | |
126 __builtin_ia32_clrssbsy (__B); | |
127 } | |
128 | |
129 #ifdef __DISABLE_SHSTK__ | |
130 #undef __DISABLE_SHSTK__ | |
131 #pragma GCC pop_options | |
132 #endif /* __DISABLE_SHSTK__ */ | |
133 | |
134 #endif /* _CETINTRIN_H_INCLUDED. */ |