public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"
@ 2011-03-10  1:01 Joseph S. Myers
  2011-03-10  1:04 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Joseph S. Myers @ 2011-03-10  1:01 UTC (permalink / raw)
  To: gcc-patches; +Cc: rth, davem, jakub, ebotcazou

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2"
  2011-03-10  1:01 [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2" Joseph S. Myers
@ 2011-03-10  1:04 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2011-03-10  1:04 UTC (permalink / raw)
  To: joseph; +Cc: gcc-patches, rth, jakub, ebotcazou

From: "Joseph S. Myers" <joseph@codesourcery.com>
Date: Thu, 10 Mar 2011 01:01:12 +0000 (UTC)

> 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".

Thanks for finding this bug Joseph, please commit this fix and I think
it's appropriate for existing stable release branches as well.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-10  1:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-10  1:01 [4.7] Make SPARC use PROCESSOR_NIAGARA2 for "niagara2" Joseph S. Myers
2011-03-10  1:04 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).