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

source code of gcc/config/i386/i386-opts.h