1 ; Options for the IA-32 and AMD64 ports of the compiler.
3 ; Copyright (C) 2005-2013 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/>.
22 config/i386/i386-opts.h
24 ; Bit flags that specify the ISA we are compiling for.
26 HOST_WIDE_INT ix86_isa_flags = TARGET_64BIT_DEFAULT | TARGET_SUBTARGET_ISA_DEFAULT
28 ; A mask of ix86_isa_flags that includes bit X if X was set or cleared
29 ; on the command line.
31 HOST_WIDE_INT ix86_isa_flags_explicit
34 int recip_mask = RECIP_MASK_DEFAULT
37 int recip_mask_explicit
40 int x_recip_mask_explicit
42 ;; Definitions to add to the cl_target_option structure
53 unsigned char schedule
57 unsigned char branch_cost
59 ;; which flags were passed by the user
61 HOST_WIDE_INT x_ix86_isa_flags_explicit
63 ;; which flags were passed by the user
65 int ix86_target_flags_explicit
67 ;; which flags were passed by the user
69 HOST_WIDE_INT x_ix86_target_flags_explicit
71 ;; whether -mtune was not specified
73 unsigned char tune_defaulted
75 ;; whether -march was specified
77 unsigned char arch_specified
81 Target RejectNegative Report Mask(128BIT_LONG_DOUBLE) Save
82 sizeof(long double) is 16
85 Target Report Mask(80387) Save
89 Target RejectNegative Report InverseMask(128BIT_LONG_DOUBLE) Save
90 sizeof(long double) is 12
93 Target Report RejectNegative InverseMask(LONG_DOUBLE_64) Save
94 Use 80-bit long double
97 Target Report RejectNegative Mask(LONG_DOUBLE_64) Save
98 Use 64-bit long double
100 maccumulate-outgoing-args
101 Target Report Mask(ACCUMULATE_OUTGOING_ARGS) Save
102 Reserve space for outgoing arguments in the function prologue
105 Target Report Mask(ALIGN_DOUBLE) Save
106 Align some doubles on dword boundary
109 Target RejectNegative Joined UInteger
110 Function starts are aligned to this power of 2
113 Target RejectNegative Joined UInteger
114 Jump targets are aligned to this power of 2
117 Target RejectNegative Joined UInteger
118 Loop code aligned to this power of 2
121 Target RejectNegative Report InverseMask(NO_ALIGN_STRINGOPS, ALIGN_STRINGOPS) Save
122 Align destination of the string operations
125 Target RejectNegative Joined Var(ix86_arch_string)
126 Generate code for given CPU
129 Target RejectNegative Joined Enum(asm_dialect) Var(ix86_asm_dialect) Init(ASM_ATT)
130 Use given assembler dialect
133 Name(asm_dialect) Type(enum asm_dialect)
134 Known assembler dialects (for use with the -masm-dialect= option):
137 Enum(asm_dialect) String(intel) Value(ASM_INTEL)
140 Enum(asm_dialect) String(att) Value(ASM_ATT)
143 Target RejectNegative Joined UInteger Var(ix86_branch_cost)
144 Branches are this expensive (1-5, arbitrary units)
146 mlarge-data-threshold=
147 Target RejectNegative Joined UInteger Var(ix86_section_threshold) Init(DEFAULT_LARGE_SECTION_THRESHOLD)
148 Data greater than given threshold will go into .ldata section in x86-64 medium model
151 Target RejectNegative Joined Enum(cmodel) Var(ix86_cmodel) Init(CM_32)
152 Use given x86-64 code model
155 Name(cmodel) Type(enum cmodel)
156 Known code models (for use with the -mcmodel= option):
159 Enum(cmodel) String(small) Value(CM_SMALL)
162 Enum(cmodel) String(medium) Value(CM_MEDIUM)
165 Enum(cmodel) String(large) Value(CM_LARGE)
168 Enum(cmodel) String(32) Value(CM_32)
171 Enum(cmodel) String(kernel) Value(CM_KERNEL)
174 Target RejectNegative Joined Enum(pmode) Var(ix86_pmode) Init(PMODE_SI)
175 Use given address mode
178 Name(pmode) Type(enum pmode)
179 Known address mode (for use with the -maddress-mode= option):
182 Enum(pmode) String(short) Value(PMODE_SI)
185 Enum(pmode) String(long) Value(PMODE_DI)
188 Target RejectNegative Joined Undocumented Alias(mtune=) Warn(%<-mcpu=%> is deprecated; use %<-mtune=%> or %<-march=%> instead)
191 Target RejectNegative Report InverseMask(NO_FANCY_MATH_387, USE_FANCY_MATH_387) Save
192 Generate sin, cos, sqrt for FPU
195 Target Report Var(ix86_force_drap)
196 Always use Dynamic Realigned Argument Pointer (DRAP) to realign stack
199 Target Report Mask(FLOAT_RETURNS) Save
200 Return values of functions in FPU registers
203 Target RejectNegative Joined Var(ix86_fpmath) Enum(fpmath_unit) Init(FPMATH_387) Save
204 Generate floating point mathematics using given instruction set
207 Name(fpmath_unit) Type(enum fpmath_unit)
208 Valid arguments to -mfpmath=:
211 Enum(fpmath_unit) String(387) Value(FPMATH_387)
214 Enum(fpmath_unit) String(sse) Value(FPMATH_SSE)
217 Enum(fpmath_unit) String(387,sse) Value({(enum fpmath_unit) (FPMATH_SSE | FPMATH_387)})
220 Enum(fpmath_unit) String(387+sse) Value({(enum fpmath_unit) (FPMATH_SSE | FPMATH_387)})
223 Enum(fpmath_unit) String(sse,387) Value({(enum fpmath_unit) (FPMATH_SSE | FPMATH_387)})
226 Enum(fpmath_unit) String(sse+387) Value({(enum fpmath_unit) (FPMATH_SSE | FPMATH_387)})
229 Enum(fpmath_unit) String(both) Value({(enum fpmath_unit) (FPMATH_SSE | FPMATH_387)})
232 Target RejectNegative Mask(80387) Save
236 Target Report Mask(IEEE_FP) Save
237 Use IEEE math for fp comparisons
239 minline-all-stringops
240 Target Report Mask(INLINE_ALL_STRINGOPS) Save
241 Inline all known string operations
243 minline-stringops-dynamically
244 Target Report Mask(INLINE_STRINGOPS_DYNAMICALLY) Save
245 Inline memset/memcpy string operations, but perform inline version only for small blocks
248 Target Undocumented Alias(masm=, intel, att) Warn(%<-mintel-syntax%> and %<-mno-intel-syntax%> are deprecated; use %<-masm=intel%> and %<-masm=att%> instead)
252 Target Report Mask(MS_BITFIELD_LAYOUT) Save
253 Use native (MS) bitfield layout
256 Target RejectNegative Report Mask(NO_ALIGN_STRINGOPS) Undocumented Save
259 Target RejectNegative Report Mask(NO_FANCY_MATH_387) Undocumented Save
262 Target RejectNegative Report Mask(NO_PUSH_ARGS) Undocumented Save
265 Target RejectNegative Report Mask(NO_RED_ZONE) Undocumented Save
267 momit-leaf-frame-pointer
268 Target Report Mask(OMIT_LEAF_FRAME_POINTER) Save
269 Omit the frame pointer in leaf functions
272 Target RejectNegative Report
273 Set 80387 floating-point precision to 32-bit
276 Target RejectNegative Report
277 Set 80387 floating-point precision to 64-bit
280 Target RejectNegative Report
281 Set 80387 floating-point precision to 80-bit
283 mpreferred-stack-boundary=
284 Target RejectNegative Joined UInteger Var(ix86_preferred_stack_boundary_arg)
285 Attempt to keep stack aligned to this power of 2
287 mincoming-stack-boundary=
288 Target RejectNegative Joined UInteger Var(ix86_incoming_stack_boundary_arg)
289 Assume incoming stack aligned to this power of 2
292 Target Report InverseMask(NO_PUSH_ARGS, PUSH_ARGS) Save
293 Use push instructions to save outgoing arguments
296 Target RejectNegative Report InverseMask(NO_RED_ZONE, RED_ZONE) Save
297 Use red-zone in the x86-64 code
300 Target RejectNegative Joined UInteger Var(ix86_regparm)
301 Number of registers used to pass integer arguments
304 Target Report Mask(RTD) Save
305 Alternate calling convention
308 Target InverseMask(80387) Save
309 Do not use hardware fp
312 Target RejectNegative Mask(SSEREGPARM) Save
313 Use SSE register passing conventions for SF and DF mode
316 Target Report Var(ix86_force_align_arg_pointer) Init(-1)
317 Realign stack in prologue
320 Target Report Mask(STACK_PROBE) Save
324 Target RejectNegative Joined Var(ix86_tune_memcpy_strategy)
325 Specify memcpy expansion strategy when expected size is known
328 Target RejectNegative Joined Var(ix86_tune_memset_strategy)
329 Specify memset expansion strategy when expected size is known
332 Target RejectNegative Joined Enum(stringop_alg) Var(ix86_stringop_alg) Init(no_stringop)
333 Chose strategy to generate stringop using
336 Name(stringop_alg) Type(enum stringop_alg)
337 Valid arguments to -mstringop-strategy=:
340 Enum(stringop_alg) String(rep_byte) Value(rep_prefix_1_byte)
343 Enum(stringop_alg) String(libcall) Value(libcall)
346 Enum(stringop_alg) String(rep_4byte) Value(rep_prefix_4_byte)
349 Enum(stringop_alg) String(rep_8byte) Value(rep_prefix_8_byte)
352 Enum(stringop_alg) String(byte_loop) Value(loop_1_byte)
355 Enum(stringop_alg) String(loop) Value(loop)
358 Enum(stringop_alg) String(unrolled_loop) Value(unrolled_loop)
361 Enum(stringop_alg) String(vector_loop) Value(vector_loop)
364 Target RejectNegative Joined Var(ix86_tls_dialect) Enum(tls_dialect) Init(TLS_DIALECT_GNU)
365 Use given thread-local storage dialect
368 Name(tls_dialect) Type(enum tls_dialect)
369 Known TLS dialects (for use with the -mtls-dialect= option):
372 Enum(tls_dialect) String(gnu) Value(TLS_DIALECT_GNU)
375 Enum(tls_dialect) String(gnu2) Value(TLS_DIALECT_GNU2)
378 Target Report Mask(TLS_DIRECT_SEG_REFS)
379 Use direct references against %gs when accessing tls data
382 Target RejectNegative Joined Var(ix86_tune_string)
383 Schedule code for given CPU
386 Target RejectNegative Joined Var(ix86_tune_ctrl_string)
387 Fine grain control of tune features
390 Target RejectNegative Var(ix86_tune_no_default) Init(0)
391 Clear all tune features
394 Target RejectNegative Var(ix86_dump_tunes) Init(0)
397 Target RejectNegative Joined Var(ix86_abi) Enum(calling_abi) Init(SYSV_ABI)
398 Generate code that conforms to the given ABI
401 Name(calling_abi) Type(enum calling_abi)
402 Known ABIs (for use with the -mabi= option):
405 Enum(calling_abi) String(sysv) Value(SYSV_ABI)
408 Enum(calling_abi) String(ms) Value(MS_ABI)
411 Target RejectNegative Joined Var(ix86_veclibabi_type) Enum(ix86_veclibabi) Init(ix86_veclibabi_type_none)
412 Vector library ABI to use
415 Name(ix86_veclibabi) Type(enum ix86_veclibabi)
416 Known vectorization library ABIs (for use with the -mveclibabi= option):
419 Enum(ix86_veclibabi) String(svml) Value(ix86_veclibabi_type_svml)
422 Enum(ix86_veclibabi) String(acml) Value(ix86_veclibabi_type_acml)
425 Target Report Mask(VECT8_RETURNS) Save
426 Return 8-byte vectors in memory
429 Target Report Mask(RECIP) Save
430 Generate reciprocals instead of divss and sqrtss.
433 Target Report RejectNegative Joined Var(ix86_recip_name)
434 Control generation of reciprocal estimates.
437 Target Report Mask(CLD) Save
438 Generate cld instruction in the function prologue.
441 Target Report Mask(VZEROUPPER) Save
442 Generate vzeroupper instruction before a transfer of control flow out of
446 Target RejectNegative Var(flag_dispatch_scheduler)
447 Do dispatch scheduling if processor is bdver1 or bdver2 or bdver3 and Haifa scheduling
451 Target Report Mask(PREFER_AVX128) SAVE
452 Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer.
457 Target RejectNegative Negative(m64) Report InverseMask(ISA_64BIT) Var(ix86_isa_flags) Save
458 Generate 32bit i386 code
461 Target RejectNegative Negative(mx32) Report Mask(ABI_64) Var(ix86_isa_flags) Save
462 Generate 64bit x86-64 code
465 Target RejectNegative Negative(m32) Report Mask(ABI_X32) Var(ix86_isa_flags) Save
466 Generate 32bit x86-64 code
469 Target Report Mask(ISA_MMX) Var(ix86_isa_flags) Save
470 Support MMX built-in functions
473 Target Report Mask(ISA_3DNOW) Var(ix86_isa_flags) Save
474 Support 3DNow! built-in functions
477 Target Undocumented Mask(ISA_3DNOW_A) Var(ix86_isa_flags) Save
478 Support Athlon 3Dnow! built-in functions
481 Target Report Mask(ISA_SSE) Var(ix86_isa_flags) Save
482 Support MMX and SSE built-in functions and code generation
485 Target Report Mask(ISA_SSE2) Var(ix86_isa_flags) Save
486 Support MMX, SSE and SSE2 built-in functions and code generation
489 Target Report Mask(ISA_SSE3) Var(ix86_isa_flags) Save
490 Support MMX, SSE, SSE2 and SSE3 built-in functions and code generation
493 Target Report Mask(ISA_SSSE3) Var(ix86_isa_flags) Save
494 Support MMX, SSE, SSE2, SSE3 and SSSE3 built-in functions and code generation
497 Target Report Mask(ISA_SSE4_1) Var(ix86_isa_flags) Save
498 Support MMX, SSE, SSE2, SSE3, SSSE3 and SSE4.1 built-in functions and code generation
501 Target Report Mask(ISA_SSE4_2) Var(ix86_isa_flags) Save
502 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions and code generation
505 Target RejectNegative Report Mask(ISA_SSE4_2) Var(ix86_isa_flags) Save
506 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1 and SSE4.2 built-in functions and code generation
509 Target RejectNegative Report InverseMask(ISA_SSE4_1) Var(ix86_isa_flags) Save
510 Do not support SSE4.1 and SSE4.2 built-in functions and code generation
513 Target Undocumented Alias(mavx) Warn(%<-msse5%> was removed)
517 Target Report Mask(ISA_AVX) Var(ix86_isa_flags) Save
518 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2 and AVX built-in functions and code generation
521 Target Report Mask(ISA_AVX2) Var(ix86_isa_flags) Save
522 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and AVX2 built-in functions and code generation
525 Target Report Mask(ISA_AVX512F) Var(ix86_isa_flags) Save
526 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F built-in functions and code generation
529 Target Report Mask(ISA_AVX512PF) Var(ix86_isa_flags) Save
530 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512PF built-in functions and code generation
533 Target Report Mask(ISA_AVX512ER) Var(ix86_isa_flags) Save
534 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512ER built-in functions and code generation
537 Target Report Mask(ISA_AVX512CD) Var(ix86_isa_flags) Save
538 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512CD built-in functions and code generation
541 Target Report Mask(ISA_FMA) Var(ix86_isa_flags) Save
542 Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation
545 Target Report Mask(ISA_SSE4A) Var(ix86_isa_flags) Save
546 Support MMX, SSE, SSE2, SSE3 and SSE4A built-in functions and code generation
549 Target Report Mask(ISA_FMA4) Var(ix86_isa_flags) Save
550 Support FMA4 built-in functions and code generation
553 Target Report Mask(ISA_XOP) Var(ix86_isa_flags) Save
554 Support XOP built-in functions and code generation
557 Target Report Mask(ISA_LWP) Var(ix86_isa_flags) Save
558 Support LWP built-in functions and code generation
561 Target Report Mask(ISA_ABM) Var(ix86_isa_flags) Save
562 Support code generation of Advanced Bit Manipulation (ABM) instructions.
565 Target Report Mask(ISA_POPCNT) Var(ix86_isa_flags) Save
566 Support code generation of popcnt instruction.
569 Target Report Mask(ISA_BMI) Var(ix86_isa_flags) Save
570 Support BMI built-in functions and code generation
573 Target Report Mask(ISA_BMI2) Var(ix86_isa_flags) Save
574 Support BMI2 built-in functions and code generation
577 Target Report Mask(ISA_LZCNT) Var(ix86_isa_flags) Save
578 Support LZCNT built-in function and code generation
581 Target Report Mask(ISA_HLE) Var(ix86_isa_flags) Save
582 Support Hardware Lock Elision prefixes
585 Target Report Mask(ISA_RDSEED) Var(ix86_isa_flags) Save
586 Support RDSEED instruction
589 Target Report Mask(ISA_PRFCHW) Var(ix86_isa_flags) Save
590 Support PREFETCHW instruction
593 Target Report Mask(ISA_ADX) Var(ix86_isa_flags) Save
594 Support flag-preserving add-carry instructions
597 Target Report Mask(ISA_FXSR) Var(ix86_isa_flags) Save
598 Support FXSAVE and FXRSTOR instructions
601 Target Report Mask(ISA_XSAVE) Var(ix86_isa_flags) Save
602 Support XSAVE and XRSTOR instructions
605 Target Report Mask(ISA_XSAVEOPT) Var(ix86_isa_flags) Save
606 Support XSAVEOPT instruction
609 Target Report Mask(ISA_TBM) Var(ix86_isa_flags) Save
610 Support TBM built-in functions and code generation
613 Target Report Mask(ISA_CX16) Var(ix86_isa_flags) Save
614 Support code generation of cmpxchg16b instruction.
617 Target Report Mask(ISA_SAHF) Var(ix86_isa_flags) Save
618 Support code generation of sahf instruction in 64bit x86-64 code.
621 Target Report Mask(ISA_MOVBE) Var(ix86_isa_flags) Save
622 Support code generation of movbe instruction.
625 Target Report Mask(ISA_CRC32) Var(ix86_isa_flags) Save
626 Support code generation of crc32 instruction.
629 Target Report Mask(ISA_AES) Var(ix86_isa_flags) Save
630 Support AES built-in functions and code generation
633 Target Report Mask(ISA_PCLMUL) Var(ix86_isa_flags) Save
634 Support PCLMUL built-in functions and code generation
637 Target Report Var(ix86_sse2avx)
638 Encode SSE instructions with VEX prefix
641 Target Report Mask(ISA_FSGSBASE) Var(ix86_isa_flags) Save
642 Support FSGSBASE built-in functions and code generation
645 Target Report Mask(ISA_RDRND) Var(ix86_isa_flags) Save
646 Support RDRND built-in functions and code generation
649 Target Report Mask(ISA_F16C) Var(ix86_isa_flags) Save
650 Support F16C built-in functions and code generation
653 Target Report Var(flag_fentry) Init(-1)
654 Emit profiling counter call at function entry before prologue.
657 Target Report Mask(USE_8BIT_IDIV) Save
658 Expand 32bit/64bit integer divide into 8bit unsigned integer divide with run-time check
660 mavx256-split-unaligned-load
661 Target Report Mask(AVX256_SPLIT_UNALIGNED_LOAD) Save
662 Split 32-byte AVX unaligned load
664 mavx256-split-unaligned-store
665 Target Report Mask(AVX256_SPLIT_UNALIGNED_STORE) Save
666 Split 32-byte AVX unaligned store
669 Target Report Mask(ISA_RTM) Var(ix86_isa_flags) Save
670 Support RTM built-in functions and code generation
673 Target Report Mask(ISA_MPX) Var(ix86_isa_flags) Save
674 Support MPX code generation
676 mstack-protector-guard=
677 Target RejectNegative Joined Enum(stack_protector_guard) Var(ix86_stack_protector_guard) Init(SSP_TLS)
678 Use given stack-protector guard
681 Name(stack_protector_guard) Type(enum stack_protector_guard)
682 Known stack protector guard (for use with the -mstack-protector-guard= option):
685 Enum(stack_protector_guard) String(tls) Value(SSP_TLS)
688 Enum(stack_protector_guard) String(global) Value(SSP_GLOBAL)