| 1 |
; Options for the ARM port of the compiler. |
| 2 |
|
| 3 |
; Copyright (C) 2005-2025 Free Software Foundation, Inc. |
| 4 |
; |
| 5 |
; This file is part of GCC. |
| 6 |
; |
| 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. |
| 11 |
; |
| 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. |
| 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 |
|
| 21 |
HeaderInclude |
| 22 |
config/arm/arm-opts.h |
| 23 |
|
| 24 |
HeaderInclude |
| 25 |
config/arm/aarch-common.h |
| 26 |
|
| 27 |
TargetVariable |
| 28 |
enum aarch_function_type aarch_ra_sign_scope = AARCH_FUNCTION_NONE |
| 29 |
|
| 30 |
TargetVariable |
| 31 |
unsigned aarch_enable_bti = 0 |
| 32 |
|
| 33 |
Enum |
| 34 |
Name(tls_type) Type(enum arm_tls_type) |
| 35 |
TLS dialect to use: |
| 36 |
|
| 37 |
EnumValue |
| 38 |
Enum(tls_type) String(gnu) Value(TLS_GNU) |
| 39 |
|
| 40 |
EnumValue |
| 41 |
Enum(tls_type) String(gnu2) Value(TLS_GNU2) |
| 42 |
|
| 43 |
mabi= |
| 44 |
Target RejectNegative Joined Enum(arm_abi_type) Var(arm_abi) Init(ARM_DEFAULT_ABI) |
| 45 |
Specify an ABI. |
| 46 |
|
| 47 |
Enum |
| 48 |
Name(arm_abi_type) Type(enum arm_abi_type) |
| 49 |
Known ARM ABIs (for use with the -mabi= option): |
| 50 |
|
| 51 |
EnumValue |
| 52 |
Enum(arm_abi_type) String(apcs-gnu) Value(ARM_ABI_APCS) |
| 53 |
|
| 54 |
EnumValue |
| 55 |
Enum(arm_abi_type) String(atpcs) Value(ARM_ABI_ATPCS) |
| 56 |
|
| 57 |
EnumValue |
| 58 |
Enum(arm_abi_type) String(aapcs) Value(ARM_ABI_AAPCS) |
| 59 |
|
| 60 |
EnumValue |
| 61 |
Enum(arm_abi_type) String(iwmmxt) Value(ARM_ABI_IWMMXT) |
| 62 |
|
| 63 |
EnumValue |
| 64 |
Enum(arm_abi_type) String(aapcs-linux) Value(ARM_ABI_AAPCS_LINUX) |
| 65 |
|
| 66 |
mabort-on-noreturn |
| 67 |
Target Mask(ABORT_NORETURN) |
| 68 |
Generate a call to abort if a noreturn function returns. |
| 69 |
|
| 70 |
mapcs |
| 71 |
Target RejectNegative Mask(APCS_FRAME) Undocumented |
| 72 |
|
| 73 |
mapcs-frame |
| 74 |
Target Mask(APCS_FRAME) |
| 75 |
Generate APCS conformant stack frames. |
| 76 |
|
| 77 |
mapcs-reentrant |
| 78 |
Target Mask(APCS_REENT) |
| 79 |
Generate re-entrant, PIC code. |
| 80 |
|
| 81 |
mapcs-stack-check |
| 82 |
Target Mask(APCS_STACK) Undocumented |
| 83 |
|
| 84 |
march= |
| 85 |
Target Save RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string) |
| 86 |
Specify the name of the target architecture. |
| 87 |
|
| 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 |
| 92 |
|
| 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 |
| 98 |
|
| 99 |
marm |
| 100 |
Target RejectNegative Negative(mthumb) InverseMask(THUMB) |
| 101 |
Generate code in 32 bit ARM state. |
| 102 |
|
| 103 |
mbig-endian |
| 104 |
Target RejectNegative Negative(mlittle-endian) Mask(BIG_END) |
| 105 |
Assume target CPU is configured as big endian. |
| 106 |
|
| 107 |
mcallee-super-interworking |
| 108 |
Target Mask(CALLEE_INTERWORKING) |
| 109 |
Thumb: Assume non-static functions may be called from ARM code. |
| 110 |
|
| 111 |
mcaller-super-interworking |
| 112 |
Target Mask(CALLER_INTERWORKING) |
| 113 |
Thumb: Assume function pointers may go to non-Thumb aware code. |
| 114 |
|
| 115 |
mcpu= |
| 116 |
Target Save RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string) |
| 117 |
Specify the name of the target CPU. |
| 118 |
|
| 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. |
| 122 |
|
| 123 |
mcmse |
| 124 |
Target RejectNegative Var(use_cmse) |
| 125 |
Specify that the compiler should target secure code as per ARMv8-M Security Extensions. |
| 126 |
|
| 127 |
Enum |
| 128 |
Name(float_abi_type) Type(enum float_abi_type) |
| 129 |
Known floating-point ABIs (for use with the -mfloat-abi= option): |
| 130 |
|
| 131 |
EnumValue |
| 132 |
Enum(float_abi_type) String(soft) Value(ARM_FLOAT_ABI_SOFT) |
| 133 |
|
| 134 |
EnumValue |
| 135 |
Enum(float_abi_type) String(softfp) Value(ARM_FLOAT_ABI_SOFTFP) |
| 136 |
|
| 137 |
EnumValue |
| 138 |
Enum(float_abi_type) String(hard) Value(ARM_FLOAT_ABI_HARD) |
| 139 |
|
| 140 |
mflip-thumb |
| 141 |
Target Var(TARGET_FLIP_THUMB) Undocumented |
| 142 |
Switch ARM/Thumb modes on alternating functions for compiler testing. |
| 143 |
|
| 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. |
| 147 |
|
| 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): |
| 151 |
|
| 152 |
EnumValue |
| 153 |
Enum(arm_fp16_format_type) String(none) Value(ARM_FP16_FORMAT_NONE) |
| 154 |
|
| 155 |
EnumValue |
| 156 |
Enum(arm_fp16_format_type) String(ieee) Value(ARM_FP16_FORMAT_IEEE) |
| 157 |
|
| 158 |
EnumValue |
| 159 |
Enum(arm_fp16_format_type) String(alternative) Value(ARM_FP16_FORMAT_ALTERNATIVE) |
| 160 |
|
| 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. |
| 164 |
|
| 165 |
mhard-float |
| 166 |
Target RejectNegative Alias(mfloat-abi=, hard) Undocumented |
| 167 |
|
| 168 |
mlittle-endian |
| 169 |
Target RejectNegative Negative(mbig-endian) InverseMask(BIG_END) |
| 170 |
Assume target CPU is configured as little endian. |
| 171 |
|
| 172 |
mlong-calls |
| 173 |
Target Mask(LONG_CALLS) |
| 174 |
Generate call insns as indirect calls, if necessary. |
| 175 |
|
| 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. |
| 179 |
|
| 180 |
mpic-register= |
| 181 |
Target RejectNegative Joined Var(arm_pic_register_string) |
| 182 |
Specify the register to be used for PIC addressing. |
| 183 |
|
| 184 |
mpoke-function-name |
| 185 |
Target Mask(POKE_FUNCTION_NAME) |
| 186 |
Store function names in object code. |
| 187 |
|
| 188 |
msched-prolog |
| 189 |
Target Mask(SCHED_PROLOG) |
| 190 |
Permit scheduling of a function's prologue sequence. |
| 191 |
|
| 192 |
msingle-pic-base |
| 193 |
Target Mask(SINGLE_PIC_BASE) |
| 194 |
Do not load the PIC register in function prologues. |
| 195 |
|
| 196 |
msoft-float |
| 197 |
Target RejectNegative Alias(mfloat-abi=, soft) Undocumented |
| 198 |
|
| 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). |
| 202 |
|
| 203 |
mthumb |
| 204 |
Target RejectNegative Negative(marm) Mask(THUMB) Save |
| 205 |
Generate code for Thumb state. |
| 206 |
|
| 207 |
mthumb-interwork |
| 208 |
Target Mask(INTERWORK) |
| 209 |
Support calls between Thumb and ARM instruction sets. |
| 210 |
|
| 211 |
mtls-dialect= |
| 212 |
Target RejectNegative Joined Enum(tls_type) Var(target_tls_dialect) Init(TLS_GNU) |
| 213 |
Specify thread local storage scheme. |
| 214 |
|
| 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. |
| 218 |
|
| 219 |
Enum |
| 220 |
Name(arm_tp_type) Type(enum arm_tp_type) |
| 221 |
Valid arguments to -mtp=: |
| 222 |
|
| 223 |
EnumValue |
| 224 |
Enum(arm_tp_type) String(soft) Value(TP_SOFT) |
| 225 |
|
| 226 |
EnumValue |
| 227 |
Enum(arm_tp_type) String(auto) Value(TP_AUTO) |
| 228 |
|
| 229 |
EnumValue |
| 230 |
Enum(arm_tp_type) String(tpidrurw) Value(TP_TPIDRURW) |
| 231 |
|
| 232 |
EnumValue |
| 233 |
Enum(arm_tp_type) String(cp15) Value(TP_TPIDRURO) |
| 234 |
|
| 235 |
EnumValue |
| 236 |
Enum(arm_tp_type) String(tpidruro) Value(TP_TPIDRURO) |
| 237 |
|
| 238 |
EnumValue |
| 239 |
Enum(arm_tp_type) String(tpidrprw) Value(TP_TPIDRPRW) |
| 240 |
|
| 241 |
mtpcs-frame |
| 242 |
Target Mask(TPCS_FRAME) |
| 243 |
Thumb: Generate (non-leaf) stack frames even if not needed. |
| 244 |
|
| 245 |
mtpcs-leaf-frame |
| 246 |
Target Mask(TPCS_LEAF_FRAME) |
| 247 |
Thumb: Generate (leaf) stack frames even if not needed. |
| 248 |
|
| 249 |
mtune= |
| 250 |
Target Save RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string) |
| 251 |
Tune code for the given processor. |
| 252 |
|
| 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. |
| 258 |
|
| 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 |
| 263 |
|
| 264 |
mvectorize-with-neon-quad |
| 265 |
Target RejectNegative InverseMask(NEON_VECTORIZE_DOUBLE) |
| 266 |
Use Neon quad-word (rather than double-word) registers for vectorization. |
| 267 |
|
| 268 |
mvectorize-with-neon-double |
| 269 |
Target RejectNegative Mask(NEON_VECTORIZE_DOUBLE) |
| 270 |
Use Neon double-word (rather than quad-word) registers for vectorization. |
| 271 |
|
| 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. |
| 275 |
|
| 276 |
mword-relocations |
| 277 |
Target Var(target_word_relocations) Init(TARGET_DEFAULT_WORD_RELOCATIONS) |
| 278 |
Only generate absolute relocations on word sized values. |
| 279 |
|
| 280 |
mrestrict-it |
| 281 |
Target Var(arm_restrict_it) Init(2) Save |
| 282 |
Generate IT blocks appropriate for ARMv8. |
| 283 |
|
| 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. |
| 288 |
|
| 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). |
| 292 |
|
| 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). |
| 297 |
|
| 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). |
| 302 |
|
| 303 |
munaligned-access |
| 304 |
Target Var(unaligned_access) Init(2) Save |
| 305 |
Enable unaligned word and halfword accesses to packed data. |
| 306 |
|
| 307 |
mneon-for-64bits |
| 308 |
Target WarnRemoved |
| 309 |
This option is deprecated and has no effect. |
| 310 |
|
| 311 |
mslow-flash-data |
| 312 |
Target Var(target_slow_flash_data) Init(0) |
| 313 |
Assume loading data from flash is slower than fetching instructions. |
| 314 |
|
| 315 |
masm-syntax-unified |
| 316 |
Target Var(inline_asm_unified) Init(0) Save |
| 317 |
Assume unified syntax for inline assembly code. |
| 318 |
|
| 319 |
mpure-code |
| 320 |
Target Var(target_pure_code) Init(0) |
| 321 |
Do not allow constant data to be placed in code sections. |
| 322 |
|
| 323 |
mbe8 |
| 324 |
Target RejectNegative Negative(mbe32) Mask(BE8) |
| 325 |
When linking for big-endian targets, generate a BE8 format image. |
| 326 |
|
| 327 |
mbe32 |
| 328 |
Target RejectNegative Negative(mbe8) InverseMask(BE8) |
| 329 |
When linking for big-endian targets, generate a legacy BE32 format image. |
| 330 |
|
| 331 |
mbranch-cost= |
| 332 |
Target RejectNegative Joined UInteger Var(arm_branch_cost) Init(-1) |
| 333 |
Cost to assume for a branch insn. |
| 334 |
|
| 335 |
mbranch-protection= |
| 336 |
Target RejectNegative Joined Var(arm_branch_protection_string) Save |
| 337 |
Use branch-protection features. |
| 338 |
|
| 339 |
mgeneral-regs-only |
| 340 |
Target RejectNegative Mask(GENERAL_REGS_ONLY) Save |
| 341 |
Generate code which uses the core registers only (r0-r14). |
| 342 |
|
| 343 |
mfdpic |
| 344 |
Target Mask(FDPIC) |
| 345 |
Enable Function Descriptor PIC mode. |
| 346 |
|
| 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. |
| 350 |
|
| 351 |
Enum |
| 352 |
Name(stack_protector_guard) Type(enum stack_protector_guard) |
| 353 |
Valid arguments to -mstack-protector-guard=: |
| 354 |
|
| 355 |
EnumValue |
| 356 |
Enum(stack_protector_guard) String(tls) Value(SSP_TLSREG) |
| 357 |
|
| 358 |
EnumValue |
| 359 |
Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL) |
| 360 |
|
| 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. |
| 365 |
|
| 366 |
mdlstp |
| 367 |
Target Var(dlstp_enabled) Init(1) Undocumented |
| 368 |
|
| 369 |
TargetVariable |
| 370 |
long arm_stack_protector_guard_offset = 0 |