Commit fb05f2e4 by Robert Suchanek Committed by Robert Suchanek

Fix ICE when both micromips and nomicromips attributes are used.

gcc/ChangeLog:

2015-05-18  Robert Suchanek  <robert.suchanek@imgtec.com>

	* config/mips/mips.c (micromips_globals): New variable.
	(mips_set_compression_mode): Save and reinitialize target-dependent
	state for microMIPS.

gcc/testsuite/ChangeLog:

2015-05-18  Robert Suchanek  <robert.suchanek@imgtec.com>

	* gcc.target/mips/umips-attr.c: New test.

From-SVN: r223294
parent 7aeb92b4
2015-05-18 Robert Suchanek <robert.suchanek@imgtec.com>
* config/mips/mips.c (micromips_globals): New variable.
(mips_set_compression_mode): Save and reinitialize target-dependent
state for microMIPS.
2015-05-18 Martin Liska <mliska@suse.cz> 2015-05-18 Martin Liska <mliska@suse.cz>
* dbgcnt.def: Add new counter. * dbgcnt.def: Add new counter.
......
...@@ -676,6 +676,9 @@ const char *mips_hi_relocs[NUM_SYMBOL_TYPES]; ...@@ -676,6 +676,9 @@ const char *mips_hi_relocs[NUM_SYMBOL_TYPES];
/* Target state for MIPS16. */ /* Target state for MIPS16. */
struct target_globals *mips16_globals; struct target_globals *mips16_globals;
/* Target state for MICROMIPS. */
struct target_globals *micromips_globals;
/* Cached value of can_issue_more. This is cached in mips_variable_issue hook /* Cached value of can_issue_more. This is cached in mips_variable_issue hook
and returned from mips_sched_reorder2. */ and returned from mips_sched_reorder2. */
static int cached_can_issue_more; static int cached_can_issue_more;
...@@ -17162,6 +17165,13 @@ mips_set_compression_mode (unsigned int compression_mode) ...@@ -17162,6 +17165,13 @@ mips_set_compression_mode (unsigned int compression_mode)
else else
restore_target_globals (mips16_globals); restore_target_globals (mips16_globals);
} }
else if (compression_mode & MASK_MICROMIPS)
{
if (!micromips_globals)
micromips_globals = save_target_globals_default_opts ();
else
restore_target_globals (micromips_globals);
}
else else
restore_target_globals (&default_target_globals); restore_target_globals (&default_target_globals);
......
2015-05-18 Robert Suchanek <robert.suchanek@imgtec.com>
* gcc.target/mips/umips-attr.c: New test.
2015-05-17 Uros Bizjak <ubizjak@gmail.com> 2015-05-17 Uros Bizjak <ubizjak@gmail.com>
* gcc.dg/20150120-1.c (dg-final): Cleanup original tree dump. * gcc.dg/20150120-1.c (dg-final): Cleanup original tree dump.
......
/* { dg-options "(-mmicromips)" } */
int MICROMIPS
foo (int a)
{
return a;
}
int NOMICROMIPS
foo2 (int a)
{
return a;
}
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