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
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
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/>.
25 config/arm/aarch-common.h
28 enum aarch_function_type aarch_ra_sign_scope = AARCH_FUNCTION_NONE
31 unsigned aarch_enable_bti = 0
34 Name(tls_type) Type(enum arm_tls_type)
38 Enum(tls_type) String(gnu) Value(TLS_GNU)
41 Enum(tls_type) String(gnu2) Value(TLS_GNU2)
44 Target RejectNegative Joined Enum(arm_abi_type) Var(arm_abi) Init(ARM_DEFAULT_ABI)
48 Name(arm_abi_type) Type(enum arm_abi_type)
49 Known ARM ABIs (for use with the -mabi= option):
52 Enum(arm_abi_type) String(apcs-gnu) Value(ARM_ABI_APCS)
55 Enum(arm_abi_type) String(atpcs) Value(ARM_ABI_ATPCS)
58 Enum(arm_abi_type) String(aapcs) Value(ARM_ABI_AAPCS)
61 Enum(arm_abi_type) String(iwmmxt) Value(ARM_ABI_IWMMXT)
64 Enum(arm_abi_type) String(aapcs-linux) Value(ARM_ABI_AAPCS_LINUX)
67 Target Mask(ABORT_NORETURN)
68 Generate a call to abort if a noreturn function returns.
71 Target RejectNegative Mask(APCS_FRAME) Undocumented
74 Target Mask(APCS_FRAME)
75 Generate APCS conformant stack frames.
78 Target Mask(APCS_REENT)
79 Generate re-entrant, PIC code.
82 Target Mask(APCS_STACK) Undocumented
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.
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.
97 Target RejectNegative JoinedOrMissing NoDWARFRecord DriverOnly Undocumented
100 Target RejectNegative Negative(mthumb) InverseMask(THUMB)
101 Generate code in 32 bit ARM state.
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.
116 Target Save RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
117 Specify the name of the target CPU.
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.
124 Target RejectNegative Var(use_cmse)
125 Specify that the compiler should target secure code as per ARMv8-M Security Extensions.
128 Name(float_abi_type) Type(enum float_abi_type)
129 Known floating-point ABIs (for use with the -mfloat-abi= option):
132 Enum(float_abi_type) String(soft) Value(ARM_FLOAT_ABI_SOFT)
135 Enum(float_abi_type) String(softfp) Value(ARM_FLOAT_ABI_SOFTFP)
138 Enum(float_abi_type) String(hard) Value(ARM_FLOAT_ABI_HARD)
141 Target Var(TARGET_FLIP_THUMB) Undocumented
142 Switch ARM/Thumb modes on alternating functions for compiler testing.
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.
149 Name(arm_fp16_format_type) Type(enum arm_fp16_format_type)
150 Known __fp16 formats (for use with the -mfp16-format= option):
153 Enum(arm_fp16_format_type) String(none) Value(ARM_FP16_FORMAT_NONE)
156 Enum(arm_fp16_format_type) String(ieee) Value(ARM_FP16_FORMAT_IEEE)
159 Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
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.
166 Target RejectNegative Alias(mfloat-abi=, hard) Undocumented
169 Target RejectNegative Negative(mbig-endian) InverseMask(BIG_END)
170 Assume target CPU is configured as little endian.
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.
181 Target RejectNegative Joined Var(arm_pic_register_string)
182 Specify the register to be used for PIC addressing.
185 Target Mask(POKE_FUNCTION_NAME)
186 Store function names in object code.
189 Target Mask(SCHED_PROLOG)
190 Permit scheduling of a function's prologue sequence.
193 Target Mask(SINGLE_PIC_BASE)
194 Do not load the PIC register in function prologues.
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).
204 Target RejectNegative Negative(marm) Mask(THUMB) Save
205 Generate code for Thumb state.
208 Target Mask(INTERWORK)
209 Support calls between Thumb and ARM instruction sets.
212 Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
213 Specify thread local storage scheme.
216 Target RejectNegative Joined Enum(arm_tp_type) Var(target_thread_pointer) Init(TP_AUTO)
217 Specify how to access the thread pointer.
220 Name(arm_tp_type) Type(enum arm_tp_type)
221 Valid arguments to -mtp=:
224 Enum(arm_tp_type) String(soft) Value(TP_SOFT)
227 Enum(arm_tp_type) String(auto) Value(TP_AUTO)
230 Enum(arm_tp_type) String(tpidrurw) Value(TP_TPIDRURW)
233 Enum(arm_tp_type) String(cp15) Value(TP_TPIDRURO)
236 Enum(arm_tp_type) String(tpidruro) Value(TP_TPIDRURO)
239 Enum(arm_tp_type) String(tpidrprw) Value(TP_TPIDRPRW)
242 Target Mask(TPCS_FRAME)
243 Thumb: Generate (non-leaf) stack frames even if not needed.
246 Target Mask(TPCS_LEAF_FRAME)
247 Thumb: Generate (leaf) stack frames even if not needed.
250 Target Save RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
251 Tune code for the given processor.
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.
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.
273 Common Undocumented Var(arm_verbose_cost) Init(0)
274 Enable more verbose RTX cost dumps during debug. For GCC developers use only.
277 Target Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS)
278 Only generate absolute relocations on word sized values.
281 Target Var(arm_restrict_it) Init(2) Save
282 Generate IT blocks appropriate for ARMv8.
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).
304 Target Var(unaligned_access) Init(2) Save
305 Enable unaligned word and halfword accesses to packed data.
309 This option is deprecated and has no effect.
312 Target Var(target_slow_flash_data) Init(0)
313 Assume loading data from flash is slower than fetching instructions.
316 Target Var(inline_asm_unified) Init(0) Save
317 Assume unified syntax for inline assembly code.
320 Target Var(target_pure_code) Init(0)
321 Do not allow constant data to be placed in code sections.
324 Target RejectNegative Negative(mbe32) Mask(BE8)
325 When linking for big-endian targets, generate a BE8 format image.
328 Target RejectNegative Negative(mbe8) InverseMask(BE8)
329 When linking for big-endian targets, generate a legacy BE32 format image.
332 Target RejectNegative Joined UInteger Var(arm_branch_cost) Init(-1)
333 Cost to assume for a branch insn.
336 Target RejectNegative Joined Var(arm_branch_protection_string) Save
337 Use branch-protection features.
340 Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
341 Generate code which uses the core registers only (r0-r14).
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.
352 Name(stack_protector_guard) Type(enum stack_protector_guard)
353 Valid arguments to -mstack-protector-guard=:
356 Enum(stack_protector_guard) String(tls) Value(SSP_TLSREG)
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.
367 Target Var(dlstp_enabled) Init(1) Undocumented
370 long arm_stack_protector_guard_offset = 0