diff options
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r-- | gcc/config/i386/i386.c | 607 |
1 files changed, 1 insertions, 606 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 7b266b93f83..507d4c691ef 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see #include "ggc.h" #include "target.h" #include "target-def.h" +#include "common/common-target.h" #include "langhooks.h" #include "cgraph.h" #include "gimple.h" @@ -2461,120 +2462,6 @@ static enum calling_abi ix86_function_abi (const_tree); static int ix86_tune_defaulted; static int ix86_arch_specified; -/* Define a set of ISAs which are available when a given ISA is - enabled. MMX and SSE ISAs are handled separately. */ - -#define OPTION_MASK_ISA_MMX_SET OPTION_MASK_ISA_MMX -#define OPTION_MASK_ISA_3DNOW_SET \ - (OPTION_MASK_ISA_3DNOW | OPTION_MASK_ISA_MMX_SET) - -#define OPTION_MASK_ISA_SSE_SET OPTION_MASK_ISA_SSE -#define OPTION_MASK_ISA_SSE2_SET \ - (OPTION_MASK_ISA_SSE2 | OPTION_MASK_ISA_SSE_SET) -#define OPTION_MASK_ISA_SSE3_SET \ - (OPTION_MASK_ISA_SSE3 | OPTION_MASK_ISA_SSE2_SET) -#define OPTION_MASK_ISA_SSSE3_SET \ - (OPTION_MASK_ISA_SSSE3 | OPTION_MASK_ISA_SSE3_SET) -#define OPTION_MASK_ISA_SSE4_1_SET \ - (OPTION_MASK_ISA_SSE4_1 | OPTION_MASK_ISA_SSSE3_SET) -#define OPTION_MASK_ISA_SSE4_2_SET \ - (OPTION_MASK_ISA_SSE4_2 | OPTION_MASK_ISA_SSE4_1_SET) -#define OPTION_MASK_ISA_AVX_SET \ - (OPTION_MASK_ISA_AVX | OPTION_MASK_ISA_SSE4_2_SET) -#define OPTION_MASK_ISA_FMA_SET \ - (OPTION_MASK_ISA_FMA | OPTION_MASK_ISA_AVX_SET) - -/* SSE4 includes both SSE4.1 and SSE4.2. -msse4 should be the same - as -msse4.2. */ -#define OPTION_MASK_ISA_SSE4_SET OPTION_MASK_ISA_SSE4_2_SET - -#define OPTION_MASK_ISA_SSE4A_SET \ - (OPTION_MASK_ISA_SSE4A | OPTION_MASK_ISA_SSE3_SET) -#define OPTION_MASK_ISA_FMA4_SET \ - (OPTION_MASK_ISA_FMA4 | OPTION_MASK_ISA_SSE4A_SET \ - | OPTION_MASK_ISA_AVX_SET) -#define OPTION_MASK_ISA_XOP_SET \ - (OPTION_MASK_ISA_XOP | OPTION_MASK_ISA_FMA4_SET) -#define OPTION_MASK_ISA_LWP_SET \ - OPTION_MASK_ISA_LWP - -/* AES and PCLMUL need SSE2 because they use xmm registers */ -#define OPTION_MASK_ISA_AES_SET \ - (OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2_SET) -#define OPTION_MASK_ISA_PCLMUL_SET \ - (OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2_SET) - -#define OPTION_MASK_ISA_ABM_SET \ - (OPTION_MASK_ISA_ABM | OPTION_MASK_ISA_POPCNT) - -#define OPTION_MASK_ISA_BMI_SET OPTION_MASK_ISA_BMI -#define OPTION_MASK_ISA_TBM_SET OPTION_MASK_ISA_TBM -#define OPTION_MASK_ISA_POPCNT_SET OPTION_MASK_ISA_POPCNT -#define OPTION_MASK_ISA_CX16_SET OPTION_MASK_ISA_CX16 -#define OPTION_MASK_ISA_SAHF_SET OPTION_MASK_ISA_SAHF -#define OPTION_MASK_ISA_MOVBE_SET OPTION_MASK_ISA_MOVBE -#define OPTION_MASK_ISA_CRC32_SET OPTION_MASK_ISA_CRC32 - -#define OPTION_MASK_ISA_FSGSBASE_SET OPTION_MASK_ISA_FSGSBASE -#define OPTION_MASK_ISA_RDRND_SET OPTION_MASK_ISA_RDRND -#define OPTION_MASK_ISA_F16C_SET \ - (OPTION_MASK_ISA_F16C | OPTION_MASK_ISA_AVX_SET) - -/* Define a set of ISAs which aren't available when a given ISA is - disabled. MMX and SSE ISAs are handled separately. */ - -#define OPTION_MASK_ISA_MMX_UNSET \ - (OPTION_MASK_ISA_MMX | OPTION_MASK_ISA_3DNOW_UNSET) -#define OPTION_MASK_ISA_3DNOW_UNSET \ - (OPTION_MASK_ISA_3DNOW | OPTION_MASK_ISA_3DNOW_A_UNSET) -#define OPTION_MASK_ISA_3DNOW_A_UNSET OPTION_MASK_ISA_3DNOW_A - -#define OPTION_MASK_ISA_SSE_UNSET \ - (OPTION_MASK_ISA_SSE | OPTION_MASK_ISA_SSE2_UNSET) -#define OPTION_MASK_ISA_SSE2_UNSET \ - (OPTION_MASK_ISA_SSE2 | OPTION_MASK_ISA_SSE3_UNSET) -#define OPTION_MASK_ISA_SSE3_UNSET \ - (OPTION_MASK_ISA_SSE3 \ - | OPTION_MASK_ISA_SSSE3_UNSET \ - | OPTION_MASK_ISA_SSE4A_UNSET ) -#define OPTION_MASK_ISA_SSSE3_UNSET \ - (OPTION_MASK_ISA_SSSE3 | OPTION_MASK_ISA_SSE4_1_UNSET) -#define OPTION_MASK_ISA_SSE4_1_UNSET \ - (OPTION_MASK_ISA_SSE4_1 | OPTION_MASK_ISA_SSE4_2_UNSET) -#define OPTION_MASK_ISA_SSE4_2_UNSET \ - (OPTION_MASK_ISA_SSE4_2 | OPTION_MASK_ISA_AVX_UNSET ) -#define OPTION_MASK_ISA_AVX_UNSET \ - (OPTION_MASK_ISA_AVX | OPTION_MASK_ISA_FMA_UNSET \ - | OPTION_MASK_ISA_FMA4_UNSET | OPTION_MASK_ISA_F16C_UNSET) -#define OPTION_MASK_ISA_FMA_UNSET OPTION_MASK_ISA_FMA - -/* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same - as -mno-sse4.1. */ -#define OPTION_MASK_ISA_SSE4_UNSET OPTION_MASK_ISA_SSE4_1_UNSET - -#define OPTION_MASK_ISA_SSE4A_UNSET \ - (OPTION_MASK_ISA_SSE4A | OPTION_MASK_ISA_FMA4_UNSET) - -#define OPTION_MASK_ISA_FMA4_UNSET \ - (OPTION_MASK_ISA_FMA4 | OPTION_MASK_ISA_XOP_UNSET) -#define OPTION_MASK_ISA_XOP_UNSET OPTION_MASK_ISA_XOP -#define OPTION_MASK_ISA_LWP_UNSET OPTION_MASK_ISA_LWP - -#define OPTION_MASK_ISA_AES_UNSET OPTION_MASK_ISA_AES -#define OPTION_MASK_ISA_PCLMUL_UNSET OPTION_MASK_ISA_PCLMUL -#define OPTION_MASK_ISA_ABM_UNSET OPTION_MASK_ISA_ABM -#define OPTION_MASK_ISA_BMI_UNSET OPTION_MASK_ISA_BMI -#define OPTION_MASK_ISA_TBM_UNSET OPTION_MASK_ISA_TBM -#define OPTION_MASK_ISA_POPCNT_UNSET OPTION_MASK_ISA_POPCNT -#define OPTION_MASK_ISA_CX16_UNSET OPTION_MASK_ISA_CX16 -#define OPTION_MASK_ISA_SAHF_UNSET OPTION_MASK_ISA_SAHF -#define OPTION_MASK_ISA_MOVBE_UNSET OPTION_MASK_ISA_MOVBE -#define OPTION_MASK_ISA_CRC32_UNSET OPTION_MASK_ISA_CRC32 - -#define OPTION_MASK_ISA_FSGSBASE_UNSET OPTION_MASK_ISA_FSGSBASE -#define OPTION_MASK_ISA_RDRND_UNSET OPTION_MASK_ISA_RDRND -#define OPTION_MASK_ISA_F16C_UNSET OPTION_MASK_ISA_F16C - /* Vectorization library interface and handlers. */ static tree (*ix86_veclib_handler) (enum built_in_function, tree, tree); @@ -2656,427 +2543,6 @@ ix86_using_red_zone (void) { return TARGET_RED_ZONE && !TARGET_64BIT_MS_ABI; } - -/* Implement TARGET_HANDLE_OPTION. */ - -static bool -ix86_handle_option (struct gcc_options *opts, - struct gcc_options *opts_set ATTRIBUTE_UNUSED, - const struct cl_decoded_option *decoded, - location_t loc) -{ - size_t code = decoded->opt_index; - int value = decoded->value; - - switch (code) - { - case OPT_mmmx: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_MMX_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_MMX_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_MMX_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_MMX_UNSET; - } - return true; - - case OPT_m3dnow: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_3DNOW_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_3DNOW_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_3DNOW_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_3DNOW_UNSET; - } - return true; - - case OPT_m3dnowa: - return false; - - case OPT_msse: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE_UNSET; - } - return true; - - case OPT_msse2: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE2_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE2_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE2_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE2_UNSET; - } - return true; - - case OPT_msse3: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE3_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE3_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE3_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE3_UNSET; - } - return true; - - case OPT_mssse3: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSSE3_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSSE3_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSSE3_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSSE3_UNSET; - } - return true; - - case OPT_msse4_1: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE4_1_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_1_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE4_1_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_1_UNSET; - } - return true; - - case OPT_msse4_2: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE4_2_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_2_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE4_2_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_2_UNSET; - } - return true; - - case OPT_mavx: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AVX_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_AVX_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AVX_UNSET; - } - return true; - - case OPT_mfma: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_FMA_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FMA_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_FMA_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FMA_UNSET; - } - return true; - - case OPT_msse4: - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE4_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_SET; - return true; - - case OPT_mno_sse4: - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE4_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4_UNSET; - return true; - - case OPT_msse4a: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SSE4A_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4A_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SSE4A_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SSE4A_UNSET; - } - return true; - - case OPT_mfma4: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_FMA4_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FMA4_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_FMA4_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FMA4_UNSET; - } - return true; - - case OPT_mxop: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_XOP_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_XOP_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_XOP_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_XOP_UNSET; - } - return true; - - case OPT_mlwp: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_LWP_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_LWP_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_LWP_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_LWP_UNSET; - } - return true; - - case OPT_mabm: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_ABM_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_ABM_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_ABM_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_ABM_UNSET; - } - return true; - - case OPT_mbmi: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_BMI_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_BMI_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_BMI_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_BMI_UNSET; - } - return true; - - case OPT_mtbm: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_TBM_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_TBM_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_TBM_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_TBM_UNSET; - } - return true; - - case OPT_mpopcnt: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_POPCNT_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_POPCNT_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_POPCNT_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_POPCNT_UNSET; - } - return true; - - case OPT_msahf: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_SAHF_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SAHF_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_SAHF_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_SAHF_UNSET; - } - return true; - - case OPT_mcx16: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_CX16_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CX16_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_CX16_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CX16_UNSET; - } - return true; - - case OPT_mmovbe: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_MOVBE_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_MOVBE_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_MOVBE_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_MOVBE_UNSET; - } - return true; - - case OPT_mcrc32: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_CRC32_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CRC32_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_CRC32_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CRC32_UNSET; - } - return true; - - case OPT_maes: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_AES_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AES_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_AES_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_AES_UNSET; - } - return true; - - case OPT_mpclmul: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_PCLMUL_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_PCLMUL_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_PCLMUL_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_PCLMUL_UNSET; - } - return true; - - case OPT_mfsgsbase: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_FSGSBASE_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FSGSBASE_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_FSGSBASE_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_FSGSBASE_UNSET; - } - return true; - - case OPT_mrdrnd: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_RDRND_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_RDRND_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_RDRND_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_RDRND_UNSET; - } - return true; - - case OPT_mf16c: - if (value) - { - opts->x_ix86_isa_flags |= OPTION_MASK_ISA_F16C_SET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_F16C_SET; - } - else - { - opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_F16C_UNSET; - opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_F16C_UNSET; - } - return true; - - /* Comes from final.c -- no real reason to change it. */ -#define MAX_CODE_ALIGN 16 - - case OPT_malign_loops_: - warning_at (loc, 0, "-malign-loops is obsolete, use -falign-loops"); - if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-loops=%d is not between 0 and %d", - value, MAX_CODE_ALIGN); - else - opts->x_align_loops = 1 << value; - return true; - - case OPT_malign_jumps_: - warning_at (loc, 0, "-malign-jumps is obsolete, use -falign-jumps"); - if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-jumps=%d is not between 0 and %d", - value, MAX_CODE_ALIGN); - else - opts->x_align_jumps = 1 << value; - return true; - - case OPT_malign_functions_: - warning_at (loc, 0, - "-malign-functions is obsolete, use -falign-functions"); - if (value > MAX_CODE_ALIGN) - error_at (loc, "-malign-functions=%d is not between 0 and %d", - value, MAX_CODE_ALIGN); - else - opts->x_align_functions = 1 << value; - return true; - - case OPT_mbranch_cost_: - if (value > 5) - { - error_at (loc, "-mbranch-cost=%d is not between 0 and 5", value); - opts->x_ix86_branch_cost = 5; - } - return true; - - default: - return true; - } -} /* Return a string that documents the current -m options. The caller is responsible for freeing the string. */ @@ -5092,35 +4558,6 @@ x86_output_aligned_bss (FILE *file, tree decl ATTRIBUTE_UNUSED, ASM_OUTPUT_SKIP (file, size ? size : 1); } -static const struct default_options ix86_option_optimization_table[] = - { - /* Turn off -fschedule-insns by default. It tends to make the - problem with not enough registers even worse. */ -#ifdef INSN_SCHEDULING - { OPT_LEVELS_ALL, OPT_fschedule_insns, NULL, 0 }, -#endif - -#ifdef SUBTARGET_OPTIMIZATION_OPTIONS - SUBTARGET_OPTIMIZATION_OPTIONS, -#endif - { OPT_LEVELS_NONE, 0, NULL, 0 } - }; - -/* Implement TARGET_OPTION_INIT_STRUCT. */ - -static void -ix86_option_init_struct (struct gcc_options *opts) -{ - if (TARGET_MACHO) - /* The Darwin libraries never set errno, so we might as well - avoid calling them when that's the only reason we would. */ - opts->x_flag_errno_math = 0; - - opts->x_flag_pcc_struct_return = 2; - opts->x_flag_asynchronous_unwind_tables = 2; - opts->x_flag_vect_cost_model = 1; -} - /* Decide whether we must probe the stack before any space allocation on this target. It's essentially TARGET_STACK_PROBE except when -fstack-check causes the stack to be already probed differently. */ @@ -9142,32 +8579,6 @@ ix86_builtin_setjmp_frame_value (void) return stack_realign_fp ? hard_frame_pointer_rtx : virtual_stack_vars_rtx; } -/* On the x86 -fsplit-stack and -fstack-protector both use the same - field in the TCB, so they can not be used together. */ - -static bool -ix86_supports_split_stack (bool report ATTRIBUTE_UNUSED, - struct gcc_options *opts ATTRIBUTE_UNUSED) -{ - bool ret = true; - -#ifndef TARGET_THREAD_SPLIT_STACK_OFFSET - if (report) - error ("%<-fsplit-stack%> currently only supported on GNU/Linux"); - ret = false; -#else - if (!HAVE_GAS_CFI_PERSONALITY_DIRECTIVE) - { - if (report) - error ("%<-fsplit-stack%> requires " - "assembler support for CFI directives"); - ret = false; - } -#endif - - return ret; -} - /* When using -fsplit-stack, the allocation routines set a field in the TCB to the bottom of the stack plus this much space, measured in bytes. */ @@ -35297,21 +34708,8 @@ ix86_autovectorize_vector_sizes (void) #undef TARGET_ASM_FILE_START #define TARGET_ASM_FILE_START x86_file_start -#undef TARGET_DEFAULT_TARGET_FLAGS -#define TARGET_DEFAULT_TARGET_FLAGS \ - (TARGET_DEFAULT \ - | TARGET_SUBTARGET_DEFAULT \ - | TARGET_TLS_DIRECT_SEG_REFS_DEFAULT) - -#undef TARGET_HANDLE_OPTION -#define TARGET_HANDLE_OPTION ix86_handle_option - #undef TARGET_OPTION_OVERRIDE #define TARGET_OPTION_OVERRIDE ix86_option_override -#undef TARGET_OPTION_OPTIMIZATION_TABLE -#define TARGET_OPTION_OPTIMIZATION_TABLE ix86_option_optimization_table -#undef TARGET_OPTION_INIT_STRUCT -#define TARGET_OPTION_INIT_STRUCT ix86_option_init_struct #undef TARGET_REGISTER_MOVE_COST #define TARGET_REGISTER_MOVE_COST ix86_register_move_cost @@ -35412,9 +34810,6 @@ ix86_autovectorize_vector_sizes (void) #define TARGET_STACK_PROTECT_FAIL ix86_stack_protect_fail #endif -#undef TARGET_SUPPORTS_SPLIT_STACK -#define TARGET_SUPPORTS_SPLIT_STACK ix86_supports_split_stack - #undef TARGET_FUNCTION_VALUE #define TARGET_FUNCTION_VALUE ix86_function_value |