annotate gcc/config/i386/i386-opts.h @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Definitions for option handling for IA-32.
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
2 Copyright (C) 1988-2020 Free Software Foundation, Inc.
111
kono
parents:
diff changeset
3
kono
parents:
diff changeset
4 This file is part of GCC.
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 GCC is free software; you can redistribute it and/or modify
kono
parents:
diff changeset
7 it under the terms of the GNU General Public License as published by
kono
parents:
diff changeset
8 the Free Software Foundation; either version 3, or (at your option)
kono
parents:
diff changeset
9 any later version.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 GCC is distributed in the hope that it will be useful,
kono
parents:
diff changeset
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
kono
parents:
diff changeset
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
kono
parents:
diff changeset
14 GNU General Public License for more details.
kono
parents:
diff changeset
15
kono
parents:
diff changeset
16 Under Section 7 of GPL version 3, you are granted additional
kono
parents:
diff changeset
17 permissions described in the GCC Runtime Library Exception, version
kono
parents:
diff changeset
18 3.1, as published by the Free Software Foundation.
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 You should have received a copy of the GNU General Public License and
kono
parents:
diff changeset
21 a copy of the GCC Runtime Library Exception along with this program;
kono
parents:
diff changeset
22 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
kono
parents:
diff changeset
23 <http://www.gnu.org/licenses/>. */
kono
parents:
diff changeset
24
kono
parents:
diff changeset
25 #ifndef I386_OPTS_H
kono
parents:
diff changeset
26 #define I386_OPTS_H
kono
parents:
diff changeset
27
kono
parents:
diff changeset
28 /* Algorithm to expand string function with. */
kono
parents:
diff changeset
29 enum stringop_alg
kono
parents:
diff changeset
30 {
kono
parents:
diff changeset
31 #undef DEF_ENUM
kono
parents:
diff changeset
32 #define DEF_ENUM
kono
parents:
diff changeset
33
kono
parents:
diff changeset
34 #undef DEF_ALG
kono
parents:
diff changeset
35 #define DEF_ALG(alg, name) alg,
kono
parents:
diff changeset
36
kono
parents:
diff changeset
37 #include "stringop.def"
kono
parents:
diff changeset
38 last_alg
kono
parents:
diff changeset
39
kono
parents:
diff changeset
40 #undef DEF_ENUM
kono
parents:
diff changeset
41 #undef DEF_ALG
kono
parents:
diff changeset
42 };
kono
parents:
diff changeset
43
kono
parents:
diff changeset
44 /* Available call abi. */
kono
parents:
diff changeset
45 enum calling_abi
kono
parents:
diff changeset
46 {
kono
parents:
diff changeset
47 SYSV_ABI = 0,
kono
parents:
diff changeset
48 MS_ABI = 1
kono
parents:
diff changeset
49 };
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 enum fpmath_unit
kono
parents:
diff changeset
52 {
kono
parents:
diff changeset
53 FPMATH_387 = 1,
kono
parents:
diff changeset
54 FPMATH_SSE = 2
kono
parents:
diff changeset
55 };
kono
parents:
diff changeset
56
kono
parents:
diff changeset
57 enum tls_dialect
kono
parents:
diff changeset
58 {
kono
parents:
diff changeset
59 TLS_DIALECT_GNU,
kono
parents:
diff changeset
60 TLS_DIALECT_GNU2,
kono
parents:
diff changeset
61 TLS_DIALECT_SUN
kono
parents:
diff changeset
62 };
kono
parents:
diff changeset
63
kono
parents:
diff changeset
64 enum cmodel {
kono
parents:
diff changeset
65 CM_32, /* The traditional 32-bit ABI. */
kono
parents:
diff changeset
66 CM_SMALL, /* Assumes all code and data fits in the low 31 bits. */
kono
parents:
diff changeset
67 CM_KERNEL, /* Assumes all code and data fits in the high 31 bits. */
kono
parents:
diff changeset
68 CM_MEDIUM, /* Assumes code fits in the low 31 bits; data unlimited. */
kono
parents:
diff changeset
69 CM_LARGE, /* No assumptions. */
kono
parents:
diff changeset
70 CM_SMALL_PIC, /* Assumes code+data+got/plt fits in a 31 bit region. */
kono
parents:
diff changeset
71 CM_MEDIUM_PIC,/* Assumes code+got/plt fits in a 31 bit region. */
kono
parents:
diff changeset
72 CM_LARGE_PIC /* No assumptions. */
kono
parents:
diff changeset
73 };
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 enum pmode {
kono
parents:
diff changeset
76 PMODE_SI, /* Pmode == SImode. */
kono
parents:
diff changeset
77 PMODE_DI /* Pmode == DImode. */
kono
parents:
diff changeset
78 };
kono
parents:
diff changeset
79
kono
parents:
diff changeset
80 enum ix86_align_data {
kono
parents:
diff changeset
81 ix86_align_data_type_compat,
kono
parents:
diff changeset
82 ix86_align_data_type_abi,
kono
parents:
diff changeset
83 ix86_align_data_type_cacheline
kono
parents:
diff changeset
84 };
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 enum asm_dialect {
kono
parents:
diff changeset
87 ASM_ATT,
kono
parents:
diff changeset
88 ASM_INTEL
kono
parents:
diff changeset
89 };
kono
parents:
diff changeset
90
kono
parents:
diff changeset
91 enum ix86_veclibabi {
kono
parents:
diff changeset
92 ix86_veclibabi_type_none,
kono
parents:
diff changeset
93 ix86_veclibabi_type_svml,
kono
parents:
diff changeset
94 ix86_veclibabi_type_acml
kono
parents:
diff changeset
95 };
kono
parents:
diff changeset
96
kono
parents:
diff changeset
97 enum stack_protector_guard {
kono
parents:
diff changeset
98 SSP_TLS, /* per-thread canary in TLS block */
kono
parents:
diff changeset
99 SSP_GLOBAL /* global canary */
kono
parents:
diff changeset
100 };
kono
parents:
diff changeset
101
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
102 enum prefer_vector_width {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
103 PVW_NONE,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
104 PVW_AVX128,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
105 PVW_AVX256,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
106 PVW_AVX512
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
107 };
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
108
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
109 /* This is used to mitigate variant #2 of the speculative execution
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
110 vulnerabilities on x86 processors identified by CVE-2017-5715, aka
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
111 Spectre. They convert indirect branches and function returns to
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
112 call and return thunks to avoid speculative execution via indirect
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
113 call, jmp and ret. */
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
114 enum indirect_branch {
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
115 indirect_branch_unset = 0,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
116 indirect_branch_keep,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
117 indirect_branch_thunk,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
118 indirect_branch_thunk_inline,
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
119 indirect_branch_thunk_extern
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
120 };
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
121
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
122 enum instrument_return {
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
123 instrument_return_none = 0,
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
124 instrument_return_call,
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
125 instrument_return_nop5
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
126 };
1830386684a0 gcc-9.2.0
anatofuz
parents: 131
diff changeset
127
111
kono
parents:
diff changeset
128 #endif