Debian Codegraph @

gcc/config/mips/mips.opt

raw
1 ; Options for the MIPS 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
13 ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 ; 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
21 HeaderInclude
22 config/mips/mips-opts.h
23
24 EB
25 Driver
26
27 EL
28 Driver
29
30 mabi=
31 Target RejectNegative Joined Enum(mips_abi) Var(mips_abi) Init(MIPS_ABI_DEFAULT)
32 -mabi=ABI Generate code that conforms to the given ABI.
33
34 Enum
35 Name(mips_abi) Type(int)
36 Known MIPS ABIs (for use with the -mabi= option):
37
38 EnumValue
39 Enum(mips_abi) String(32) Value(ABI_32)
40
41 EnumValue
42 Enum(mips_abi) String(o64) Value(ABI_O64)
43
44 EnumValue
45 Enum(mips_abi) String(n32) Value(ABI_N32)
46
47 EnumValue
48 Enum(mips_abi) String(64) Value(ABI_64)
49
50 EnumValue
51 Enum(mips_abi) String(eabi) Value(ABI_EABI)
52
53 mabicalls
54 Target Mask(ABICALLS)
55 Generate code that can be used in SVR4-style dynamic objects.
56
57 mmad
58 Target Var(TARGET_MAD)
59 Use PMC-style 'mad' instructions.
60
61 mimadd
62 Target Mask(IMADD)
63 Use integer madd/msub instructions.
64
65 march=
66 Target RejectNegative Joined Var(mips_arch_option) ToLower Enum(mips_arch_opt_value)
67 -march=ISA Generate code for the given ISA.
68
69 mbranch-cost=
70 Target RejectNegative Joined UInteger Var(mips_branch_cost)
71 -mbranch-cost=COST Set the cost of branches to roughly COST instructions.
72
73 mbranch-likely
74 Target Mask(BRANCHLIKELY)
75 Use Branch Likely instructions, overriding the architecture default.
76
77 mflip-mips16
78 Target Var(TARGET_FLIP_MIPS16)
79 Switch on/off MIPS16 ASE on alternating functions for compiler testing.
80
81 mcheck-zero-division
82 Target Mask(CHECK_ZERO_DIV)
83 Trap on integer divide by zero.
84
85 mcode-readable=
86 Target RejectNegative Joined Enum(mips_code_readable_setting) Var(mips_code_readable) Init(CODE_READABLE_YES)
87 -mcode-readable=SETTING Specify when instructions are allowed to access code.
88
89 Enum
90 Name(mips_code_readable_setting) Type(enum mips_code_readable_setting)
91 Valid arguments to -mcode-readable=:
92
93 EnumValue
94 Enum(mips_code_readable_setting) String(yes) Value(CODE_READABLE_YES)
95
96 EnumValue
97 Enum(mips_code_readable_setting) String(pcrel) Value(CODE_READABLE_PCREL)
98
99 EnumValue
100 Enum(mips_code_readable_setting) String(no) Value(CODE_READABLE_NO)
101
102 mdivide-breaks
103 Target RejectNegative Mask(DIVIDE_BREAKS)
104 Use branch-and-break sequences to check for integer divide by zero.
105
106 mdivide-traps
107 Target RejectNegative InverseMask(DIVIDE_BREAKS, DIVIDE_TRAPS)
108 Use trap instructions to check for integer divide by zero.
109
110 mdmx
111 Target RejectNegative Var(TARGET_MDMX)
112 Allow the use of MDMX instructions.
113
114 mdouble-float
115 Target RejectNegative InverseMask(SINGLE_FLOAT, DOUBLE_FLOAT)
116 Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations.
117
118 mdsp
119 Target Var(TARGET_DSP)
120 Use MIPS-DSP instructions.
121
122 mdspr2
123 Target Var(TARGET_DSPR2)
124 Use MIPS-DSP REV 2 instructions.
125
126 mdebug
127 Target Var(TARGET_DEBUG_MODE) Undocumented
128
129 mdebugd
130 Target Var(TARGET_DEBUG_D_MODE) Undocumented
131
132 meb
133 Target RejectNegative Mask(BIG_ENDIAN)
134 Use big-endian byte order.
135
136 mel
137 Target RejectNegative InverseMask(BIG_ENDIAN, LITTLE_ENDIAN)
138 Use little-endian byte order.
139
140 membedded-data
141 Target Var(TARGET_EMBEDDED_DATA)
142 Use ROM instead of RAM.
143
144 meva
145 Target Var(TARGET_EVA)
146 Use Enhanced Virtual Addressing instructions.
147
148 Enum
149 Name(mips_explicit_relocs) Type(int)
150 The code model option names for -mexplicit-relocs:
151
152 EnumValue
153 Enum(mips_explicit_relocs) String(none) Value(MIPS_EXPLICIT_RELOCS_NONE)
154
155 EnumValue
156 Enum(mips_explicit_relocs) String(base) Value(MIPS_EXPLICIT_RELOCS_BASE)
157
158 EnumValue
159 Enum(mips_explicit_relocs) String(pcrel) Value(MIPS_EXPLICIT_RELOCS_PCREL)
160
161 mexplicit-relocs=
162 Target RejectNegative Joined Enum(mips_explicit_relocs) Var(mips_opt_explicit_relocs) Init(MIPS_EXPLICIT_RELOCS)
163 Use %reloc() assembly operators.
164
165 mexplicit-relocs
166 Target RejectNegative Alias(mexplicit-relocs=,base)
167 Use %reloc() assembly operators (for backward compatibility).
168
169 mno-explicit-relocs
170 Target RejectNegative Alias(mexplicit-relocs=,none)
171 Don't use %reloc() assembly operators (for backward compatibility).
172
173 mextern-sdata
174 Target Var(TARGET_EXTERN_SDATA) Init(1)
175 Use -G for data that is not defined by the current object.
176
177 mfix-24k
178 Target Var(TARGET_FIX_24K)
179 Work around certain 24K errata.
180
181 mfix-r4000
182 Target Mask(FIX_R4000)
183 Work around certain R4000 errata.
184
185 mfix-r4400
186 Target Mask(FIX_R4400)
187 Work around certain R4400 errata.
188
189 mfix-r5900
190 Target Mask(FIX_R5900)
191 Work around the R5900 short loop erratum.
192
193 mfix-rm7000
194 Target Var(TARGET_FIX_RM7000)
195 Work around certain RM7000 errata.
196
197 mfix-r10000
198 Target Mask(FIX_R10000)
199 Work around certain R10000 errata.
200
201 mfix-sb1
202 Target Var(TARGET_FIX_SB1)
203 Work around errata for early SB-1 revision 2 cores.
204
205 mfix-vr4120
206 Target Var(TARGET_FIX_VR4120)
207 Work around certain VR4120 errata.
208
209 mfix-vr4130
210 Target Var(TARGET_FIX_VR4130)
211 Work around VR4130 mflo/mfhi errata.
212
213 mfix4300
214 Target Var(TARGET_4300_MUL_FIX)
215 Work around an early 4300 hardware bug.
216
217 mfp-exceptions
218 Target Var(TARGET_FP_EXCEPTIONS) Init(1)
219 FP exceptions are enabled.
220
221 mfp32
222 Target RejectNegative InverseMask(FLOAT64)
223 Use 32-bit floating-point registers.
224
225 mfpxx
226 Target RejectNegative Mask(FLOATXX)
227 Conform to the o32 FPXX ABI.
228
229 mfp64
230 Target RejectNegative Mask(FLOAT64)
231 Use 64-bit floating-point registers.
232
233 mflush-func=
234 Target RejectNegative Joined Var(mips_cache_flush_func) Init(CACHE_FLUSH_FUNC)
235 -mflush-func=FUNC Use FUNC to flush the cache before calling stack trampolines.
236
237 mabs=
238 Target RejectNegative Joined Enum(mips_ieee_754_value) Var(mips_abs) Init(MIPS_IEEE_754_DEFAULT)
239 -mabs=MODE Select the IEEE 754 ABS/NEG instruction execution mode.
240
241 mnan=
242 Target RejectNegative Joined Enum(mips_ieee_754_value) Var(mips_nan) Init(MIPS_IEEE_754_DEFAULT)
243 -mnan=ENCODING Select the IEEE 754 NaN data encoding.
244
245 Enum
246 Name(mips_ieee_754_value) Type(int)
247 Known MIPS IEEE 754 settings (for use with the -mabs= and -mnan= options):
248
249 EnumValue
250 Enum(mips_ieee_754_value) String(2008) Value(MIPS_IEEE_754_2008)
251
252 EnumValue
253 Enum(mips_ieee_754_value) String(legacy) Value(MIPS_IEEE_754_LEGACY)
254
255 mgp32
256 Target RejectNegative InverseMask(64BIT)
257 Use 32-bit general registers.
258
259 mgp64
260 Target RejectNegative Mask(64BIT)
261 Use 64-bit general registers.
262
263 mgpopt
264 Target Var(TARGET_GPOPT) Init(1)
265 Use GP-relative addressing to access small data.
266
267 mplt
268 Target Var(TARGET_PLT)
269 When generating -mabicalls code, allow executables to use PLTs and copy relocations.
270
271 mhard-float
272 Target RejectNegative InverseMask(SOFT_FLOAT_ABI, HARD_FLOAT_ABI)
273 Allow the use of hardware floating-point ABI and instructions.
274
275 minterlink-compressed
276 Target Var(TARGET_INTERLINK_COMPRESSED) Init(0)
277 Generate code that is link-compatible with MIPS16 and microMIPS code.
278
279 minterlink-mips16
280 Target Var(TARGET_INTERLINK_COMPRESSED) Init(0)
281 An alias for minterlink-compressed provided for backward-compatibility.
282
283 mips
284 Target RejectNegative Joined ToLower Enum(mips_mips_opt_value) Var(mips_isa_option)
285 -mipsN Generate code for ISA level N.
286
287 mips16
288 Target RejectNegative Mask(MIPS16)
289 Generate MIPS16 code.
290
291 mips3d
292 Target RejectNegative Var(TARGET_MIPS3D)
293 Use MIPS-3D instructions.
294
295 mllsc
296 Target Mask(LLSC)
297 Use ll, sc and sync instructions.
298
299 mlocal-sdata
300 Target Var(TARGET_LOCAL_SDATA) Init(1)
301 Use -G for object-local data.
302
303 mlong-calls
304 Target Var(TARGET_LONG_CALLS)
305 Use indirect calls.
306
307 mlong32
308 Target RejectNegative InverseMask(LONG64, LONG32)
309 Use a 32-bit long type.
310
311 mlong64
312 Target RejectNegative Mask(LONG64)
313 Use a 64-bit long type.
314
315 mmcount-ra-address
316 Target Var(TARGET_MCOUNT_RA_ADDRESS)
317 Pass the address of the ra save location to _mcount in $12.
318
319 mmemcpy
320 Target Mask(MEMCPY)
321 Don't optimize block moves.
322
323 mmicromips
324 Target Mask(MICROMIPS)
325 Use microMIPS instructions.
326
327 mmsa
328 Target Mask(MSA)
329 Use MIPS MSA Extension instructions.
330
331 mmt
332 Target Var(TARGET_MT)
333 Allow the use of MT instructions.
334
335 mno-float
336 Target RejectNegative Var(TARGET_NO_FLOAT) Condition(TARGET_SUPPORTS_NO_FLOAT)
337 Prevent the use of all floating-point operations.
338
339 mmcu
340 Target Var(TARGET_MCU)
341 Use MCU instructions.
342
343 mno-flush-func
344 Target RejectNegative
345 Do not use a cache-flushing function before calling stack trampolines.
346
347 mno-mdmx
348 Target RejectNegative Var(TARGET_MDMX, 0)
349 Do not use MDMX instructions.
350
351 mno-mips16
352 Target RejectNegative InverseMask(MIPS16)
353 Generate normal-mode code.
354
355 mno-mips3d
356 Target RejectNegative Var(TARGET_MIPS3D, 0)
357 Do not use MIPS-3D instructions.
358
359 mpaired-single
360 Target Mask(PAIRED_SINGLE_FLOAT)
361 Use paired-single floating-point instructions.
362
363 mr10k-cache-barrier=
364 Target Joined RejectNegative Enum(mips_r10k_cache_barrier_setting) Var(mips_r10k_cache_barrier) Init(R10K_CACHE_BARRIER_NONE)
365 -mr10k-cache-barrier=SETTING Specify when r10k cache barriers should be inserted.
366
367 Enum
368 Name(mips_r10k_cache_barrier_setting) Type(enum mips_r10k_cache_barrier_setting)
369 Valid arguments to -mr10k-cache-barrier=:
370
371 EnumValue
372 Enum(mips_r10k_cache_barrier_setting) String(load-store) Value(R10K_CACHE_BARRIER_LOAD_STORE)
373
374 EnumValue
375 Enum(mips_r10k_cache_barrier_setting) String(store) Value(R10K_CACHE_BARRIER_STORE)
376
377 EnumValue
378 Enum(mips_r10k_cache_barrier_setting) String(none) Value(R10K_CACHE_BARRIER_NONE)
379
380 mrelax-pic-calls
381 Target Mask(RELAX_PIC_CALLS)
382 Try to allow the linker to turn PIC calls into direct calls.
383
384 mshared
385 Target Var(TARGET_SHARED) Init(1)
386 When generating -mabicalls code, make the code suitable for use in shared libraries.
387
388 msingle-float
389 Target RejectNegative Mask(SINGLE_FLOAT)
390 Restrict the use of hardware floating-point instructions to 32-bit operations.
391
392 msmartmips
393 Target Mask(SMARTMIPS)
394 Use SmartMIPS instructions.
395
396 msoft-float
397 Target RejectNegative Mask(SOFT_FLOAT_ABI)
398 Prevent the use of all hardware floating-point instructions.
399
400 msplit-addresses
401 Target Mask(SPLIT_ADDRESSES)
402 Optimize lui/addiu address loads.
403
404 mmips16e2
405 Target Var(TARGET_MIPS16E2) Init(0)
406 Enable the MIPS16e V2 instructions.
407
408 msym32
409 Target Var(TARGET_SYM32)
410 Assume all symbols have 32-bit values.
411
412 msynci
413 Target Mask(SYNCI)
414 Use synci instruction to invalidate i-cache.
415
416 mlxc1-sxc1
417 Target Var(mips_lxc1_sxc1) Init(1)
418 Use lwxc1/swxc1/ldxc1/sdxc1 instructions where applicable.
419
420 mmadd4
421 Target Var(mips_madd4) Init(1)
422 Use 4-operand madd.s/madd.d and related instructions where applicable.
423
424 mtune=
425 Target RejectNegative Joined Var(mips_tune_option) ToLower Enum(mips_arch_opt_value)
426 -mtune=PROCESSOR Optimize the output for PROCESSOR.
427
428 mstrict-align
429 Target Var(TARGET_STRICT_ALIGN) Init(0)
430 Don't generate code with unaligned load store, only valid for MIPS R6.
431
432 munaligned-access
433 Target RejectNegative Alias(mstrict-align) NegativeAlias
434 Generate code with unaligned load store for R6 (alias of -mno-strict-align).
435
436 mno-unaligned-access
437 Target RejectNegative Alias(mstrict-align)
438 Don't generate code with unaligned load store for R6 (alias of -mstrict-align).
439
440 muninit-const-in-rodata
441 Target Var(TARGET_UNINIT_CONST_IN_RODATA)
442 Put uninitialized constants in ROM (needs -membedded-data).
443
444 mvirt
445 Target Var(TARGET_VIRT)
446 Use Virtualization (VZ) instructions.
447
448 mxpa
449 Target Var(TARGET_XPA)
450 Use eXtended Physical Address (XPA) instructions.
451
452 mcrc
453 Target Var(TARGET_CRC)
454 Use Cyclic Redundancy Check (CRC) instructions.
455
456 mginv
457 Target Var(TARGET_GINV)
458 Use Global INValidate (GINV) instructions.
459
460 mvr4130-align
461 Target Mask(VR4130_ALIGN)
462 Perform VR4130-specific alignment optimizations.
463
464 mxgot
465 Target Var(TARGET_XGOT)
466 Lift restrictions on GOT size.
467
468 modd-spreg
469 Target Mask(ODD_SPREG)
470 Enable use of odd-numbered single-precision registers.
471
472 mframe-header-opt
473 Target Var(flag_frame_header_optimization) Optimization
474 Optimize frame header.
475
476 noasmopt
477 Driver
478
479 mload-store-pairs
480 Target Var(TARGET_LOAD_STORE_PAIRS) Init(1)
481 Enable load/store bonding.
482
483 mcompact-branches=
484 Target RejectNegative JoinedOrMissing Var(mips_cb) Enum(mips_cb_setting) Init(MIPS_CB_OPTIMAL)
485 Specify the compact branch usage policy.
486
487 Enum
488 Name(mips_cb_setting) Type(enum mips_cb_setting)
489 Policies available for use with -mcompact-branches=:
490
491 EnumValue
492 Enum(mips_cb_setting) String(never) Value(MIPS_CB_NEVER)
493
494 EnumValue
495 Enum(mips_cb_setting) String(optimal) Value(MIPS_CB_OPTIMAL)
496
497 EnumValue
498 Enum(mips_cb_setting) String(always) Value(MIPS_CB_ALWAYS)
499
500 mloongson-mmi
501 Target Mask(LOONGSON_MMI)
502 Use Loongson MultiMedia extensions Instructions (MMI) instructions.
503
504 mloongson-ext
505 Target Mask(LOONGSON_EXT)
506 Use Loongson EXTension (EXT) instructions.
507
508 mloongson-ext2
509 Target Var(TARGET_LOONGSON_EXT2)
510 Use Loongson EXTension R2 (EXT2) instructions.