diff options
Diffstat (limited to 'gcc/common/config')
-rw-r--r-- | gcc/common/config/i386/i386-common.c | 16 | ||||
-rw-r--r-- | gcc/common/config/msp430/msp430-common.c | 10 | ||||
-rw-r--r-- | gcc/common/config/s390/s390-common.c | 22 |
3 files changed, 23 insertions, 25 deletions
diff --git a/gcc/common/config/i386/i386-common.c b/gcc/common/config/i386/i386-common.c index 49899bd6fa6..a9d2208bc49 100644 --- a/gcc/common/config/i386/i386-common.c +++ b/gcc/common/config/i386/i386-common.c @@ -128,6 +128,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_F16C_SET \ (OPTION_MASK_ISA_F16C | OPTION_MASK_ISA_AVX_SET) #define OPTION_MASK_ISA_MWAITX_SET OPTION_MASK_ISA_MWAITX +#define OPTION_MASK_ISA_CLZERO_SET OPTION_MASK_ISA_CLZERO /* Define a set of ISAs which aren't available when a given ISA is disabled. MMX and SSE ISAs are handled separately. */ @@ -188,6 +189,7 @@ along with GCC; see the file COPYING3. If not see #define OPTION_MASK_ISA_PCOMMIT_UNSET OPTION_MASK_ISA_PCOMMIT #define OPTION_MASK_ISA_CLWB_UNSET OPTION_MASK_ISA_CLWB #define OPTION_MASK_ISA_MWAITX_UNSET OPTION_MASK_ISA_MWAITX +#define OPTION_MASK_ISA_CLZERO_UNSET OPTION_MASK_ISA_CLZERO /* SSE4 includes both SSE4.1 and SSE4.2. -mno-sse4 should the same as -mno-sse4.1. */ @@ -947,6 +949,20 @@ ix86_handle_option (struct gcc_options *opts, } return true; + case OPT_mclzero: + if (value) + { + opts->x_ix86_isa_flags |= OPTION_MASK_ISA_CLZERO_SET; + opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CLZERO_SET; + } + else + { + opts->x_ix86_isa_flags &= ~OPTION_MASK_ISA_CLZERO_UNSET; + opts->x_ix86_isa_flags_explicit |= OPTION_MASK_ISA_CLZERO_UNSET; + } + return true; + + /* Comes from final.c -- no real reason to change it. */ #define MAX_CODE_ALIGN 16 diff --git a/gcc/common/config/msp430/msp430-common.c b/gcc/common/config/msp430/msp430-common.c index ce071d13fa9..cbceab92db3 100644 --- a/gcc/common/config/msp430/msp430-common.c +++ b/gcc/common/config/msp430/msp430-common.c @@ -27,9 +27,9 @@ #include "opts.h" #include "flags.h" -/* Handle -mcpu= and -mmcu= here. We want to ensure that only one - of these two options - the last specified on the command line - - is passed on to the msp430 backend. */ +/* Check for generic -mcpu= and -mmcu= names here. If found then we + convert to a baseline cpu name. Otherwise we allow the option to + be passed on to the backend where it can be checked more fully. */ static bool msp430_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, @@ -46,13 +46,11 @@ msp430_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, || strcasecmp (decoded->arg, "430xv2") == 0) { target_cpu = "msp430x"; - target_mcu = NULL; } else if (strcasecmp (decoded->arg, "msp430") == 0 || strcasecmp (decoded->arg, "430") == 0) { target_cpu = "msp430"; - target_mcu = NULL; } else { @@ -77,8 +75,6 @@ msp430_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, target_cpu = "msp430x"; target_mcu = NULL; } - else - target_cpu = NULL; break; } diff --git a/gcc/common/config/s390/s390-common.c b/gcc/common/config/s390/s390-common.c index 43459c890b6..4cf0df7d0c3 100644 --- a/gcc/common/config/s390/s390-common.c +++ b/gcc/common/config/s390/s390-common.c @@ -79,41 +79,27 @@ s390_option_init_struct (struct gcc_options *opts) /* Implement TARGET_HANDLE_OPTION. */ -static bool -s390_handle_option (struct gcc_options *opts, +bool +s390_handle_option (struct gcc_options *opts ATTRIBUTE_UNUSED, struct gcc_options *opts_set ATTRIBUTE_UNUSED, const struct cl_decoded_option *decoded, location_t loc) { size_t code = decoded->opt_index; - const char *arg = decoded->arg; int value = decoded->value; switch (code) { - case OPT_march_: - opts->x_s390_arch_flags = processor_flags_table[value]; - opts->x_s390_arch_string = arg; - return true; - case OPT_mstack_guard_: - if (exact_log2 (value) == -1) + if (value != 0 && exact_log2 (value) == -1) error_at (loc, "stack guard value must be an exact power of 2"); return true; case OPT_mstack_size_: - if (exact_log2 (value) == -1) + if (value != 0 && exact_log2 (value) == -1) error_at (loc, "stack size must be an exact power of 2"); return true; - case OPT_mtune_: - opts->x_s390_tune_flags = processor_flags_table[value]; - return true; - - case OPT_mwarn_framesize_: - return sscanf (arg, HOST_WIDE_INT_PRINT_DEC, - &opts->x_s390_warn_framesize) == 1; - default: return true; } |