public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Patch, MIPS] Change mips4 default processor to r10K
@ 2015-04-28 17:54 Steve Ellcey 
  2015-04-28 18:40 ` Matthew Fortune
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Ellcey  @ 2015-04-28 17:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: matthew.fortune, clm

This patch changes the default processor for mips4 from the r8000 to the
r10000.  There are several reasons for this change, the main one
being the difference in the r8000 madd instruction and the rest of the mips4
family.  The r8000 has a fused madd instruction (no truncation between the
multiply and add) but the rest of the mips4 CPUs have unfused madd
instructions where truncation is done and the result is identical to using
separate multiply and add instructions.

I plan to submit a patch later to clean up MIPS handling of madd and other
fma style instructions but to do that it is necessary to do different things
for r8000 vs the other mips4 targets and that is easier if r8000 is not the
default processor selected when -mips4 is used.

I have also been told that very few r8000 machines were ever released and
that the r10k/r12k/etc. series is probably the most common mips4 machines
still out there and so would be a better default.

This patch will have no affect on compiles where a specific processor is
specified (i.e. -march=r80000, -march=r10000), but only when using the
more generic -mips4 or -march=mips4 flags.  The only visible difference
in that case is that GCC will use the r10k instruction scheduler instead
of the generic MIPS scheduler (there is no r8000 specific scheduler) and
that should be a good thing for most mips4 machines.

Tested with the mips-linux-gnu toolchain.

OK for checkin?

Steve Ellcey
sellcey@imgtec.com


2015-04-28  Steve Ellcey  <sellcey@imgtec.com>

	* config/mips/mips-cpus.def: (mips4): Change default processor
	from PROCESSOR_R8000 to PROCESSOR_R10000.


diff --git a/gcc/config/mips/mips-cpus.def b/gcc/config/mips/mips-cpus.def
index 433d457..fb4bae0 100644
--- a/gcc/config/mips/mips-cpus.def
+++ b/gcc/config/mips/mips-cpus.def
@@ -36,7 +36,7 @@ along with GCC; see the file COPYING3.  If not see
 MIPS_CPU ("mips1", PROCESSOR_R3000, 1, 0)
 MIPS_CPU ("mips2", PROCESSOR_R6000, 2, 0)
 MIPS_CPU ("mips3", PROCESSOR_R4000, 3, 0)
-MIPS_CPU ("mips4", PROCESSOR_R8000, 4, 0)
+MIPS_CPU ("mips4", PROCESSOR_R10000, 4, 0)
 /* Prefer not to use branch-likely instructions for generic MIPS32rX
    and MIPS64rX code.  The instructions were officially deprecated
    in revisions 2 and earlier, but revision 3 is likely to downgrade

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

* RE: [Patch, MIPS] Change mips4 default processor to r10K
  2015-04-28 17:54 [Patch, MIPS] Change mips4 default processor to r10K Steve Ellcey 
@ 2015-04-28 18:40 ` Matthew Fortune
  2015-04-29 21:15   ` Moore, Catherine
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Fortune @ 2015-04-28 18:40 UTC (permalink / raw)
  To: Steve Ellcey, gcc-patches; +Cc: clm

Steve Ellcey  <sellcey@imgtec.com> writes:
> This patch changes the default processor for mips4 from the r8000 to
> the
> r10000.  There are several reasons for this change, the main one
> being the difference in the r8000 madd instruction and the rest of the
> mips4
> family.  The r8000 has a fused madd instruction (no truncation between
> the
> multiply and add) but the rest of the mips4 CPUs have unfused madd
> instructions where truncation is done and the result is identical to
> using
> separate multiply and add instructions.
> 
> I plan to submit a patch later to clean up MIPS handling of madd and
> other
> fma style instructions but to do that it is necessary to do different
> things
> for r8000 vs the other mips4 targets and that is easier if r8000 is not
> the
> default processor selected when -mips4 is used.
> 
> I have also been told that very few r8000 machines were ever released
> and
> that the r10k/r12k/etc. series is probably the most common mips4
> machines
> still out there and so would be a better default.
> 
> This patch will have no affect on compiles where a specific processor
> is
> specified (i.e. -march=r80000, -march=r10000), but only when using the
> more generic -mips4 or -march=mips4 flags.  The only visible difference
> in that case is that GCC will use the r10k instruction scheduler
> instead
> of the generic MIPS scheduler (there is no r8000 specific scheduler)
> and
> that should be a good thing for most mips4 machines.
> 
> Tested with the mips-linux-gnu toolchain.
> 
> OK for checkin?
> 
> Steve Ellcey
> sellcey@imgtec.com
> 
> 
> 2015-04-28  Steve Ellcey  <sellcey@imgtec.com>
> 
> 	* config/mips/mips-cpus.def: (mips4): Change default processor
> 	from PROCESSOR_R8000 to PROCESSOR_R10000.

Ok with me. I'd like Catherine to have the chance to raise any concerns
though.

Thanks,
Matthew

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

* RE: [Patch, MIPS] Change mips4 default processor to r10K
  2015-04-28 18:40 ` Matthew Fortune
@ 2015-04-29 21:15   ` Moore, Catherine
  0 siblings, 0 replies; 3+ messages in thread
From: Moore, Catherine @ 2015-04-29 21:15 UTC (permalink / raw)
  To: Matthew Fortune, Steve Ellcey, gcc-patches; +Cc: Moore, Catherine

> -----Original Message-----
> From: Matthew Fortune [mailto:Matthew.Fortune@imgtec.com]
> Sent: Tuesday, April 28, 2015 2:38 PM
> 
> Steve Ellcey  <sellcey@imgtec.com> writes:
> >
> > 2015-04-28  Steve Ellcey  <sellcey@imgtec.com>
> >
> > 	* config/mips/mips-cpus.def: (mips4): Change default processor
> > 	from PROCESSOR_R8000 to PROCESSOR_R10000.
> 
> Ok with me. I'd like Catherine to have the chance to raise any concerns
> though.

This change is OK with me, as well.
Catherine

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

end of thread, other threads:[~2015-04-29 21:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 17:54 [Patch, MIPS] Change mips4 default processor to r10K Steve Ellcey 
2015-04-28 18:40 ` Matthew Fortune
2015-04-29 21:15   ` Moore, Catherine

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