[NDS32] Implement fp-as-gp optimization.
[official-gcc.git] / gcc / config / nds32 / nds32.opt
blob6f73f897e5d684d68ec24ddda27b72354b107b6b
1 ; Options of Andes NDS32 cpu for GNU compiler
2 ; Copyright (C) 2012-2018 Free Software Foundation, Inc.
3 ; Contributed by Andes Technology Corporation.
5 ; This file is part of GCC.
7 ; GCC is free software; you can redistribute it and/or modify it
8 ; under the terms of the GNU General Public License as published
9 ; by the Free Software Foundation; either version 3, or (at your
10 ; option) any later version.
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.
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/>.
21 HeaderInclude
22 config/nds32/nds32-opts.h
24 ; ---------------------------------------------------------------
25 ; The following options are designed for aliasing and compatibility options.
28 Target RejectNegative Alias(mbig-endian)
29 Generate code in big-endian mode.
32 Target RejectNegative Alias(mlittle-endian)
33 Generate code in little-endian mode.
35 mfp-as-gp
36 Target RejectNegative Alias(mforce-fp-as-gp)
37 Force performing fp-as-gp optimization.
39 mno-fp-as-gp
40 Target RejectNegative Alias(mforbid-fp-as-gp)
41 Forbid performing fp-as-gp optimization.
43 ; ---------------------------------------------------------------
45 mabi=
46 Target RejectNegative Joined Enum(abi_type) Var(nds32_abi) Init(TARGET_DEFAULT_ABI)
47 Specify which ABI type to generate code for: 2, 2fp+.
49 Enum
50 Name(abi_type) Type(enum abi_type)
51 Known ABIs (for use with the -mabi= option):
53 EnumValue
54 Enum(abi_type) String(2) Value(NDS32_ABI_V2)
56 EnumValue
57 Enum(abi_type) String(2fp+) Value(NDS32_ABI_V2_FP_PLUS)
59 mfloat-abi=soft
60 Target RejectNegative Alias(mabi=, 2)
61 Specify use soft floating point ABI which mean alias to -mabi=2.
63 mfloat-abi=hard
64 Target RejectNegative Alias(mabi=, 2fp+)
65 Specify use soft floating point ABI which mean alias to -mabi=2fp+.
67 ; ---------------------------------------------------------------
69 mreduced-regs
70 Target Report RejectNegative Negative(mfull-regs) Mask(REDUCED_REGS)
71 Use reduced-set registers for register allocation.
73 mfull-regs
74 Target Report RejectNegative Negative(mreduced-regs) InverseMask(REDUCED_REGS)
75 Use full-set registers for register allocation.
77 ; ---------------------------------------------------------------
79 malways-align
80 Target Mask(ALWAYS_ALIGN)
81 Always align function entry, jump target and return address.
83 malign-functions
84 Target Mask(ALIGN_FUNCTION)
85 Align function entry to 4 byte.
87 mbig-endian
88 Target Undocumented RejectNegative Negative(mlittle-endian) Mask(BIG_ENDIAN)
89 Generate code in big-endian mode.
91 mlittle-endian
92 Target Undocumented RejectNegative Negative(mbig-endian) InverseMask(BIG_ENDIAN)
93 Generate code in little-endian mode.
95 mforce-fp-as-gp
96 Target Undocumented Mask(FORCE_FP_AS_GP)
97 Prevent $fp being allocated during register allocation so that compiler is able to force performing fp-as-gp optimization.
99 mforbid-fp-as-gp
100 Target Undocumented Mask(FORBID_FP_AS_GP)
101 Forbid using $fp to access static and global variables.  This option strictly forbids fp-as-gp optimization regardless of '-mforce-fp-as-gp'.
103 mict-model=
104 Target Undocumented RejectNegative Joined Enum(nds32_ict_model_type) Var(nds32_ict_model) Init(ICT_MODEL_SMALL)
105 Specify the address generation strategy for ICT call's code model.
107 Enum
108 Name(nds32_ict_model_type) Type(enum nds32_ict_model_type)
109 Known cmodel types (for use with the -mict-model= option):
111 EnumValue
112 Enum(nds32_ict_model_type) String(small) Value(ICT_MODEL_SMALL)
114 EnumValue
115 Enum(nds32_ict_model_type) String(large) Value(ICT_MODEL_LARGE)
117 mcmov
118 Target Report Mask(CMOV)
119 Generate conditional move instructions.
121 mhw-abs
122 Target Report Mask(HW_ABS)
123 Generate hardware abs instructions.
125 mext-perf
126 Target Report Mask(EXT_PERF)
127 Generate performance extension instructions.
129 mext-perf2
130 Target Report Mask(EXT_PERF2)
131 Generate performance extension version 2 instructions.
133 mext-string
134 Target Report Mask(EXT_STRING)
135 Generate string extension instructions.
137 mext-dsp
138 Target Report Mask(EXT_DSP)
139 Generate DSP extension instructions.
141 mv3push
142 Target Report Mask(V3PUSH)
143 Generate v3 push25/pop25 instructions.
145 m16-bit
146 Target Report Mask(16_BIT)
147 Generate 16-bit instructions.
149 mrelax-hint
150 Target Report Mask(RELAX_HINT)
151 Insert relax hint for linker to do relaxation.
154 Target Report Mask(VH)
155 Enable Virtual Hosting support.
157 misr-vector-size=
158 Target RejectNegative Joined UInteger Var(nds32_isr_vector_size) Init(NDS32_DEFAULT_ISR_VECTOR_SIZE)
159 Specify the size of each interrupt vector, which must be 4 or 16.
161 mcache-block-size=
162 Target RejectNegative Joined UInteger Var(nds32_cache_block_size) Init(NDS32_DEFAULT_CACHE_BLOCK_SIZE)
163 Specify the size of each cache block, which must be a power of 2 between 4 and 512.
165 march=
166 Target RejectNegative Joined Enum(nds32_arch_type) Var(nds32_arch_option) Init(ARCH_V3)
167 Specify the name of the target architecture.
169 Enum
170 Name(nds32_arch_type) Type(enum nds32_arch_type)
171 Known arch types (for use with the -march= option):
173 EnumValue
174 Enum(nds32_arch_type) String(v2) Value(ARCH_V2)
176 EnumValue
177 Enum(nds32_arch_type) String(v3) Value(ARCH_V3)
179 EnumValue
180 Enum(nds32_arch_type) String(v3m) Value(ARCH_V3M)
182 EnumValue
183 Enum(nds32_arch_type) String(v3f) Value(ARCH_V3F)
185 EnumValue
186 Enum(nds32_arch_type) String(v3s) Value(ARCH_V3S)
188 mcmodel=
189 Target RejectNegative Joined Enum(nds32_cmodel_type) Var(nds32_cmodel_option) Init(CMODEL_LARGE)
190 Specify the address generation strategy for code model.
192 Enum
193 Name(nds32_cmodel_type) Type(enum nds32_cmodel_type)
194 Known cmodel types (for use with the -mcmodel= option):
196 EnumValue
197 Enum(nds32_cmodel_type) String(small) Value(CMODEL_SMALL)
199 EnumValue
200 Enum(nds32_cmodel_type) String(medium) Value(CMODEL_MEDIUM)
202 EnumValue
203 Enum(nds32_cmodel_type) String(large) Value(CMODEL_LARGE)
205 mcpu=
206 Target RejectNegative Joined Enum(nds32_cpu_type) Var(nds32_cpu_option) Init(CPU_N9)
207 Specify the cpu for pipeline model.
209 Enum
210 Name(nds32_cpu_type) Type(enum nds32_cpu_type)
211 Known cpu types (for use with the -mcpu= option):
213 EnumValue
214 Enum(nds32_cpu_type) String(n6) Value(CPU_N6)
216 EnumValue
217 Enum(nds32_cpu_type) String(n650) Value(CPU_N6)
219 EnumValue
220 Enum(nds32_cpu_type) String(n7) Value(CPU_N7)
222 EnumValue
223 Enum(nds32_cpu_type) String(n705) Value(CPU_N7)
225 EnumValue
226 Enum(nds32_cpu_type) String(n8) Value(CPU_N8)
228 EnumValue
229 Enum(nds32_cpu_type) String(n801) Value(CPU_N8)
231 EnumValue
232 Enum(nds32_cpu_type) String(sn8) Value(CPU_N8)
234 EnumValue
235 Enum(nds32_cpu_type) String(sn801) Value(CPU_N8)
237 EnumValue
238 Enum(nds32_cpu_type) String(s8) Value(CPU_N8)
240 EnumValue
241 Enum(nds32_cpu_type) String(s801) Value(CPU_N8)
243 EnumValue
244 Enum(nds32_cpu_type) String(e8) Value(CPU_E8)
246 EnumValue
247 Enum(nds32_cpu_type) String(e801) Value(CPU_E8)
249 EnumValue
250 Enum(nds32_cpu_type) String(n820) Value(CPU_E8)
252 EnumValue
253 Enum(nds32_cpu_type) String(s830) Value(CPU_E8)
255 EnumValue
256 Enum(nds32_cpu_type) String(e830) Value(CPU_E8)
258 EnumValue
259 Enum(nds32_cpu_type) String(n9) Value(CPU_N9)
261 EnumValue
262 Enum(nds32_cpu_type) String(n903) Value(CPU_N9)
264 EnumValue
265 Enum(nds32_cpu_type) String(n903a) Value(CPU_N9)
267 EnumValue
268 Enum(nds32_cpu_type) String(n968) Value(CPU_N9)
270 EnumValue
271 Enum(nds32_cpu_type) String(n968a) Value(CPU_N9)
273 EnumValue
274 Enum(nds32_cpu_type) String(n10) Value(CPU_N10)
276 EnumValue
277 Enum(nds32_cpu_type) String(n1033) Value(CPU_N10)
279 EnumValue
280 Enum(nds32_cpu_type) String(n1033a) Value(CPU_N10)
282 EnumValue
283 Enum(nds32_cpu_type) String(n1033-fpu) Value(CPU_N10)
285 EnumValue
286 Enum(nds32_cpu_type) String(n1033-spu) Value(CPU_N10)
288 EnumValue
289 Enum(nds32_cpu_type) String(n1068) Value(CPU_N10)
291 EnumValue
292 Enum(nds32_cpu_type) String(n1068a) Value(CPU_N10)
294 EnumValue
295 Enum(nds32_cpu_type) String(n1068-fpu) Value(CPU_N10)
297 EnumValue
298 Enum(nds32_cpu_type) String(n1068a-fpu) Value(CPU_N10)
300 EnumValue
301 Enum(nds32_cpu_type) String(n1068-spu) Value(CPU_N10)
303 EnumValue
304 Enum(nds32_cpu_type) String(n1068a-spu) Value(CPU_N10)
306 EnumValue
307 Enum(nds32_cpu_type) String(d10) Value(CPU_N10)
309 EnumValue
310 Enum(nds32_cpu_type) String(d1088) Value(CPU_N10)
312 EnumValue
313 Enum(nds32_cpu_type) String(d1088-fpu) Value(CPU_N10)
315 EnumValue
316 Enum(nds32_cpu_type) String(d1088-spu) Value(CPU_N10)
318 EnumValue
319 Enum(nds32_cpu_type) Undocumented String(graywolf) Value(CPU_GRAYWOLF)
321 EnumValue
322 Enum(nds32_cpu_type) String(n15) Value(CPU_GRAYWOLF)
324 EnumValue
325 Enum(nds32_cpu_type) String(d15) Value(CPU_GRAYWOLF)
327 EnumValue
328 Enum(nds32_cpu_type) String(n15s) Value(CPU_GRAYWOLF)
330 EnumValue
331 Enum(nds32_cpu_type) String(d15s) Value(CPU_GRAYWOLF)
333 EnumValue
334 Enum(nds32_cpu_type) String(n15f) Value(CPU_GRAYWOLF)
336 EnumValue
337 Enum(nds32_cpu_type) String(d15f) Value(CPU_GRAYWOLF)
339 EnumValue
340 Enum(nds32_cpu_type) String(n12) Value(CPU_N12)
342 EnumValue
343 Enum(nds32_cpu_type) String(n1213) Value(CPU_N12)
345 EnumValue
346 Enum(nds32_cpu_type) String(n1233) Value(CPU_N12)
348 EnumValue
349 Enum(nds32_cpu_type) String(n1233-fpu) Value(CPU_N12)
351 EnumValue
352 Enum(nds32_cpu_type) String(n1233-spu) Value(CPU_N12)
354 EnumValue
355 Enum(nds32_cpu_type) String(n13) Value(CPU_N13)
357 EnumValue
358 Enum(nds32_cpu_type) String(n1337) Value(CPU_N13)
360 EnumValue
361 Enum(nds32_cpu_type) String(n1337-fpu) Value(CPU_N13)
363 EnumValue
364 Enum(nds32_cpu_type) String(n1337-spu) Value(CPU_N13)
366 EnumValue
367 Enum(nds32_cpu_type) String(simple) Value(CPU_SIMPLE)
369 mconfig-fpu=
370 Target RejectNegative Joined Enum(float_reg_number) Var(nds32_fp_regnum) Init(TARGET_CONFIG_FPU_DEFAULT)
371 Specify a fpu configuration value from 0 to 7; 0-3 is as FPU spec says, and 4-7 is corresponding to 0-3.
373 Enum
374 Name(float_reg_number) Type(enum float_reg_number)
375 Known floating-point number of registers (for use with the -mconfig-fpu= option):
377 EnumValue
378 Enum(float_reg_number) String(0) Value(NDS32_CONFIG_FPU_0)
380 EnumValue
381 Enum(float_reg_number) String(1) Value(NDS32_CONFIG_FPU_1)
383 EnumValue
384 Enum(float_reg_number) String(2) Value(NDS32_CONFIG_FPU_2)
386 EnumValue
387 Enum(float_reg_number) String(3) Value(NDS32_CONFIG_FPU_3)
389 EnumValue
390 Enum(float_reg_number) String(4) Value(NDS32_CONFIG_FPU_4)
392 EnumValue
393 Enum(float_reg_number) String(5) Value(NDS32_CONFIG_FPU_5)
395 EnumValue
396 Enum(float_reg_number) String(6) Value(NDS32_CONFIG_FPU_6)
398 EnumValue
399 Enum(float_reg_number) String(7) Value(NDS32_CONFIG_FPU_7)
401 mconfig-mul=
402 Target RejectNegative Joined Enum(nds32_mul_type) Var(nds32_mul_config) Init(MUL_TYPE_FAST_1)
403 Specify configuration of instruction mul: fast1, fast2 or slow. The default is fast1.
405 Enum
406 Name(nds32_mul_type) Type(enum nds32_mul_type)
408 EnumValue
409 Enum(nds32_mul_type) String(fast) Value(MUL_TYPE_FAST_1)
411 EnumValue
412 Enum(nds32_mul_type) String(fast1) Value(MUL_TYPE_FAST_1)
414 EnumValue
415 Enum(nds32_mul_type) String(fast2) Value(MUL_TYPE_FAST_2)
417 EnumValue
418 Enum(nds32_mul_type) String(slow) Value(MUL_TYPE_SLOW)
420 mconfig-register-ports=
421 Target RejectNegative Joined Enum(nds32_register_ports) Var(nds32_register_ports_config) Init(REG_PORT_3R2W)
422 Specify how many read/write ports for n9/n10 cores.  The value should be 3r2w or 2r1w.
424 Enum
425 Name(nds32_register_ports) Type(enum nds32_register_ports)
427 EnumValue
428 Enum(nds32_register_ports) String(3r2w) Value(REG_PORT_3R2W)
430 EnumValue
431 Enum(nds32_register_ports) String(2r1w) Value(REG_PORT_2R1W)
433 mctor-dtor
434 Target Report
435 Enable constructor/destructor feature.
437 mrelax
438 Target Report
439 Guide linker to relax instructions.
441 mext-fpu-fma
442 Target Report Mask(EXT_FPU_FMA)
443 Generate floating-point multiply-accumulation instructions.
445 mext-fpu-sp
446 Target Report Mask(FPU_SINGLE)
447 Generate single-precision floating-point instructions.
449 mext-fpu-dp
450 Target Report Mask(FPU_DOUBLE)
451 Generate double-precision floating-point instructions.
453 mforce-no-ext-dsp
454 Target Undocumented Report Mask(FORCE_NO_EXT_DSP)
455 Force disable hardware loop, even use -mext-dsp.
457 mret-in-naked-func
458 Target Var(flag_ret_in_naked_func) Init(1)
459 Generate return instruction in naked function.
461 malways-save-lp
462 Target Var(flag_always_save_lp) Init(0)
463 Always save $lp in the stack.
465 munaligned-access
466 Target Report Var(flag_unaligned_access) Init(0)
467 Enable unaligned word and halfword accesses to packed data.
469 minline-asm-r15
470 Target Report Var(flag_inline_asm_r15) Init(0)
471 Allow use r15 for inline ASM.