Debian Codegraph @

gcc/config/loongarch/loongarch.opt

raw
1 ; Generated by "genstr" from the template "loongarch.opt.in"
2 ; and definitions from "loongarch-strings" and "isa-evolution.in".
3 ;
4 ; Please do not edit this file directly.
5 ; It will be automatically updated during a gcc build
6 ; if you change "loongarch.opt.in", "loongarch-strings", or
7 ; "isa-evolution.in".
8 ;
9 ; Copyright (C) 2021-2025 Free Software Foundation, Inc.
10 ;
11 ; This file is part of GCC.
12 ;
13 ; GCC is free software; you can redistribute it and/or modify it under
14 ; the terms of the GNU General Public License as published by the Free
15 ; Software Foundation; either version 3, or (at your option) any later
16 ; version.
17 ;
18 ; GCC is distributed in the hope that it will be useful, but WITHOUT
19 ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
21 ; License for more details.
22 ;
23 ; You should have received a copy of the GNU General Public License
24 ; along with GCC; see the file COPYING3. If not see
25 ; <http://www.gnu.org/licenses/>.
26 ;
27
28 HeaderInclude
29 config/loongarch/loongarch-opts.h
30
31 HeaderInclude
32 config/loongarch/loongarch-str.h
33
34 TargetVariable
35 unsigned int recip_mask = 0
36
37 ; ISA related options
38 ;; Base ISA
39 Enum
40 Name(isa_base) Type(int)
41 Basic ISAs of LoongArch:
42
43 EnumValue
44 Enum(isa_base) String(la64) Value(ISA_BASE_LA64)
45
46 ;; ISA extensions / adjustments
47 Enum
48 Name(isa_ext_fpu) Type(int)
49 FPU types of LoongArch:
50
51 EnumValue
52 Enum(isa_ext_fpu) String(none) Value(ISA_EXT_NONE)
53
54 EnumValue
55 Enum(isa_ext_fpu) String(32) Value(ISA_EXT_FPU32)
56
57 EnumValue
58 Enum(isa_ext_fpu) String(64) Value(ISA_EXT_FPU64)
59
60 mfpu=
61 Target RejectNegative Joined ToLower Enum(isa_ext_fpu) Var(la_opt_fpu) Init(M_OPT_UNSET) Save
62 -mfpu=FPU Generate code for the given FPU.
63
64 mfpu=0
65 Target RejectNegative Alias(mfpu=,none)
66
67 msoft-float
68 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(msingle-float)
69 Prevent the use of all hardware floating-point instructions.
70
71 msingle-float
72 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(mdouble-float)
73 Restrict the use of hardware floating-point instructions to 32-bit operations.
74
75 mdouble-float
76 Target Driver Defer Var(la_deferred_options) RejectNegative Negative(msoft-float)
77 Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations.
78
79 Enum
80 Name(isa_ext_simd) Type(int)
81 SIMD extension levels of LoongArch:
82
83 EnumValue
84 Enum(isa_ext_simd) String(none) Value(ISA_EXT_NONE)
85
86 EnumValue
87 Enum(isa_ext_simd) String(lsx) Value(ISA_EXT_SIMD_LSX)
88
89 EnumValue
90 Enum(isa_ext_simd) String(lasx) Value(ISA_EXT_SIMD_LASX)
91
92 msimd=
93 Target RejectNegative Joined ToLower Enum(isa_ext_simd) Var(la_opt_simd) Init(M_OPT_UNSET) Save
94 -msimd=SIMD Generate code for the given SIMD extension.
95
96 mlsx
97 Target Driver Defer Var(la_deferred_options)
98 Enable LoongArch SIMD Extension (LSX, 128-bit).
99
100 mlasx
101 Target Driver Defer Var(la_deferred_options)
102 Enable LoongArch Advanced SIMD Extension (LASX, 256-bit).
103
104 ;; Base target models (implies ISA & tune parameters)
105 Enum
106 Name(arch_type) Type(int)
107 LoongArch ARCH presets:
108
109 EnumValue
110 Enum(arch_type) String(native) Value(ARCH_NATIVE)
111
112 EnumValue
113 Enum(arch_type) String(abi-default) Value(ARCH_ABI_DEFAULT)
114
115 EnumValue
116 Enum(arch_type) String(loongarch64) Value(ARCH_LOONGARCH64)
117
118 EnumValue
119 Enum(arch_type) String(la464) Value(ARCH_LA464)
120
121 EnumValue
122 Enum(arch_type) String(la664) Value(ARCH_LA664)
123
124 EnumValue
125 Enum(arch_type) String(la64v1.0) Value(ARCH_LA64V1_0)
126
127 EnumValue
128 Enum(arch_type) String(la64v1.1) Value(ARCH_LA64V1_1)
129
130 march=
131 Target RejectNegative Joined Enum(arch_type) Var(la_opt_cpu_arch) Init(M_OPT_UNSET) Save
132 -march=PROCESSOR Generate code for the given PROCESSOR ISA.
133
134 Enum
135 Name(tune_type) Type(int)
136 LoongArch TUNE presets:
137
138 EnumValue
139 Enum(tune_type) String(native) Value(TUNE_NATIVE)
140
141 EnumValue
142 Enum(tune_type) String(generic) Value(TUNE_GENERIC)
143
144 EnumValue
145 Enum(tune_type) String(loongarch64) Value(TUNE_LOONGARCH64)
146
147 EnumValue
148 Enum(tune_type) String(la464) Value(TUNE_LA464)
149
150 EnumValue
151 Enum(tune_type) String(la664) Value(TUNE_LA664)
152
153 mtune=
154 Target RejectNegative Joined Enum(tune_type) Var(la_opt_cpu_tune) Init(M_OPT_UNSET) Save
155 -mtune=PROCESSOR Generate optimized code for PROCESSOR.
156
157
158 ; ABI related options
159 ; (ISA constraints on ABI are handled dynamically)
160
161 ;; Base ABI
162 Enum
163 Name(abi_base) Type(int)
164 Base ABI types for LoongArch:
165
166 EnumValue
167 Enum(abi_base) String(lp64d) Value(ABI_BASE_LP64D)
168
169 EnumValue
170 Enum(abi_base) String(lp64f) Value(ABI_BASE_LP64F)
171
172 EnumValue
173 Enum(abi_base) String(lp64s) Value(ABI_BASE_LP64S)
174
175 mabi=
176 Target RejectNegative Joined ToLower Enum(abi_base) Var(la_opt_abi_base) Init(M_OPT_UNSET)
177 -mabi=BASEABI Generate code that conforms to the given BASEABI.
178
179
180 ;; ABI Extension
181 Variable
182 int la_opt_abi_ext = M_OPT_UNSET
183
184 mbranch-cost=
185 Target RejectNegative Joined UInteger Var(la_branch_cost) Save
186 -mbranch-cost=COST Set the cost of branches to roughly COST instructions.
187
188 maddr-reg-reg-cost=
189 Target RejectNegative Joined UInteger Var(la_addr_reg_reg_cost) Save
190 -maddr-reg-reg-cost=COST Set the cost of ADDRESS_REG_REG to the value calculated by COST.
191
192 mcheck-zero-division
193 Target Mask(CHECK_ZERO_DIV) Save
194 Trap on integer divide by zero.
195
196 mcond-move-int
197 Target Mask(COND_MOVE_INT) Save
198 Conditional moves for integral are enabled.
199
200 mcond-move-float
201 Target Mask(COND_MOVE_FLOAT) Save
202 Conditional moves for float are enabled.
203
204 mmemcpy
205 Target Mask(MEMCPY) Save
206 Prevent optimizing block moves, which is also the default behavior of -Os.
207
208 mstrict-align
209 Target Mask(STRICT_ALIGN) Save
210 Do not generate unaligned memory accesses.
211
212 mmax-inline-memcpy-size=
213 Target Joined RejectNegative UInteger Var(la_max_inline_memcpy_size) Init(1024) Save
214 -mmax-inline-memcpy-size=SIZE Set the max size of memcpy to inline, default is 1024.
215
216 Enum
217 Name(explicit_relocs) Type(int)
218 The code model option names for -mexplicit-relocs:
219
220 EnumValue
221 Enum(explicit_relocs) String(auto) Value(EXPLICIT_RELOCS_AUTO)
222
223 EnumValue
224 Enum(explicit_relocs) String(none) Value(EXPLICIT_RELOCS_NONE)
225
226 EnumValue
227 Enum(explicit_relocs) String(always) Value(EXPLICIT_RELOCS_ALWAYS)
228
229 mexplicit-relocs=
230 Target RejectNegative Joined Enum(explicit_relocs) Var(la_opt_explicit_relocs) Init(M_OPT_UNSET)
231 Use %reloc() assembly operators.
232
233 mexplicit-relocs
234 Target Alias(mexplicit-relocs=, always, none)
235 Use %reloc() assembly operators (for backward compatibility).
236
237 mrecip=
238 Target RejectNegative Joined Var(la_recip_name) Save
239 Control generation of reciprocal estimates.
240
241 mrecip
242 Target Alias(mrecip=, all, none)
243 Generate approximate reciprocal divide and square root for better throughput.
244
245 ; The code model option names for -mcmodel.
246 Enum
247 Name(cmodel) Type(int)
248 The code model option names for -mcmodel:
249
250 EnumValue
251 Enum(cmodel) String(normal) Value(CMODEL_NORMAL)
252
253 EnumValue
254 Enum(cmodel) String(tiny) Value(CMODEL_TINY)
255
256 EnumValue
257 Enum(cmodel) String(tiny-static) Value(CMODEL_TINY_STATIC)
258
259 EnumValue
260 Enum(cmodel) String(medium) Value(CMODEL_MEDIUM)
261
262 EnumValue
263 Enum(cmodel) String(large) Value(CMODEL_LARGE)
264
265 EnumValue
266 Enum(cmodel) String(extreme) Value(CMODEL_EXTREME)
267
268 mcmodel=
269 Target RejectNegative Joined Enum(cmodel) Var(la_opt_cmodel) Init(M_OPT_UNSET) Save
270 Specify the code model.
271
272 mdirect-extern-access
273 Target Mask(DIRECT_EXTERN_ACCESS) Save
274 Avoid using the GOT to access external symbols.
275
276 mrelax
277 Target Mask(LINKER_RELAXATION)
278 Take advantage of linker relaxations to reduce the number of instructions
279 required to materialize symbol addresses.
280
281 mpass-mrelax-to-as
282 Driver Var(la_pass_mrelax_to_as) Init(HAVE_AS_MRELAX_OPTION)
283 Pass -mrelax or -mno-relax option to the assembler.
284
285 Enum
286 Name(tls_type) Type(int)
287 The possible TLS dialects:
288
289 EnumValue
290 Enum(tls_type) String(trad) Value(TLS_TRADITIONAL)
291
292 EnumValue
293 Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
294
295 mtls-dialect=
296 Target RejectNegative Joined Enum(tls_type) Var(la_opt_tls_dialect) Init(M_OPT_UNSET) Save
297 Specify TLS dialect.
298
299 -param=loongarch-vect-unroll-limit=
300 Target Joined UInteger Var(la_vect_unroll_limit) Init(6) IntegerRange(1, 64) Param
301 Used to limit unroll factor which indicates how much the autovectorizer may
302 unroll a loop. The default value is 6.
303
304 -param=loongarch-vect-issue-info=
305 Target Undocumented Joined UInteger Var(la_vect_issue_info) Init(4) IntegerRange(1, 64) Param
306 Indicate how many non memory access vector instructions can be issued per
307 cycle, it's used in unroll factor determination for autovectorizer. The
308 default value is 4.
309
310 ; Features added during ISA evolution. This concept is different from ISA
311 ; extension, read Section 1.5 of LoongArch v1.10 Volume 1 for the
312 ; explanation. These features may be implemented and enumerated with
313 ; CPUCFG independently, so we use bit flags to specify them.
314 TargetVariable
315 HOST_WIDE_INT la_isa_evolution = 0
316
317 mannotate-tablejump
318 Target Mask(ANNOTATE_TABLEJUMP) Save
319 Annotate table jump instruction (jr {reg}) to correlate it with the jump table.
320
321 mfrecipe
322 Target Mask(ISA_FRECIPE) Var(la_isa_evolution)
323 Support frecipe.{s/d} and frsqrte.{s/d} instructions.
324
325 mdiv32
326 Target Mask(ISA_DIV32) Var(la_isa_evolution)
327 Support div.w[u] and mod.w[u] instructions with inputs not sign-extended.
328
329 mlam-bh
330 Target Mask(ISA_LAM_BH) Var(la_isa_evolution)
331 Support am{swap/add}[_db].{b/h} instructions.
332
333 mlamcas
334 Target Mask(ISA_LAMCAS) Var(la_isa_evolution)
335 Support amcas[_db].{b/h/w/d} instructions.
336
337 mld-seq-sa
338 Target Mask(ISA_LD_SEQ_SA) Var(la_isa_evolution)
339 Do not need load-load barriers (dbar 0x700).