Daily bump.
[official-gcc.git] / gcc / config / aarch64 / aarch64.opt
blobf32d56d4ffaef7862c1c45a11753be5d480220d0
1 ; Machine description for AArch64 architecture.
2 ; Copyright (C) 2009-2025 Free Software Foundation, Inc.
3 ; Contributed by ARM Ltd.
5 ; This file is part of GCC.
7 ; GCC is free software; you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published by
9 ; the Free Software Foundation; either version 3, or (at your option)
10 ; any later version.
12 ; GCC is distributed in the hope that it will be useful, but
13 ; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 ; General Public License for more details.
17 ; You should have received a copy of the GNU General Public License
18 ; along with GCC; see the file COPYING3.  If not see
19 ; <http://www.gnu.org/licenses/>.
21 HeaderInclude
22 config/aarch64/aarch64-opts.h
24 HeaderInclude
25 config/arm/aarch-common.h
27 TargetVariable
28 enum aarch64_cpu selected_tune = aarch64_no_cpu
30 TargetVariable
31 enum aarch64_arch selected_arch = aarch64_no_arch
33 TargetVariable
34 uint64_t aarch64_asm_isa_flags_0 = 0
36 TargetVariable
37 uint64_t aarch64_asm_isa_flags_1 = 0
39 TargetVariable
40 uint64_t aarch64_isa_flags_0 = 0
42 TargetVariable
43 uint64_t aarch64_isa_flags_1 = 0
45 TargetVariable
46 unsigned aarch_enable_bti = 2
48 TargetVariable
49 unsigned aarch64_enable_gcs = 2
51 TargetVariable
52 enum aarch64_key_type aarch64_ra_sign_key = AARCH64_KEY_A
54 ; The TLS dialect names to use with -mtls-dialect.
56 Enum
57 Name(tls_type) Type(enum aarch64_tls_type)
58 The possible TLS dialects:
60 EnumValue
61 Enum(tls_type) String(trad) Value(TLS_TRADITIONAL)
63 EnumValue
64 Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
66 ; The code model option names for -mcmodel.
68 Enum
69 Name(cmodel) Type(enum aarch64_code_model)
70 The code model option names for -mcmodel:
72 EnumValue
73 Enum(cmodel) String(tiny) Value(AARCH64_CMODEL_TINY)
75 EnumValue
76 Enum(cmodel) String(small) Value(AARCH64_CMODEL_SMALL)
78 EnumValue
79 Enum(cmodel) String(large) Value(AARCH64_CMODEL_LARGE)
81 mbig-endian
82 Target RejectNegative Mask(BIG_END)
83 Assume target CPU is configured as big endian.
85 mgeneral-regs-only
86 Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
87 Generate code which uses only the general registers.
89 mharden-sls=
90 Target RejectNegative Joined Var(aarch64_harden_sls_string)
91 Generate code to mitigate against straight line speculation.
93 mfix-cortex-a53-835769
94 Target Var(aarch64_fix_a53_err835769) Init(2) Save
95 Workaround for ARM Cortex-A53 Erratum number 835769.
97 mfix-cortex-a53-843419
98 Target Var(aarch64_fix_a53_err843419) Init(2) Save
99 Workaround for ARM Cortex-A53 Erratum number 843419.
101 mlittle-endian
102 Target RejectNegative InverseMask(BIG_END)
103 Assume target CPU is configured as little endian.
105 mcmodel=
106 Target RejectNegative Joined Enum(cmodel) Var(aarch64_cmodel_var) Init(AARCH64_CMODEL_SMALL) Save
107 Specify the code model.
109 Enum
110 Name(tp_reg) Type(enum aarch64_tp_reg)
111 The register used to access the thread pointer:
113 EnumValue
114 Enum(tp_reg) String(el0) Value(AARCH64_TPIDR_EL0)
116 EnumValue
117 Enum(tp_reg) String(tpidr_el0) Value(AARCH64_TPIDR_EL0)
119 EnumValue
120 Enum(tp_reg) String(el1) Value(AARCH64_TPIDR_EL1)
122 EnumValue
123 Enum(tp_reg) String(tpidr_el1) Value(AARCH64_TPIDR_EL1)
125 EnumValue
126 Enum(tp_reg) String(el2) Value(AARCH64_TPIDR_EL2)
128 EnumValue
129 Enum(tp_reg) String(tpidr_el2) Value(AARCH64_TPIDR_EL2)
131 EnumValue
132 Enum(tp_reg) String(el3) Value(AARCH64_TPIDR_EL3)
134 EnumValue
135 Enum(tp_reg) String(tpidr_el3) Value(AARCH64_TPIDR_EL3)
137 EnumValue
138 Enum(tp_reg) String(tpidrro_el0) Value(AARCH64_TPIDRRO_EL0)
140 mtp=
141 Target RejectNegative Joined Enum(tp_reg) Var(aarch64_tpidr_reg) Init(AARCH64_TPIDR_EL0) Save
142 Specify the thread pointer register.
144 mstrict-align
145 Target Mask(STRICT_ALIGN) Save
146 Don't assume that unaligned accesses are handled by the system.
148 momit-leaf-frame-pointer
149 Target Var(flag_omit_leaf_frame_pointer) Init(2) Save
150 Omit the frame pointer in leaf functions.
152 mtls-dialect=
153 Target RejectNegative Joined Enum(tls_type) Var(aarch64_tls_dialect) Init(TLS_DESCRIPTORS) Save
154 Specify TLS dialect.
156 mtls-size=
157 Target RejectNegative Joined Var(aarch64_tls_size) Enum(aarch64_tls_size)
158 Specifies bit size of immediate TLS offsets.  Valid values are 12, 24, 32, 48.
160 Enum
161 Name(aarch64_tls_size) Type(int)
163 EnumValue
164 Enum(aarch64_tls_size) String(12) Value(12)
166 EnumValue
167 Enum(aarch64_tls_size) String(24) Value(24)
169 EnumValue
170 Enum(aarch64_tls_size) String(32) Value(32)
172 EnumValue
173 Enum(aarch64_tls_size) String(48) Value(48)
175 march=
176 Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
177 Use features of architecture ARCH.
179 mcpu=
180 Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
181 Use features of and optimize for CPU.
183 mtune=
184 Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
185 Optimize for CPU.
187 mabi=
188 Target RejectNegative Joined Enum(aarch64_abi) Var(aarch64_abi) Init(AARCH64_ABI_DEFAULT)
189 Generate code that conforms to the specified ABI.
191 moverride=
192 Target RejectNegative ToLower Joined Var(aarch64_override_tune_string) Save
193 -moverride=<string>     Power users only! Override CPU optimization parameters.
195 Enum
196 Name(aarch64_abi) Type(int)
197 Known AArch64 ABIs (for use with the -mabi= option):
199 EnumValue
200 Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32)
202 EnumValue
203 Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64)
205 mpc-relative-literal-loads
206 Target Save Var(pcrelative_literal_loads) Init(2) Save
207 PC relative literal loads.
209 mbranch-protection=
210 Target RejectNegative Joined Var(aarch64_branch_protection_string) Save
211 Use branch-protection features.
213 msign-return-address=
214 Target WarnRemoved RejectNegative Joined Enum(aarch_ra_sign_scope_t) Var(aarch_ra_sign_scope) Init(AARCH_FUNCTION_NONE) Save
215 Select return address signing scope.
217 Enum
218 Name(aarch_ra_sign_scope_t) Type(enum aarch_function_type)
219 Supported AArch64 return address signing scope (for use with -msign-return-address= option):
221 EnumValue
222 Enum(aarch_ra_sign_scope_t) String(none) Value(AARCH_FUNCTION_NONE)
224 EnumValue
225 Enum(aarch_ra_sign_scope_t) String(non-leaf) Value(AARCH_FUNCTION_NON_LEAF)
227 EnumValue
228 Enum(aarch_ra_sign_scope_t) String(all) Value(AARCH_FUNCTION_ALL)
230 mlow-precision-recip-sqrt
231 Target Var(flag_mrecip_low_precision_sqrt) Optimization
232 Enable the reciprocal square root approximation.  Enabling this reduces
233 precision of reciprocal square root results to about 16 bits for
234 single precision and to 32 bits for double precision.
236 mlow-precision-sqrt
237 Target Var(flag_mlow_precision_sqrt) Optimization
238 Enable the square root approximation.  Enabling this reduces
239 precision of square root results to about 16 bits for
240 single precision and to 32 bits for double precision.
241 If enabled, it implies -mlow-precision-recip-sqrt.
243 mlow-precision-div
244 Target Var(flag_mlow_precision_div) Optimization
245 Enable the division approximation.  Enabling this reduces
246 precision of division results to about 16 bits for
247 single precision and to 32 bits for double precision.
249 Enum
250 Name(early_ra_scope) Type(enum aarch64_early_ra_scope)
252 EnumValue
253 Enum(early_ra_scope) String(all) Value(AARCH64_EARLY_RA_ALL)
255 EnumValue
256 Enum(early_ra_scope) String(strided) Value(AARCH64_EARLY_RA_STRIDED)
258 EnumValue
259 Enum(early_ra_scope) String(none) Value(AARCH64_EARLY_RA_NONE)
261 mearly-ra=
262 Target RejectNegative Joined Enum(early_ra_scope) Var(aarch64_early_ra) Init(AARCH64_EARLY_RA_NONE) Optimization
263 Specify when to enable an early register allocation pass.  The possibilities
264 are: all functions, functions that have access to strided multi-register
265 instructions, and no functions.
267 Enum
268 Name(sve_vector_bits) Type(enum aarch64_sve_vector_bits_enum)
269 The possible SVE vector lengths:
271 EnumValue
272 Enum(sve_vector_bits) String(scalable) Value(SVE_SCALABLE)
274 EnumValue
275 Enum(sve_vector_bits) String(128) Value(SVE_128)
277 EnumValue
278 Enum(sve_vector_bits) String(256) Value(SVE_256)
280 EnumValue
281 Enum(sve_vector_bits) String(512) Value(SVE_512)
283 EnumValue
284 Enum(sve_vector_bits) String(1024) Value(SVE_1024)
286 EnumValue
287 Enum(sve_vector_bits) String(2048) Value(SVE_2048)
289 msve-vector-bits=
290 Target RejectNegative Joined Enum(sve_vector_bits) Var(aarch64_sve_vector_bits) Init(SVE_SCALABLE)
291 -msve-vector-bits=<number>      Set the number of bits in an SVE vector register.
293 mverbose-cost-dump
294 Target Undocumented Var(flag_aarch64_verbose_cost)
295 Enables verbose cost model dumping in the debug dump files.
297 mtrack-speculation
298 Target Var(aarch64_track_speculation)
299 Generate code to track when the CPU might be speculating incorrectly.
301 mearly-ldp-fusion
302 Target Var(flag_aarch64_early_ldp_fusion) Optimization Init(1)
303 Enable the copy of the AArch64 load/store pair fusion pass that runs before
304 register allocation.
306 mlate-ldp-fusion
307 Target Var(flag_aarch64_late_ldp_fusion) Optimization Init(1)
308 Enable the copy of the AArch64 load/store pair fusion pass that runs after
309 register allocation.
311 mstack-protector-guard=
312 Target RejectNegative Joined Enum(stack_protector_guard) Var(aarch64_stack_protector_guard) Init(SSP_GLOBAL)
313 Use given stack-protector guard.
315 Enum
316 Name(stack_protector_guard) Type(enum stack_protector_guard)
317 Valid arguments to -mstack-protector-guard=:
319 EnumValue
320 Enum(stack_protector_guard) String(sysreg) Value(SSP_SYSREG)
322 EnumValue
323 Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
325 mstack-protector-guard-reg=
326 Target Joined RejectNegative String Var(aarch64_stack_protector_guard_reg_str)
327 Use the system register specified on the command line as the stack protector
328 guard register. This option is for use with fstack-protector-strong and
329 not for use in user-land code.
331 mstack-protector-guard-offset=
332 Target Joined RejectNegative String Var(aarch64_stack_protector_guard_offset_str)
333 Use an immediate to offset from the stack protector guard register, sp_el0.
334 This option is for use with fstack-protector-strong and not for use in
335 user-land code.
337 TargetVariable
338 long aarch64_stack_protector_guard_offset = 0
340 moutline-atomics
341 Target Var(aarch64_flag_outline_atomics) Init(2) Save
342 Generate local calls to out-of-line atomic operations.
344 -param=aarch64-vect-compare-costs=
345 Target Joined UInteger Var(aarch64_vect_compare_costs) Init(1) IntegerRange(0, 1) Param
346 When vectorizing, consider using multiple different approaches and use
347 the cost model to choose the cheapest one.
349 -param=aarch64-float-recp-precision=
350 Target Joined UInteger Var(aarch64_float_recp_precision) Init(1) IntegerRange(1, 5) Param
351 The number of Newton iterations for calculating the reciprocal for float type.  The precision of division is proportional to this param when division approximation is enabled.  The default value is 1.
353 -param=aarch64-double-recp-precision=
354 Target Joined UInteger Var(aarch64_double_recp_precision) Init(2) IntegerRange(1, 5) Param
355 The number of Newton iterations for calculating the reciprocal for double type.  The precision of division is proportional to this param when division approximation is enabled.  The default value is 2.
357 -param=aarch64-autovec-preference=
358 Target Joined Var(aarch64_autovec_preference) Enum(aarch64_autovec_preference) Init(AARCH64_AUTOVEC_DEFAULT) Param
359 --param=aarch64-autovec-preference=[default|asimd-only|sve-only|prefer-asimd|prefer-sve]
360 Force an ISA selection strategy for auto-vectorization.
362 Enum
363 Name(aarch64_autovec_preference) Type(enum aarch64_autovec_preference_enum) UnknownError(unknown autovec preference %qs)
365 EnumValue
366 Enum(aarch64_autovec_preference) String(default) Value(AARCH64_AUTOVEC_DEFAULT)
368 EnumValue
369 Enum(aarch64_autovec_preference) String(asimd-only) Value(AARCH64_AUTOVEC_ASIMD_ONLY)
371 EnumValue
372 Enum(aarch64_autovec_preference) String(sve-only) Value(AARCH64_AUTOVEC_SVE_ONLY)
374 EnumValue
375 Enum(aarch64_autovec_preference) String(prefer-asimd) Value(AARCH64_AUTOVEC_PREFER_ASIMD)
377 EnumValue
378 Enum(aarch64_autovec_preference) String(prefer-sve) Value(AARCH64_AUTOVEC_PREFER_SVE)
380 -param=aarch64-loop-vect-issue-rate-niters=
381 Target Joined UInteger Var(aarch64_loop_vect_issue_rate_niters) Init(6) IntegerRange(0, 65536) Param
383 -param=aarch64-mops-memcpy-size-threshold=
384 Target Joined UInteger Var(aarch64_mops_memcpy_size_threshold) Init(256) Param
385 Constant memcpy size in bytes above which to start using MOPS sequence.
387 -param=aarch64-mops-memmove-size-threshold=
388 Target Joined UInteger Var(aarch64_mops_memmove_size_threshold) Init(256) Param
389 Constant memmove size in bytes above which to start using MOPS sequence.
391 -param=aarch64-mops-memset-size-threshold=
392 Target Joined UInteger Var(aarch64_mops_memset_size_threshold) Init(256) Param
393 Constant memset size in bytes from which to start using MOPS sequence.
395 -param=aarch64-vect-unroll-limit=
396 Target Joined UInteger Var(aarch64_vect_unroll_limit) Init(4) Param
397 Limit how much the autovectorizer may unroll a loop.
399 -param=aarch64-ldp-policy=
400 Target Joined Var(aarch64_ldp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
401 --param=aarch64-ldp-policy=[default|always|never|aligned] Fine-grained policy for load pairs.
403 -param=aarch64-stp-policy=
404 Target Joined Var(aarch64_stp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
405 --param=aarch64-stp-policy=[default|always|never|aligned] Fine-grained policy for store pairs.
407 Enum
408 Name(aarch64_ldp_stp_policy) Type(enum aarch64_ldp_stp_policy) UnknownError(unknown LDP/STP policy %qs)
410 EnumValue
411 Enum(aarch64_ldp_stp_policy) String(default) Value(AARCH64_LDP_STP_POLICY_DEFAULT)
413 EnumValue
414 Enum(aarch64_ldp_stp_policy) String(always) Value(AARCH64_LDP_STP_POLICY_ALWAYS)
416 EnumValue
417 Enum(aarch64_ldp_stp_policy) String(never) Value(AARCH64_LDP_STP_POLICY_NEVER)
419 EnumValue
420 Enum(aarch64_ldp_stp_policy) String(aligned) Value(AARCH64_LDP_STP_POLICY_ALIGNED)
422 -param=aarch64-ldp-alias-check-limit=
423 Target Joined UInteger Var(aarch64_ldp_alias_check_limit) Init(8) IntegerRange(0, 65536) Param
424 Limit on number of alias checks performed when attempting to form an ldp/stp.
426 -param=aarch64-ldp-writeback=
427 Target Joined UInteger Var(aarch64_ldp_writeback) Init(2) IntegerRange(0,2) Param
428 Param to control which writeback opportunities we try to handle in the
429 load/store pair fusion pass.  A value of zero disables writeback
430 handling.  One means we try to form pairs involving one or more existing
431 individual writeback accesses where possible.  A value of two means we
432 also try to opportunistically form writeback opportunities by folding in
433 trailing destructive updates of the base register used by a pair.
435 Wexperimental-fmv-target
436 Target Var(warn_experimental_fmv) Warning Init(1)
437 Warn about usage of experimental Function Multi Versioning.