From 6c223f5da144ae11fe0d9b81e4c1ee625e3bef6b Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 22 Mar 2011 22:31:35 +0000 Subject: [PATCH] cris.c (cris_handle_option): Access target_flags via opts pointer. * config/cris/cris.c (cris_handle_option): Access target_flags via opts pointer. Don't assert that global structures are in use. Don't call CRIS_SUBTARGET_HANDLE_OPTION. * config/cris/cris.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't define. From-SVN: r171315 --- gcc/ChangeLog | 7 +++++++ gcc/config/cris/cris.c | 20 +++++++------------- gcc/config/cris/cris.h | 2 -- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 77c48c380ff..b151f8792a3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-03-22 Joseph Myers + + * config/cris/cris.c (cris_handle_option): Access target_flags via + opts pointer. Don't assert that global structures are in use. + Don't call CRIS_SUBTARGET_HANDLE_OPTION. + * config/cris/cris.h (CRIS_SUBTARGET_HANDLE_OPTION): Don't define. + 2011-03-22 Joseph Myers * config/bfin/bfin-opts.h: New. diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c index 37ccde461a0..c1aa94380e4 100644 --- a/gcc/config/cris/cris.c +++ b/gcc/config/cris/cris.c @@ -2340,28 +2340,24 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table) cris_option_override. */ static bool -cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, +cris_handle_option (struct gcc_options *opts, + struct gcc_options *opts_set ATTRIBUTE_UNUSED, const struct cl_decoded_option *decoded, location_t loc ATTRIBUTE_UNUSED) { size_t code = decoded->opt_index; - const char *arg ATTRIBUTE_UNUSED = decoded->arg; - int value ATTRIBUTE_UNUSED = decoded->value; - - gcc_assert (opts == &global_options); - gcc_assert (opts_set == &global_options_set); switch (code) { case OPT_metrax100: - target_flags + opts->x_target_flags |= (MASK_SVINTO + MASK_ETRAX4_ADD + MASK_ALIGN_BY_32); break; case OPT_mno_etrax100: - target_flags + opts->x_target_flags &= ~(MASK_SVINTO + MASK_ETRAX4_ADD + MASK_ALIGN_BY_32); @@ -2369,7 +2365,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_m32_bit: case OPT_m32bit: - target_flags + opts->x_target_flags |= (MASK_STACK_ALIGN + MASK_CONST_ALIGN + MASK_DATA_ALIGN @@ -2378,7 +2374,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_m16_bit: case OPT_m16bit: - target_flags + opts->x_target_flags |= (MASK_STACK_ALIGN + MASK_CONST_ALIGN + MASK_DATA_ALIGN); @@ -2386,7 +2382,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, case OPT_m8_bit: case OPT_m8bit: - target_flags + opts->x_target_flags &= ~(MASK_STACK_ALIGN + MASK_CONST_ALIGN + MASK_DATA_ALIGN); @@ -2396,8 +2392,6 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, break; } - CRIS_SUBTARGET_HANDLE_OPTION(code, arg, value); - return true; } diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h index 0e69e694893..e8172bb1195 100644 --- a/gcc/config/cris/cris.h +++ b/gcc/config/cris/cris.h @@ -309,8 +309,6 @@ extern int cris_cpu_version; #define TARGET_HAS_SWAP (cris_cpu_version >= CRIS_CPU_SVINTO) #define TARGET_V32 (cris_cpu_version >= CRIS_CPU_V32) -#define CRIS_SUBTARGET_HANDLE_OPTION(x, y, z) - /* Node: Storage Layout */ #define BITS_BIG_ENDIAN 0 -- 2.30.2