Daily bump.
[official-gcc.git] / gcc / config / arm / arm.opt
blob042cb54e05b95f5a2aacfb06449f6b39c1c253c7
1 ; Options for the ARM port of the compiler.
3 ; Copyright (C) 2005-2025 Free Software Foundation, Inc.
5 ; This file is part of GCC.
7 ; GCC is free software; you can redistribute it and/or modify it under
8 ; the terms of the GNU General Public License as published by the Free
9 ; Software Foundation; either version 3, or (at your option) any later
10 ; version.
12 ; GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 ; WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 ; FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 ; 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/arm/arm-opts.h
24 HeaderInclude
25 config/arm/aarch-common.h
27 TargetVariable
28 enum aarch_function_type aarch_ra_sign_scope = AARCH_FUNCTION_NONE
30 TargetVariable
31 unsigned aarch_enable_bti = 0
33 Enum
34 Name(tls_type) Type(enum arm_tls_type)
35 TLS dialect to use:
37 EnumValue
38 Enum(tls_type) String(gnu) Value(TLS_GNU)
40 EnumValue
41 Enum(tls_type) String(gnu2) Value(TLS_GNU2)
43 mabi=
44 Target RejectNegative Joined Enum(arm_abi_type) Var(arm_abi) Init(ARM_DEFAULT_ABI)
45 Specify an ABI.
47 Enum
48 Name(arm_abi_type) Type(enum arm_abi_type)
49 Known ARM ABIs (for use with the -mabi= option):
51 EnumValue
52 Enum(arm_abi_type) String(apcs-gnu) Value(ARM_ABI_APCS)
54 EnumValue
55 Enum(arm_abi_type) String(atpcs) Value(ARM_ABI_ATPCS)
57 EnumValue
58 Enum(arm_abi_type) String(aapcs) Value(ARM_ABI_AAPCS)
60 EnumValue
61 Enum(arm_abi_type) String(iwmmxt) Value(ARM_ABI_IWMMXT)
63 EnumValue
64 Enum(arm_abi_type) String(aapcs-linux) Value(ARM_ABI_AAPCS_LINUX)
66 mabort-on-noreturn
67 Target Mask(ABORT_NORETURN)
68 Generate a call to abort if a noreturn function returns.
70 mapcs
71 Target RejectNegative Mask(APCS_FRAME) Undocumented
73 mapcs-frame
74 Target Mask(APCS_FRAME)
75 Generate APCS conformant stack frames.
77 mapcs-reentrant
78 Target Mask(APCS_REENT)
79 Generate re-entrant, PIC code.
81 mapcs-stack-check
82 Target Mask(APCS_STACK) Undocumented
84 march=
85 Target Save RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
86 Specify the name of the target architecture.
88 ; Other arm_arch values are loaded from arm-tables.opt
89 ; but that is a generated file and this is an odd-one-out.
90 EnumValue
91 Enum(arm_arch) String(native) Value(-1) DriverOnly
93 ; Set to the name of target architecture which is required for
94 ; multilib linking.  This option is undocumented because it
95 ; should not be used by the users.
96 mlibarch=
97 Target RejectNegative JoinedOrMissing NoDWARFRecord DriverOnly Undocumented
99 marm
100 Target RejectNegative Negative(mthumb) InverseMask(THUMB)
101 Generate code in 32 bit ARM state.
103 mbig-endian
104 Target RejectNegative Negative(mlittle-endian) Mask(BIG_END)
105 Assume target CPU is configured as big endian.
107 mcallee-super-interworking
108 Target Mask(CALLEE_INTERWORKING)
109 Thumb: Assume non-static functions may be called from ARM code.
111 mcaller-super-interworking
112 Target Mask(CALLER_INTERWORKING)
113 Thumb: Assume function pointers may go to non-Thumb aware code.
115 mcpu=
116 Target Save RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
117 Specify the name of the target CPU.
119 mfloat-abi=
120 Target RejectNegative Joined Enum(float_abi_type) Var(arm_float_abi) Init(TARGET_DEFAULT_FLOAT_ABI)
121 Specify if floating point hardware should be used.
123 mcmse
124 Target RejectNegative Var(use_cmse)
125 Specify that the compiler should target secure code as per ARMv8-M Security Extensions.
127 Enum
128 Name(float_abi_type) Type(enum float_abi_type)
129 Known floating-point ABIs (for use with the -mfloat-abi= option):
131 EnumValue
132 Enum(float_abi_type) String(soft) Value(ARM_FLOAT_ABI_SOFT)
134 EnumValue
135 Enum(float_abi_type) String(softfp) Value(ARM_FLOAT_ABI_SOFTFP)
137 EnumValue
138 Enum(float_abi_type) String(hard) Value(ARM_FLOAT_ABI_HARD)
140 mflip-thumb
141 Target Var(TARGET_FLIP_THUMB) Undocumented
142 Switch ARM/Thumb modes on alternating functions for compiler testing.
144 mfp16-format=
145 Target RejectNegative Joined Enum(arm_fp16_format_type) Var(arm_fp16_format) Init(ARM_FP16_FORMAT_NONE)
146 Specify the __fp16 floating-point format.
148 Enum
149 Name(arm_fp16_format_type) Type(enum arm_fp16_format_type)
150 Known __fp16 formats (for use with the -mfp16-format= option):
152 EnumValue
153 Enum(arm_fp16_format_type) String(none) Value(ARM_FP16_FORMAT_NONE)
155 EnumValue
156 Enum(arm_fp16_format_type) String(ieee) Value(ARM_FP16_FORMAT_IEEE)
158 EnumValue
159 Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
161 mfpu=
162 Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Init(TARGET_FPU_auto) Save
163 Specify the name of the target floating point hardware/format.
165 mhard-float
166 Target RejectNegative Alias(mfloat-abi=, hard) Undocumented
168 mlittle-endian
169 Target RejectNegative Negative(mbig-endian) InverseMask(BIG_END)
170 Assume target CPU is configured as little endian.
172 mlong-calls
173 Target Mask(LONG_CALLS)
174 Generate call insns as indirect calls, if necessary.
176 mpic-data-is-text-relative
177 Target Var(arm_pic_data_is_text_relative) Init(TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE)
178 Assume data segments are relative to text segment.
180 mpic-register=
181 Target RejectNegative Joined Var(arm_pic_register_string)
182 Specify the register to be used for PIC addressing.
184 mpoke-function-name
185 Target Mask(POKE_FUNCTION_NAME)
186 Store function names in object code.
188 msched-prolog
189 Target Mask(SCHED_PROLOG)
190 Permit scheduling of a function's prologue sequence.
192 msingle-pic-base
193 Target Mask(SINGLE_PIC_BASE)
194 Do not load the PIC register in function prologues.
196 msoft-float
197 Target RejectNegative Alias(mfloat-abi=, soft) Undocumented
199 mstructure-size-boundary=
200 Target RejectNegative Joined UInteger Var(arm_structure_size_boundary) Init(DEFAULT_STRUCTURE_SIZE_BOUNDARY)
201 Specify the minimum bit alignment of structures. (Deprecated).
203 mthumb
204 Target RejectNegative Negative(marm) Mask(THUMB) Save
205 Generate code for Thumb state.
207 mthumb-interwork
208 Target Mask(INTERWORK)
209 Support calls between Thumb and ARM instruction sets.
211 mtls-dialect=
212 Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
213 Specify thread local storage scheme.
215 mtp=
216 Target RejectNegative Joined Enum(arm_tp_type) Var(target_thread_pointer) Init(TP_AUTO)
217 Specify how to access the thread pointer.
219 Enum
220 Name(arm_tp_type) Type(enum arm_tp_type)
221 Valid arguments to -mtp=:
223 EnumValue
224 Enum(arm_tp_type) String(soft) Value(TP_SOFT)
226 EnumValue
227 Enum(arm_tp_type) String(auto) Value(TP_AUTO)
229 EnumValue
230 Enum(arm_tp_type) String(tpidrurw) Value(TP_TPIDRURW)
232 EnumValue
233 Enum(arm_tp_type) String(cp15) Value(TP_TPIDRURO)
235 EnumValue
236 Enum(arm_tp_type) String(tpidruro) Value(TP_TPIDRURO)
238 EnumValue
239 Enum(arm_tp_type) String(tpidrprw) Value(TP_TPIDRPRW)
241 mtpcs-frame
242 Target Mask(TPCS_FRAME)
243 Thumb: Generate (non-leaf) stack frames even if not needed.
245 mtpcs-leaf-frame
246 Target Mask(TPCS_LEAF_FRAME)
247 Thumb: Generate (leaf) stack frames even if not needed.
249 mtune=
250 Target Save RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
251 Tune code for the given processor.
253 mprint-tune-info
254 Target RejectNegative Var(print_tune_info) Init(0)
255 Print CPU tuning information as comment in assembler file.  This is
256 an option used only for regression testing of the compiler and not
257 intended for ordinary use in compiling code.
259 ; Other processor_type values are loaded from arm-tables.opt
260 ; but that is a generated file and this is an odd-one-out.
261 EnumValue
262 Enum(processor_type) String(native) Value(-1) DriverOnly
264 mvectorize-with-neon-quad
265 Target RejectNegative InverseMask(NEON_VECTORIZE_DOUBLE)
266 Use Neon quad-word (rather than double-word) registers for vectorization.
268 mvectorize-with-neon-double
269 Target RejectNegative Mask(NEON_VECTORIZE_DOUBLE)
270 Use Neon double-word (rather than quad-word) registers for vectorization.
272 mverbose-cost-dump
273 Common Undocumented Var(arm_verbose_cost) Init(0)
274 Enable more verbose RTX cost dumps during debug.  For GCC developers use only.
276 mword-relocations
277 Target Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS)
278 Only generate absolute relocations on word sized values.
280 mrestrict-it
281 Target Var(arm_restrict_it) Init(2) Save
282 Generate IT blocks appropriate for ARMv8.
284 mfix-cortex-m3-ldrd
285 Target Var(fix_cm3_ldrd) Init(2)
286 Avoid overlapping destination and address registers on LDRD instructions
287 that may trigger Cortex-M3 errata.
289 mfix-cmse-cve-2021-35465
290 Target Var(fix_vlldm) Init(2)
291 Mitigate issues with VLLDM on some M-profile devices (CVE-2021-35465).
293 mfix-cortex-a57-aes-1742098
294 Target Var(fix_aes_erratum_1742098) Init(2) Save
295 Mitigate issues with AES instructions on Cortex-A57 and Cortex-A72
296 (Arm erratum #1742098).
298 mfix-cortex-a72-aes-1655431
299 Target Alias(mfix-cortex-a57-aes-1742098)
300 Mitigate issues with AES instructions on Cortex-A57 and Cortex-A72
301 (Arm erratum #1655431).
303 munaligned-access
304 Target Var(unaligned_access) Init(2) Save
305 Enable unaligned word and halfword accesses to packed data.
307 mneon-for-64bits
308 Target WarnRemoved
309 This option is deprecated and has no effect.
311 mslow-flash-data
312 Target Var(target_slow_flash_data) Init(0)
313 Assume loading data from flash is slower than fetching instructions.
315 masm-syntax-unified
316 Target Var(inline_asm_unified) Init(0) Save
317 Assume unified syntax for inline assembly code.
319 mpure-code
320 Target Var(target_pure_code) Init(0)
321 Do not allow constant data to be placed in code sections.
323 mbe8
324 Target RejectNegative Negative(mbe32) Mask(BE8)
325 When linking for big-endian targets, generate a BE8 format image.
327 mbe32
328 Target RejectNegative Negative(mbe8) InverseMask(BE8)
329 When linking for big-endian targets, generate a legacy BE32 format image.
331 mbranch-cost=
332 Target RejectNegative Joined UInteger Var(arm_branch_cost) Init(-1)
333 Cost to assume for a branch insn.
335 mbranch-protection=
336 Target RejectNegative Joined Var(arm_branch_protection_string) Save
337 Use branch-protection features.
339 mgeneral-regs-only
340 Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
341 Generate code which uses the core registers only (r0-r14).
343 mfdpic
344 Target Mask(FDPIC)
345 Enable Function Descriptor PIC mode.
347 mstack-protector-guard=
348 Target RejectNegative Joined Enum(stack_protector_guard) Var(arm_stack_protector_guard) Init(SSP_GLOBAL)
349 Use given stack-protector guard.
351 Enum
352 Name(stack_protector_guard) Type(enum stack_protector_guard)
353 Valid arguments to -mstack-protector-guard=:
355 EnumValue
356 Enum(stack_protector_guard) String(tls) Value(SSP_TLSREG)
358 EnumValue
359 Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
361 mstack-protector-guard-offset=
362 Target Joined RejectNegative String Var(arm_stack_protector_guard_offset_str)
363 Use an immediate to offset from the TLS register. This option is for use with
364 fstack-protector-guard=tls and not for use in user-land code.
366 mdlstp
367 Target Var(dlstp_enabled) Init(1) Undocumented
369 TargetVariable
370 long arm_stack_protector_guard_offset = 0