1 ; Options for the MIPS port of the compiler
3 ; Copyright (C) 2005, 2007, 2008, 2010, 2011, 2012
4 ; Free Software Foundation, Inc.
6 ; This file is part of GCC.
8 ; GCC is free software; you can redistribute it and/or modify it under
9 ; the terms of the GNU General Public License as published by the Free
10 ; Software Foundation; either version 3, or (at your option) any later
13 ; GCC is distributed in the hope that it will be useful, but WITHOUT
14 ; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 ; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
16 ; License for more details.
18 ; You should have received a copy of the GNU General Public License
19 ; along with GCC; see the file COPYING3. If not see
20 ; <http://www.gnu.org/licenses/>.
23 config/mips/mips-opts.h
32 Target RejectNegative Joined Enum(mips_abi) Var(mips_abi) Init(MIPS_ABI_DEFAULT)
33 -mabi=ABI Generate code that conforms to the given ABI
36 Name(mips_abi) Type(int)
37 Known MIPS ABIs (for use with the -mabi= option):
40 Enum(mips_abi) String(32) Value(ABI_32)
43 Enum(mips_abi) String(o64) Value(ABI_O64)
46 Enum(mips_abi) String(n32) Value(ABI_N32)
49 Enum(mips_abi) String(64) Value(ABI_64)
52 Enum(mips_abi) String(eabi) Value(ABI_EABI)
55 Target Report Mask(ABICALLS)
56 Generate code that can be used in SVR4-style dynamic objects
59 Target Report Var(TARGET_MAD)
60 Use PMC-style 'mad' instructions
63 Target RejectNegative Joined Var(mips_arch_option) ToLower Enum(mips_arch_opt_value)
64 -march=ISA Generate code for the given ISA
67 Target RejectNegative Joined UInteger Var(mips_branch_cost)
68 -mbranch-cost=COST Set the cost of branches to roughly COST instructions
71 Target Report Mask(BRANCHLIKELY)
72 Use Branch Likely instructions, overriding the architecture default
75 Target Report Var(TARGET_FLIP_MIPS16)
76 Switch on/off MIPS16 ASE on alternating functions for compiler testing
79 Target Report Mask(CHECK_ZERO_DIV)
80 Trap on integer divide by zero
83 Target RejectNegative Joined Enum(mips_code_readable_setting) Var(mips_code_readable) Init(CODE_READABLE_YES)
84 -mcode-readable=SETTING Specify when instructions are allowed to access code
87 Name(mips_code_readable_setting) Type(enum mips_code_readable_setting)
88 Valid arguments to -mcode-readable=:
91 Enum(mips_code_readable_setting) String(yes) Value(CODE_READABLE_YES)
94 Enum(mips_code_readable_setting) String(pcrel) Value(CODE_READABLE_PCREL)
97 Enum(mips_code_readable_setting) String(no) Value(CODE_READABLE_NO)
100 Target Report RejectNegative Mask(DIVIDE_BREAKS)
101 Use branch-and-break sequences to check for integer divide by zero
104 Target Report RejectNegative InverseMask(DIVIDE_BREAKS, DIVIDE_TRAPS)
105 Use trap instructions to check for integer divide by zero
108 Target Report RejectNegative Var(TARGET_MDMX)
109 Allow the use of MDMX instructions
112 Target Report RejectNegative InverseMask(SINGLE_FLOAT, DOUBLE_FLOAT)
113 Allow hardware floating-point instructions to cover both 32-bit and 64-bit operations
116 Target Report Mask(DSP)
117 Use MIPS-DSP instructions
120 Target Report Mask(DSPR2)
121 Use MIPS-DSP REV 2 instructions
124 Target Var(TARGET_DEBUG_MODE) Undocumented
127 Target Var(TARGET_DEBUG_D_MODE) Undocumented
130 Target Report RejectNegative Mask(BIG_ENDIAN)
131 Use big-endian byte order
134 Target Report RejectNegative InverseMask(BIG_ENDIAN, LITTLE_ENDIAN)
135 Use little-endian byte order
138 Target Report Var(TARGET_EMBEDDED_DATA)
139 Use ROM instead of RAM
142 Target Report Mask(EXPLICIT_RELOCS)
143 Use NewABI-style %reloc() assembly operators
146 Target Report Var(TARGET_EXTERN_SDATA) Init(1)
147 Use -G for data that is not defined by the current object
150 Target Report Var(TARGET_FIX_24K)
151 Work around certain 24K errata
154 Target Report Mask(FIX_R4000)
155 Work around certain R4000 errata
158 Target Report Mask(FIX_R4400)
159 Work around certain R4400 errata
162 Target Report Mask(FIX_R10000)
163 Work around certain R10000 errata
166 Target Report Var(TARGET_FIX_SB1)
167 Work around errata for early SB-1 revision 2 cores
170 Target Report Var(TARGET_FIX_VR4120)
171 Work around certain VR4120 errata
174 Target Report Var(TARGET_FIX_VR4130)
175 Work around VR4130 mflo/mfhi errata
178 Target Report Var(TARGET_4300_MUL_FIX)
179 Work around an early 4300 hardware bug
182 Target Report Mask(FP_EXCEPTIONS)
183 FP exceptions are enabled
186 Target Report RejectNegative InverseMask(FLOAT64)
187 Use 32-bit floating-point registers
190 Target Report RejectNegative Mask(FLOAT64)
191 Use 64-bit floating-point registers
194 Target RejectNegative Joined Var(mips_cache_flush_func) Init(CACHE_FLUSH_FUNC)
195 -mflush-func=FUNC Use FUNC to flush the cache before calling stack trampolines
198 Target Report Mask(FUSED_MADD)
199 Generate floating-point multiply-add instructions
202 Target Report RejectNegative InverseMask(64BIT)
203 Use 32-bit general registers
206 Target Report RejectNegative Mask(64BIT)
207 Use 64-bit general registers
210 Target Report Var(TARGET_GPOPT) Init(1)
211 Use GP-relative addressing to access small data
214 Target Report Var(TARGET_PLT)
215 When generating -mabicalls code, allow executables to use PLTs and copy relocations
218 Target Report RejectNegative InverseMask(SOFT_FLOAT_ABI, HARD_FLOAT_ABI)
219 Allow the use of hardware floating-point ABI and instructions
222 Target Report Var(TARGET_INTERLINK_MIPS16) Init(0)
223 Generate code that can be safely linked with MIPS16 code.
226 Target RejectNegative Joined ToLower Enum(mips_mips_opt_value) Var(mips_isa_option)
227 -mipsN Generate code for ISA level N
230 Target Report RejectNegative Mask(MIPS16)
234 Target Report RejectNegative Mask(MIPS3D)
235 Use MIPS-3D instructions
238 Target Report Mask(LLSC)
239 Use ll, sc and sync instructions
242 Target Report Var(TARGET_LOCAL_SDATA) Init(1)
243 Use -G for object-local data
246 Target Report Var(TARGET_LONG_CALLS)
250 Target Report RejectNegative InverseMask(LONG64, LONG32)
251 Use a 32-bit long type
254 Target Report RejectNegative Mask(LONG64)
255 Use a 64-bit long type
258 Target Report Var(TARGET_MCOUNT_RA_ADDRESS)
259 Pass the address of the ra save location to _mcount in $12
262 Target Report Mask(MEMCPY)
263 Don't optimize block moves
266 Target Report Var(TARGET_MT)
267 Allow the use of MT instructions
270 Target Report RejectNegative Var(TARGET_NO_FLOAT) Condition(TARGET_SUPPORTS_NO_FLOAT)
271 Prevent the use of all floating-point operations
274 Target Report Var(TARGET_MCU)
278 Target RejectNegative
279 Do not use a cache-flushing function before calling stack trampolines
282 Target Report RejectNegative Var(TARGET_MDMX, 0)
283 Do not use MDMX instructions
286 Target Report RejectNegative InverseMask(MIPS16)
287 Generate normal-mode code
290 Target Report RejectNegative InverseMask(MIPS3D)
291 Do not use MIPS-3D instructions
294 Target Report Mask(PAIRED_SINGLE_FLOAT)
295 Use paired-single floating-point instructions
298 Target Joined RejectNegative Enum(mips_r10k_cache_barrier_setting) Var(mips_r10k_cache_barrier) Init(R10K_CACHE_BARRIER_NONE)
299 -mr10k-cache-barrier=SETTING Specify when r10k cache barriers should be inserted
302 Name(mips_r10k_cache_barrier_setting) Type(enum mips_r10k_cache_barrier_setting)
303 Valid arguments to -mr10k-cache-barrier=:
306 Enum(mips_r10k_cache_barrier_setting) String(load-store) Value(R10K_CACHE_BARRIER_LOAD_STORE)
309 Enum(mips_r10k_cache_barrier_setting) String(store) Value(R10K_CACHE_BARRIER_STORE)
312 Enum(mips_r10k_cache_barrier_setting) String(none) Value(R10K_CACHE_BARRIER_NONE)
315 Target Report Mask(RELAX_PIC_CALLS)
316 Try to allow the linker to turn PIC calls into direct calls
319 Target Report Var(TARGET_SHARED) Init(1)
320 When generating -mabicalls code, make the code suitable for use in shared libraries
323 Target Report RejectNegative Mask(SINGLE_FLOAT)
324 Restrict the use of hardware floating-point instructions to 32-bit operations
327 Target Report Mask(SMARTMIPS)
328 Use SmartMIPS instructions
331 Target Report RejectNegative Mask(SOFT_FLOAT_ABI)
332 Prevent the use of all hardware floating-point instructions
335 Target Report Mask(SPLIT_ADDRESSES)
336 Optimize lui/addiu address loads
339 Target Report Var(TARGET_SYM32)
340 Assume all symbols have 32-bit values
343 Target Report Mask(SYNCI)
344 Use synci instruction to invalidate i-cache
347 Target RejectNegative Joined Var(mips_tune_option) ToLower Enum(mips_arch_opt_value)
348 -mtune=PROCESSOR Optimize the output for PROCESSOR
350 muninit-const-in-rodata
351 Target Report Var(TARGET_UNINIT_CONST_IN_RODATA)
352 Put uninitialized constants in ROM (needs -membedded-data)
355 Target Report Mask(VR4130_ALIGN)
356 Perform VR4130-specific alignment optimizations
359 Target Report Var(TARGET_XGOT)
360 Lift restrictions on GOT size