Commit 6c223f5d by Joseph Myers Committed by Joseph Myers

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
parent bbd399cf
2011-03-22 Joseph Myers <joseph@codesourcery.com> 2011-03-22 Joseph Myers <joseph@codesourcery.com>
* 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 <joseph@codesourcery.com>
* config/bfin/bfin-opts.h: New. * config/bfin/bfin-opts.h: New.
* config/bfin/bfin.c (bfin_lib_id_given, bfin_cpu_type, * config/bfin/bfin.c (bfin_lib_id_given, bfin_cpu_type,
bfin_si_revision, bfin_workarounds): Remove. bfin_si_revision, bfin_workarounds): Remove.
......
...@@ -2340,28 +2340,24 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table) ...@@ -2340,28 +2340,24 @@ cris_asm_output_case_end (FILE *stream, int num, rtx table)
cris_option_override. */ cris_option_override. */
static bool 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, const struct cl_decoded_option *decoded,
location_t loc ATTRIBUTE_UNUSED) location_t loc ATTRIBUTE_UNUSED)
{ {
size_t code = decoded->opt_index; 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) switch (code)
{ {
case OPT_metrax100: case OPT_metrax100:
target_flags opts->x_target_flags
|= (MASK_SVINTO |= (MASK_SVINTO
+ MASK_ETRAX4_ADD + MASK_ETRAX4_ADD
+ MASK_ALIGN_BY_32); + MASK_ALIGN_BY_32);
break; break;
case OPT_mno_etrax100: case OPT_mno_etrax100:
target_flags opts->x_target_flags
&= ~(MASK_SVINTO &= ~(MASK_SVINTO
+ MASK_ETRAX4_ADD + MASK_ETRAX4_ADD
+ MASK_ALIGN_BY_32); + MASK_ALIGN_BY_32);
...@@ -2369,7 +2365,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -2369,7 +2365,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
case OPT_m32_bit: case OPT_m32_bit:
case OPT_m32bit: case OPT_m32bit:
target_flags opts->x_target_flags
|= (MASK_STACK_ALIGN |= (MASK_STACK_ALIGN
+ MASK_CONST_ALIGN + MASK_CONST_ALIGN
+ MASK_DATA_ALIGN + MASK_DATA_ALIGN
...@@ -2378,7 +2374,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -2378,7 +2374,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
case OPT_m16_bit: case OPT_m16_bit:
case OPT_m16bit: case OPT_m16bit:
target_flags opts->x_target_flags
|= (MASK_STACK_ALIGN |= (MASK_STACK_ALIGN
+ MASK_CONST_ALIGN + MASK_CONST_ALIGN
+ MASK_DATA_ALIGN); + MASK_DATA_ALIGN);
...@@ -2386,7 +2382,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -2386,7 +2382,7 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
case OPT_m8_bit: case OPT_m8_bit:
case OPT_m8bit: case OPT_m8bit:
target_flags opts->x_target_flags
&= ~(MASK_STACK_ALIGN &= ~(MASK_STACK_ALIGN
+ MASK_CONST_ALIGN + MASK_CONST_ALIGN
+ MASK_DATA_ALIGN); + MASK_DATA_ALIGN);
...@@ -2396,8 +2392,6 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set, ...@@ -2396,8 +2392,6 @@ cris_handle_option (struct gcc_options *opts, struct gcc_options *opts_set,
break; break;
} }
CRIS_SUBTARGET_HANDLE_OPTION(code, arg, value);
return true; return true;
} }
......
...@@ -309,8 +309,6 @@ extern int cris_cpu_version; ...@@ -309,8 +309,6 @@ extern int cris_cpu_version;
#define TARGET_HAS_SWAP (cris_cpu_version >= CRIS_CPU_SVINTO) #define TARGET_HAS_SWAP (cris_cpu_version >= CRIS_CPU_SVINTO)
#define TARGET_V32 (cris_cpu_version >= CRIS_CPU_V32) #define TARGET_V32 (cris_cpu_version >= CRIS_CPU_V32)
#define CRIS_SUBTARGET_HANDLE_OPTION(x, y, z)
/* Node: Storage Layout */ /* Node: Storage Layout */
#define BITS_BIG_ENDIAN 0 #define BITS_BIG_ENDIAN 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment