[4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"
Joseph S. Myers
joseph@codesourcery.com
Thu Mar 10 01:01:00 GMT 2011
In the course of preparing target changes to avoid global state in
option handlers (and use more .opt facilities to simplify those
handlers) I found that SPARC has a PROCESSOR_NIAGARA2 enumeration
value but maps "niagara2" in command-line options to PROCESSOR_NIAGARA
for no apparent reason (at least, there's no comment to explain this
oddity).
Supposing this mapping to be a mistake, this patch changes it to use
PROCESSOR_NIAGARA2. Tested building cc1 and xgcc for cross to
sparc-elf. OK to commit for 4.7? (If the mapping is deliberate,
changes to make SPARC use the .opt Enum facility will need to add a
separate enumeration corresponding to -march values, in order to
distinguish the two entries.)
2011-03-09 Joseph Myers <joseph@codesourcery.com>
* config/sparc/sparc.c (sparc_option_override): Use
PROCESSOR_NIAGARA2 not PROCESSOR_NIAGARA for "niagara2".
diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/sparc/sparc.c gcc-mainline/gcc/config/sparc/sparc.c
--- gcc-mainline-1/gcc/config/sparc/sparc.c 2011-02-24 13:36:04.000000000 -0800
+++ gcc-mainline/gcc/config/sparc/sparc.c 2011-03-09 15:16:41.000000000 -0800
@@ -787,7 +787,7 @@ sparc_option_override (void)
{ "niagara", PROCESSOR_NIAGARA, MASK_ISA,
MASK_V9|MASK_DEPRECATED_V8_INSNS},
/* UltraSPARC T2 */
- { "niagara2", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9},
+ { "niagara2", PROCESSOR_NIAGARA2, MASK_ISA, MASK_V9},
{ 0, (enum processor_type) 0, 0, 0 }
};
const struct cpu_table *cpu;
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list