1 ; Options for the ARM port of the compiler.
3 ; Copyright (C) 2005-2023 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 Name(tls_type) Type(enum arm_tls_type)
29 Enum(tls_type) String(gnu) Value(TLS_GNU)
32 Enum(tls_type) String(gnu2) Value(TLS_GNU2)
35 Target RejectNegative Joined Enum(arm_abi_type) Var(arm_abi) Init(ARM_DEFAULT_ABI)
39 Name(arm_abi_type) Type(enum arm_abi_type)
40 Known ARM ABIs (for use with the -mabi= option):
43 Enum(arm_abi_type) String(apcs-gnu) Value(ARM_ABI_APCS)
46 Enum(arm_abi_type) String(atpcs) Value(ARM_ABI_ATPCS)
49 Enum(arm_abi_type) String(aapcs) Value(ARM_ABI_AAPCS)
52 Enum(arm_abi_type) String(iwmmxt) Value(ARM_ABI_IWMMXT)
55 Enum(arm_abi_type) String(aapcs-linux) Value(ARM_ABI_AAPCS_LINUX)
58 Target Mask(ABORT_NORETURN)
59 Generate a call to abort if a noreturn function returns.
62 Target RejectNegative Mask(APCS_FRAME) Undocumented
65 Target Mask(APCS_FRAME)
66 Generate APCS conformant stack frames.
69 Target Mask(APCS_REENT)
70 Generate re-entrant, PIC code.
73 Target Mask(APCS_STACK) Undocumented
76 Target Save RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
77 Specify the name of the target architecture.
79 ; Other arm_arch values are loaded from arm-tables.opt
80 ; but that is a generated file and this is an odd-one-out.
82 Enum(arm_arch) String(native) Value(-1) DriverOnly
84 ; Set to the name of target architecture which is required for
85 ; multilib linking. This option is undocumented because it
86 ; should not be used by the users.
88 Target RejectNegative JoinedOrMissing NoDWARFRecord DriverOnly Undocumented
91 Target RejectNegative Negative(mthumb) InverseMask(THUMB)
92 Generate code in 32 bit ARM state.
95 Target RejectNegative Negative(mlittle-endian) Mask(BIG_END)
96 Assume target CPU is configured as big endian.
98 mcallee-super-interworking
99 Target Mask(CALLEE_INTERWORKING)
100 Thumb: Assume non-static functions may be called from ARM code.
102 mcaller-super-interworking
103 Target Mask(CALLER_INTERWORKING)
104 Thumb: Assume function pointers may go to non-Thumb aware code.
107 Target Save RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
108 Specify the name of the target CPU.
111 Target RejectNegative Joined Enum(float_abi_type) Var(arm_float_abi) Init(TARGET_DEFAULT_FLOAT_ABI)
112 Specify if floating point hardware should be used.
115 Target RejectNegative Var(use_cmse)
116 Specify that the compiler should target secure code as per ARMv8-M Security Extensions.
119 Name(float_abi_type) Type(enum float_abi_type)
120 Known floating-point ABIs (for use with the -mfloat-abi= option):
123 Enum(float_abi_type) String(soft) Value(ARM_FLOAT_ABI_SOFT)
126 Enum(float_abi_type) String(softfp) Value(ARM_FLOAT_ABI_SOFTFP)
129 Enum(float_abi_type) String(hard) Value(ARM_FLOAT_ABI_HARD)
132 Target Var(TARGET_FLIP_THUMB) Undocumented
133 Switch ARM/Thumb modes on alternating functions for compiler testing.
136 Target RejectNegative Joined Enum(arm_fp16_format_type) Var(arm_fp16_format) Init(ARM_FP16_FORMAT_NONE)
137 Specify the __fp16 floating-point format.
140 Name(arm_fp16_format_type) Type(enum arm_fp16_format_type)
141 Known __fp16 formats (for use with the -mfp16-format= option):
144 Enum(arm_fp16_format_type) String(none) Value(ARM_FP16_FORMAT_NONE)
147 Enum(arm_fp16_format_type) String(ieee) Value(ARM_FP16_FORMAT_IEEE)
150 Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE)
153 Target RejectNegative Joined Enum(arm_fpu) Var(arm_fpu_index) Init(TARGET_FPU_auto) Save
154 Specify the name of the target floating point hardware/format.
157 Target RejectNegative Alias(mfloat-abi=, hard) Undocumented
160 Target RejectNegative Negative(mbig-endian) InverseMask(BIG_END)
161 Assume target CPU is configured as little endian.
164 Target Mask(LONG_CALLS)
165 Generate call insns as indirect calls, if necessary.
167 mpic-data-is-text-relative
168 Target Var(arm_pic_data_is_text_relative) Init(TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE)
169 Assume data segments are relative to text segment.
172 Target RejectNegative Joined Var(arm_pic_register_string)
173 Specify the register to be used for PIC addressing.
176 Target Mask(POKE_FUNCTION_NAME)
177 Store function names in object code.
180 Target Mask(SCHED_PROLOG)
181 Permit scheduling of a function's prologue sequence.
184 Target Mask(SINGLE_PIC_BASE)
185 Do not load the PIC register in function prologues.
188 Target RejectNegative Alias(mfloat-abi=, soft) Undocumented
190 mstructure-size-boundary=
191 Target RejectNegative Joined UInteger Var(arm_structure_size_boundary) Init(DEFAULT_STRUCTURE_SIZE_BOUNDARY)
192 Specify the minimum bit alignment of structures. (Deprecated).
195 Target RejectNegative Negative(marm) Mask(THUMB) Save
196 Generate code for Thumb state.
199 Target Mask(INTERWORK)
200 Support calls between Thumb and ARM instruction sets.
203 Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU)
204 Specify thread local storage scheme.
207 Target RejectNegative Joined Enum(arm_tp_type) Var(target_thread_pointer) Init(TP_AUTO)
208 Specify how to access the thread pointer.
211 Name(arm_tp_type) Type(enum arm_tp_type)
212 Valid arguments to -mtp=:
215 Enum(arm_tp_type) String(soft) Value(TP_SOFT)
218 Enum(arm_tp_type) String(auto) Value(TP_AUTO)
221 Enum(arm_tp_type) String(cp15) Value(TP_CP15)
224 Target Mask(TPCS_FRAME)
225 Thumb: Generate (non-leaf) stack frames even if not needed.
228 Target Mask(TPCS_LEAF_FRAME)
229 Thumb: Generate (leaf) stack frames even if not needed.
232 Target Save RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
233 Tune code for the given processor.
236 Target RejectNegative Var(print_tune_info) Init(0)
237 Print CPU tuning information as comment in assembler file. This is
238 an option used only for regression testing of the compiler and not
239 intended for ordinary use in compiling code.
241 ; Other processor_type values are loaded from arm-tables.opt
242 ; but that is a generated file and this is an odd-one-out.
244 Enum(processor_type) String(native) Value(-1) DriverOnly
246 mvectorize-with-neon-quad
247 Target RejectNegative InverseMask(NEON_VECTORIZE_DOUBLE)
248 Use Neon quad-word (rather than double-word) registers for vectorization.
250 mvectorize-with-neon-double
251 Target RejectNegative Mask(NEON_VECTORIZE_DOUBLE)
252 Use Neon double-word (rather than quad-word) registers for vectorization.
255 Common Undocumented Var(arm_verbose_cost) Init(0)
256 Enable more verbose RTX cost dumps during debug. For GCC developers use only.
259 Target Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS)
260 Only generate absolute relocations on word sized values.
263 Target Var(arm_restrict_it) Init(2) Save
264 Generate IT blocks appropriate for ARMv8.
267 Target Var(fix_cm3_ldrd) Init(2)
268 Avoid overlapping destination and address registers on LDRD instructions
269 that may trigger Cortex-M3 errata.
271 mfix-cmse-cve-2021-35465
272 Target Var(fix_vlldm) Init(2)
273 Mitigate issues with VLLDM on some M-profile devices (CVE-2021-35465).
275 mfix-cortex-a57-aes-1742098
276 Target Var(fix_aes_erratum_1742098) Init(2) Save
277 Mitigate issues with AES instructions on Cortex-A57 and Cortex-A72
278 (Arm erratum #1742098).
280 mfix-cortex-a72-aes-1655431
281 Target Alias(mfix-cortex-a57-aes-1742098)
282 Mitigate issues with AES instructions on Cortex-A57 and Cortex-A72
283 (Arm erratum #1655431).
286 Target Var(unaligned_access) Init(2) Save
287 Enable unaligned word and halfword accesses to packed data.
291 This option is deprecated and has no effect.
294 Target Var(target_slow_flash_data) Init(0)
295 Assume loading data from flash is slower than fetching instructions.
298 Target Var(inline_asm_unified) Init(0) Save
299 Assume unified syntax for inline assembly code.
302 Target Var(target_pure_code) Init(0)
303 Do not allow constant data to be placed in code sections.
306 Target RejectNegative Negative(mbe32) Mask(BE8)
307 When linking for big-endian targets, generate a BE8 format image.
310 Target RejectNegative Negative(mbe8) InverseMask(BE8)
311 When linking for big-endian targets, generate a legacy BE32 format image.
314 Target RejectNegative Joined UInteger Var(arm_branch_cost) Init(-1)
315 Cost to assume for a branch insn.
318 Target RejectNegative Mask(GENERAL_REGS_ONLY) Save
319 Generate code which uses the core registers only (r0-r14).
323 Enable Function Descriptor PIC mode.
325 mstack-protector-guard=
326 Target RejectNegative Joined Enum(stack_protector_guard) Var(arm_stack_protector_guard) Init(SSP_GLOBAL)
327 Use given stack-protector guard.
330 Name(stack_protector_guard) Type(enum stack_protector_guard)
331 Valid arguments to -mstack-protector-guard=:
334 Enum(stack_protector_guard) String(tls) Value(SSP_TLSREG)
337 Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)
339 mstack-protector-guard-offset=
340 Target Joined RejectNegative String Var(arm_stack_protector_guard_offset_str)
341 Use an immediate to offset from the TLS register. This option is for use with
342 fstack-protector-guard=tls and not for use in user-land code.
345 long arm_stack_protector_guard_offset = 0