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
sell...@imgtec.com


2015-04-28  Steve Ellcey  <sell...@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

Reply via email to