]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/config/aarch64/aarch64.opt
Update copyright years.
[thirdparty/gcc.git] / gcc / config / aarch64 / aarch64.opt
CommitLineData
43e9d192 1; Machine description for AArch64 architecture.
a945c346 2; Copyright (C) 2009-2024 Free Software Foundation, Inc.
43e9d192
IB
3; Contributed by ARM Ltd.
4;
5; This file is part of GCC.
6;
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.
11;
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.
16;
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/>.
20
21HeaderInclude
22config/aarch64/aarch64-opts.h
23
d8dadbc9
AC
24HeaderInclude
25config/arm/aarch-common.h
26
361fb3ee 27TargetVariable
ae54c1b0 28enum aarch64_processor selected_tune = aarch64_none
361fb3ee
KT
29
30TargetVariable
ae54c1b0 31enum aarch64_arch selected_arch = aarch64_no_arch
361fb3ee 32
2a269bda
RS
33TargetVariable
34aarch64_feature_flags aarch64_asm_isa_flags = 0
35
361fb3ee 36TargetVariable
fed55a60 37aarch64_feature_flags aarch64_isa_flags = 0
361fb3ee 38
30afdf34 39TargetVariable
d8dadbc9 40unsigned aarch_enable_bti = 2
30afdf34 41
ae54c1b0 42TargetVariable
b1d26458 43enum aarch_key_type aarch_ra_sign_key = AARCH_KEY_A
ae54c1b0 44
43e9d192
IB
45; The TLS dialect names to use with -mtls-dialect.
46
47Enum
48Name(tls_type) Type(enum aarch64_tls_type)
49The possible TLS dialects:
50
51EnumValue
52Enum(tls_type) String(trad) Value(TLS_TRADITIONAL)
53
54EnumValue
55Enum(tls_type) String(desc) Value(TLS_DESCRIPTORS)
56
57; The code model option names for -mcmodel.
58
59Enum
60Name(cmodel) Type(enum aarch64_code_model)
61The code model option names for -mcmodel:
62
63EnumValue
64Enum(cmodel) String(tiny) Value(AARCH64_CMODEL_TINY)
65
66EnumValue
67Enum(cmodel) String(small) Value(AARCH64_CMODEL_SMALL)
68
69EnumValue
70Enum(cmodel) String(large) Value(AARCH64_CMODEL_LARGE)
71
43e9d192 72mbig-endian
eece52b5 73Target RejectNegative Mask(BIG_END)
a7b2e184 74Assume target CPU is configured as big endian.
43e9d192
IB
75
76mgeneral-regs-only
eece52b5 77Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
a7b2e184 78Generate code which uses only the general registers.
43e9d192 79
a9ba2a9b
MM
80mharden-sls=
81Target RejectNegative Joined Var(aarch64_harden_sls_string)
82Generate code to mitigate against straight line speculation.
83
75cf1494 84mfix-cortex-a53-835769
eece52b5 85Target Var(aarch64_fix_a53_err835769) Init(2) Save
a7b2e184 86Workaround for ARM Cortex-A53 Erratum number 835769.
75cf1494 87
bf05ef76 88mfix-cortex-a53-843419
eece52b5 89Target Var(aarch64_fix_a53_err843419) Init(2) Save
a7b2e184 90Workaround for ARM Cortex-A53 Erratum number 843419.
bf05ef76 91
43e9d192 92mlittle-endian
eece52b5 93Target RejectNegative InverseMask(BIG_END)
a7b2e184 94Assume target CPU is configured as little endian.
43e9d192
IB
95
96mcmodel=
361fb3ee 97Target RejectNegative Joined Enum(cmodel) Var(aarch64_cmodel_var) Init(AARCH64_CMODEL_SMALL) Save
a7b2e184 98Specify the code model.
43e9d192 99
573624ec
KT
100Enum
101Name(tp_reg) Type(enum aarch64_tp_reg)
102The register used to access the thread pointer:
103
104EnumValue
105Enum(tp_reg) String(el0) Value(AARCH64_TPIDR_EL0)
106
4389a2d2
KT
107EnumValue
108Enum(tp_reg) String(tpidr_el0) Value(AARCH64_TPIDR_EL0)
109
573624ec
KT
110EnumValue
111Enum(tp_reg) String(el1) Value(AARCH64_TPIDR_EL1)
112
4389a2d2
KT
113EnumValue
114Enum(tp_reg) String(tpidr_el1) Value(AARCH64_TPIDR_EL1)
115
573624ec
KT
116EnumValue
117Enum(tp_reg) String(el2) Value(AARCH64_TPIDR_EL2)
118
4389a2d2
KT
119EnumValue
120Enum(tp_reg) String(tpidr_el2) Value(AARCH64_TPIDR_EL2)
121
573624ec
KT
122EnumValue
123Enum(tp_reg) String(el3) Value(AARCH64_TPIDR_EL3)
124
4389a2d2
KT
125EnumValue
126Enum(tp_reg) String(tpidr_el3) Value(AARCH64_TPIDR_EL3)
127
128EnumValue
129Enum(tp_reg) String(tpidrro_el0) Value(AARCH64_TPIDRRO_EL0)
130
573624ec
KT
131mtp=
132Target RejectNegative Joined Enum(tp_reg) Var(aarch64_tpidr_reg) Init(AARCH64_TPIDR_EL0) Save
133Specify the thread pointer register.
134
43e9d192 135mstrict-align
eece52b5 136Target Mask(STRICT_ALIGN) Save
a7b2e184 137Don't assume that unaligned accesses are handled by the system.
43e9d192
IB
138
139momit-leaf-frame-pointer
eece52b5 140Target Var(flag_omit_leaf_frame_pointer) Init(2) Save
a7b2e184 141Omit the frame pointer in leaf functions.
43e9d192
IB
142
143mtls-dialect=
361fb3ee 144Target RejectNegative Joined Enum(tls_type) Var(aarch64_tls_dialect) Init(TLS_DESCRIPTORS) Save
a7b2e184 145Specify TLS dialect.
43e9d192 146
5eee3c34
JW
147mtls-size=
148Target RejectNegative Joined Var(aarch64_tls_size) Enum(aarch64_tls_size)
149Specifies bit size of immediate TLS offsets. Valid values are 12, 24, 32, 48.
150
151Enum
152Name(aarch64_tls_size) Type(int)
153
154EnumValue
155Enum(aarch64_tls_size) String(12) Value(12)
156
157EnumValue
158Enum(aarch64_tls_size) String(24) Value(24)
159
160EnumValue
161Enum(aarch64_tls_size) String(32) Value(32)
162
163EnumValue
164Enum(aarch64_tls_size) String(48) Value(48)
165
43e9d192 166march=
6fdbe419 167Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
266c2b54 168Use features of architecture ARCH.
43e9d192
IB
169
170mcpu=
6fdbe419 171Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
266c2b54 172Use features of and optimize for CPU.
43e9d192
IB
173
174mtune=
6fdbe419 175Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
266c2b54 176Optimize for CPU.
17a819cb
YZ
177
178mabi=
179Target RejectNegative Joined Enum(aarch64_abi) Var(aarch64_abi) Init(AARCH64_ABI_DEFAULT)
266c2b54 180Generate code that conforms to the specified ABI.
17a819cb 181
8dec06f2 182moverride=
ae54c1b0 183Target RejectNegative ToLower Joined Var(aarch64_override_tune_string) Save
266c2b54 184-moverride=<string> Power users only! Override CPU optimization parameters.
8dec06f2 185
17a819cb
YZ
186Enum
187Name(aarch64_abi) Type(int)
188Known AArch64 ABIs (for use with the -mabi= option):
189
190EnumValue
191Enum(aarch64_abi) String(ilp32) Value(AARCH64_ABI_ILP32)
192
193EnumValue
194Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64)
b4f50fd4
RR
195
196mpc-relative-literal-loads
eece52b5 197Target Save Var(pcrelative_literal_loads) Init(2) Save
b4f50fd4 198PC relative literal loads.
a6fc00da 199
efac62a3
ST
200mbranch-protection=
201Target RejectNegative Joined Var(aarch64_branch_protection_string) Save
202Use branch-protection features.
203
db58fd89 204msign-return-address=
d8dadbc9 205Target WarnRemoved RejectNegative Joined Enum(aarch_ra_sign_scope_t) Var(aarch_ra_sign_scope) Init(AARCH_FUNCTION_NONE) Save
db58fd89
JW
206Select return address signing scope.
207
208Enum
d8dadbc9 209Name(aarch_ra_sign_scope_t) Type(enum aarch_function_type)
db58fd89
JW
210Supported AArch64 return address signing scope (for use with -msign-return-address= option):
211
212EnumValue
d8dadbc9 213Enum(aarch_ra_sign_scope_t) String(none) Value(AARCH_FUNCTION_NONE)
db58fd89
JW
214
215EnumValue
d8dadbc9 216Enum(aarch_ra_sign_scope_t) String(non-leaf) Value(AARCH_FUNCTION_NON_LEAF)
db58fd89
JW
217
218EnumValue
d8dadbc9 219Enum(aarch_ra_sign_scope_t) String(all) Value(AARCH_FUNCTION_ALL)
db58fd89 220
a6fc00da 221mlow-precision-recip-sqrt
88e25f47 222Target Var(flag_mrecip_low_precision_sqrt) Optimization
98daafa0
EM
223Enable the reciprocal square root approximation. Enabling this reduces
224precision of reciprocal square root results to about 16 bits for
225single precision and to 32 bits for double precision.
226
227mlow-precision-sqrt
88e25f47 228Target Var(flag_mlow_precision_sqrt) Optimization
98daafa0
EM
229Enable the square root approximation. Enabling this reduces
230precision of square root results to about 16 bits for
231single precision and to 32 bits for double precision.
232If enabled, it implies -mlow-precision-recip-sqrt.
79a2bc2d
EM
233
234mlow-precision-div
88e25f47 235Target Var(flag_mlow_precision_div) Optimization
79a2bc2d
EM
236Enable the division approximation. Enabling this reduces
237precision of division results to about 16 bits for
238single precision and to 32 bits for double precision.
c10e3d7f 239
9f0f7d80
RS
240Enum
241Name(early_ra_scope) Type(enum aarch64_early_ra_scope)
242
243EnumValue
244Enum(early_ra_scope) String(all) Value(AARCH64_EARLY_RA_ALL)
245
246EnumValue
247Enum(early_ra_scope) String(strided) Value(AARCH64_EARLY_RA_STRIDED)
248
249EnumValue
250Enum(early_ra_scope) String(none) Value(AARCH64_EARLY_RA_NONE)
251
252mearly-ra=
253Target RejectNegative Joined Enum(early_ra_scope) Var(aarch64_early_ra) Init(AARCH64_EARLY_RA_NONE) Save
254Specify when to enable an early register allocation pass. The possibilities
255are: all functions, functions that have access to strided multi-register
256instructions, and no functions.
257
43cacb12
RS
258Enum
259Name(sve_vector_bits) Type(enum aarch64_sve_vector_bits_enum)
260The possible SVE vector lengths:
261
262EnumValue
263Enum(sve_vector_bits) String(scalable) Value(SVE_SCALABLE)
264
265EnumValue
266Enum(sve_vector_bits) String(128) Value(SVE_128)
267
268EnumValue
269Enum(sve_vector_bits) String(256) Value(SVE_256)
270
271EnumValue
272Enum(sve_vector_bits) String(512) Value(SVE_512)
273
274EnumValue
275Enum(sve_vector_bits) String(1024) Value(SVE_1024)
276
277EnumValue
278Enum(sve_vector_bits) String(2048) Value(SVE_2048)
279
280msve-vector-bits=
281Target RejectNegative Joined Enum(sve_vector_bits) Var(aarch64_sve_vector_bits) Init(SVE_SCALABLE)
f499726a 282-msve-vector-bits=<number> Set the number of bits in an SVE vector register.
43cacb12 283
c10e3d7f 284mverbose-cost-dump
88e25f47 285Target Undocumented Var(flag_aarch64_verbose_cost)
d1132c1b 286Enables verbose cost model dumping in the debug dump files.
3b0c2502
RE
287
288mtrack-speculation
289Target Var(aarch64_track_speculation)
290Generate code to track when the CPU might be speculating incorrectly.
cd0b2d36 291
c0911c6b
AC
292mearly-ldp-fusion
293Target Var(flag_aarch64_early_ldp_fusion) Optimization Init(1)
294Enable the copy of the AArch64 load/store pair fusion pass that runs before
295register allocation.
296
297mlate-ldp-fusion
298Target Var(flag_aarch64_late_ldp_fusion) Optimization Init(1)
299Enable the copy of the AArch64 load/store pair fusion pass that runs after
300register allocation.
301
cd0b2d36
RR
302mstack-protector-guard=
303Target RejectNegative Joined Enum(stack_protector_guard) Var(aarch64_stack_protector_guard) Init(SSP_GLOBAL)
304Use given stack-protector guard.
305
306Enum
307Name(stack_protector_guard) Type(enum stack_protector_guard)
308Valid arguments to -mstack-protector-guard=:
309
310EnumValue
311Enum(stack_protector_guard) String(sysreg) Value(SSP_SYSREG)
312
313EnumValue
314Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
315
316mstack-protector-guard-reg=
317Target Joined RejectNegative String Var(aarch64_stack_protector_guard_reg_str)
318Use the system register specified on the command line as the stack protector
319guard register. This option is for use with fstack-protector-strong and
320not for use in user-land code.
321
322mstack-protector-guard-offset=
323Target Joined RejectNegative String Var(aarch64_stack_protector_guard_offset_str)
324Use an immediate to offset from the stack protector guard register, sp_el0.
325This option is for use with fstack-protector-strong and not for use in
326user-land code.
327
328TargetVariable
329long aarch64_stack_protector_guard_offset = 0
330
3950b229 331moutline-atomics
eece52b5 332Target Var(aarch64_flag_outline_atomics) Init(2) Save
3950b229 333Generate local calls to out-of-line atomic operations.
eb23241b
RS
334
335-param=aarch64-sve-compare-costs=
336Target Joined UInteger Var(aarch64_sve_compare_costs) Init(1) IntegerRange(0, 1) Param
337When vectorizing for SVE, consider using unpacked vectors for smaller elements and use the cost model to pick the cheapest approach. Also use the cost model to choose between SVE and Advanced SIMD vectorization.
dbf3dc75
BL
338
339-param=aarch64-float-recp-precision=
340Target Joined UInteger Var(aarch64_float_recp_precision) Init(1) IntegerRange(1, 5) Param
341The 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.
342
343-param=aarch64-double-recp-precision=
344Target Joined UInteger Var(aarch64_double_recp_precision) Init(2) IntegerRange(1, 5) Param
345The 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.
346
5f29f3d5
KT
347-param=aarch64-autovec-preference=
348Target Joined UInteger Var(aarch64_autovec_preference) Init(0) IntegerRange(0, 4) Param
1205a8ca
RS
349
350-param=aarch64-loop-vect-issue-rate-niters=
351Target Joined UInteger Var(aarch64_loop_vect_issue_rate_niters) Init(6) IntegerRange(0, 65536) Param
0caf592d
KT
352
353-param=aarch64-mops-memcpy-size-threshold=
354Target Joined UInteger Var(aarch64_mops_memcpy_size_threshold) Init(256) Param
355Constant memcpy size in bytes above which to start using MOPS sequence.
bb768f8b
KT
356
357-param=aarch64-mops-memmove-size-threshold=
bbdb72ba 358Target Joined UInteger Var(aarch64_mops_memmove_size_threshold) Init(256) Param
bb768f8b 359Constant memmove size in bytes above which to start using MOPS sequence.
d3bd985e
KT
360
361-param=aarch64-mops-memset-size-threshold=
362Target Joined UInteger Var(aarch64_mops_memset_size_threshold) Init(256) Param
363Constant memset size in bytes from which to start using MOPS sequence.
40d643d8
AV
364
365-param=aarch64-vect-unroll-limit=
366Target Joined UInteger Var(aarch64_vect_unroll_limit) Init(4) Param
367Limit how much the autovectorizer may unroll a loop.
834fc2bf
MA
368
369-param=aarch64-ldp-policy=
574cec45 370Target Joined Var(aarch64_ldp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
834fc2bf
MA
371--param=aarch64-ldp-policy=[default|always|never|aligned] Fine-grained policy for load pairs.
372
834fc2bf 373-param=aarch64-stp-policy=
574cec45 374Target Joined Var(aarch64_stp_policy_param) Enum(aarch64_ldp_stp_policy) Init(AARCH64_LDP_STP_POLICY_DEFAULT) Param
834fc2bf
MA
375--param=aarch64-stp-policy=[default|always|never|aligned] Fine-grained policy for store pairs.
376
377Enum
574cec45 378Name(aarch64_ldp_stp_policy) Type(enum aarch64_ldp_stp_policy) UnknownError(unknown LDP/STP policy %qs)
834fc2bf
MA
379
380EnumValue
574cec45 381Enum(aarch64_ldp_stp_policy) String(default) Value(AARCH64_LDP_STP_POLICY_DEFAULT)
834fc2bf
MA
382
383EnumValue
574cec45 384Enum(aarch64_ldp_stp_policy) String(always) Value(AARCH64_LDP_STP_POLICY_ALWAYS)
834fc2bf
MA
385
386EnumValue
574cec45 387Enum(aarch64_ldp_stp_policy) String(never) Value(AARCH64_LDP_STP_POLICY_NEVER)
834fc2bf
MA
388
389EnumValue
574cec45 390Enum(aarch64_ldp_stp_policy) String(aligned) Value(AARCH64_LDP_STP_POLICY_ALIGNED)
c0911c6b
AC
391
392-param=aarch64-ldp-alias-check-limit=
393Target Joined UInteger Var(aarch64_ldp_alias_check_limit) Init(8) IntegerRange(0, 65536) Param
394Limit on number of alias checks performed when attempting to form an ldp/stp.
395
396-param=aarch64-ldp-writeback=
397Target Joined UInteger Var(aarch64_ldp_writeback) Init(2) IntegerRange(0,2) Param
398Param to control which writeback opportunities we try to handle in the
399load/store pair fusion pass. A value of zero disables writeback
400handling. One means we try to form pairs involving one or more existing
401individual writeback accesses where possible. A value of two means we
402also try to opportunistically form writeback opportunities by folding in
403trailing destructive updates of the base register used by a pair.