Patchwork [MIPS] Add 34Kn cpu

login
register
mail settings
Submitter Sandra Loosemore
Date Aug. 1, 2012, 4:17 a.m.
Message ID <5018ADC6.2040909@codesourcery.com>
Download mbox | patch
Permalink /patch/174381/
State New
Headers show

Comments

Sandra Loosemore - Aug. 1, 2012, 4:17 a.m.
This patch makes GCC know about -march=34kn.  MIPS asked us to add 
support for this processor to our local source base a couple of years 
ago; it's basically a 34Kc without the DSP ASE.  OK for mainline?

I have posted the corresponding assembler patch here:
http://sourceware.org/ml/binutils/2012-08/msg00008.html

-Sandra


2012-08-01  Catherine Moore  <clm@codesourcery.com>
	    Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/mips/mips-cpus.def (34kn): New.
	* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): Add 34kn.
	(BASE_DRIVER_SELF_SPECS): Do not imply -mdsp for the 34kn.
Richard Sandiford - Aug. 1, 2012, 6:07 p.m.
Sandra Loosemore <sandra@codesourcery.com> writes:
> This patch makes GCC know about -march=34kn.  MIPS asked us to add 
> support for this processor to our local source base a couple of years 
> ago; it's basically a 34Kc without the DSP ASE.  OK for mainline?
>
> I have posted the corresponding assembler patch here:
> http://sourceware.org/ml/binutils/2012-08/msg00008.html
>
> -Sandra
>
>
> 2012-08-01  Catherine Moore  <clm@codesourcery.com>
> 	    Sandra Loosemore  <sandra@codesourcery.com>
>
> 	gcc/
> 	* config/mips/mips-cpus.def (34kn): New.
> 	* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): Add 34kn.
> 	(BASE_DRIVER_SELF_SPECS): Do not imply -mdsp for the 34kn.

Needs adding to invoke.texi too.  OK with that change, thanks.

Richard
Gerald Pfeifer - Aug. 4, 2012, 9:01 p.m.
On Wed, 1 Aug 2012, Richard Sandiford wrote:
>> 2012-08-01  Catherine Moore  <clm@codesourcery.com>
>> 	    Sandra Loosemore  <sandra@codesourcery.com>
>>
>> 	gcc/
>> 	* config/mips/mips-cpus.def (34kn): New.
>> 	* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): Add 34kn.
>> 	(BASE_DRIVER_SELF_SPECS): Do not imply -mdsp for the 34kn.
> Needs adding to invoke.texi too.  OK with that change, thanks.

And http://gcc.gnu.org/gcc-4.8/changes.html :-)

Gerald
Sandra Loosemore - Aug. 4, 2012, 9:36 p.m.
On 08/04/2012 03:01 PM, Gerald Pfeifer wrote:
> On Wed, 1 Aug 2012, Richard Sandiford wrote:
>>> 2012-08-01  Catherine Moore<clm@codesourcery.com>
>>> 	Sandra Loosemore<sandra@codesourcery.com>
>>>
>>> 	gcc/
>>> 	* config/mips/mips-cpus.def (34kn): New.
>>> 	* config/mips/mips.h (MIPS_ARCH_FLOAT_SPEC): Add 34kn.
>>> 	(BASE_DRIVER_SELF_SPECS): Do not imply -mdsp for the 34kn.
>> Needs adding to invoke.texi too.  OK with that change, thanks.
>
> And http://gcc.gnu.org/gcc-4.8/changes.html :-)

Eh, this is pretty trivial compared to some of the other MIPS 
improvements that are either recently committed or in the pipeline -- 
specifically, the microMIPS support Catherine is working on, and the 
recently-committed Netlogic XLP patch.  We also have a batch of MIPS16 
improvements that have not been submitted yet, including the missing 
TLS/PIC bits to make MIPS16 work with Linux.  (I can't claim to be 
responsible for any of this good stuff myself, though; I'm just helping 
with whacking at some smaller patches in our backlog while I'm between 
other projects.)

-Sandra
Gerald Pfeifer - Aug. 12, 2012, 11:20 p.m.
On Sat, 4 Aug 2012, Sandra Loosemore wrote:
>> And http://gcc.gnu.org/gcc-4.8/changes.html :-)
> Eh, this is pretty trivial compared to some of the other MIPS 
> improvements that are either recently committed or in the pipeline -- 
> specifically, the microMIPS support Catherine is working on, and the 
> recently-committed Netlogic XLP patch.

Well, my hope is that you'll document these as well. ;-)  Let me
know if there is anything I can help with.

> (I can't claim to be responsible for any of this good stuff myself, 
> though; I'm just helping with whacking at some smaller patches in
> our backlog while I'm between other projects.)

That's cool!  Happy whacking.

Gerald

Patch

Index: config/mips/mips-cpus.def
===================================================================
--- config/mips/mips-cpus.def	(revision 189988)
+++ config/mips/mips-cpus.def	(working copy)
@@ -120,6 +120,7 @@  MIPS_CPU ("34kf", PROCESSOR_24KF2_1, 33,
 MIPS_CPU ("34kf1_1", PROCESSOR_24KF1_1, 33, 0)
 MIPS_CPU ("34kfx", PROCESSOR_24KF1_1, 33, 0)
 MIPS_CPU ("34kx", PROCESSOR_24KF1_1, 33, 0)
+MIPS_CPU ("34kn", PROCESSOR_24KC, 33, 0)  /* 34K with MT but no DSP.  */
 
 MIPS_CPU ("74kc", PROCESSOR_74KC, 33, 0) /* 74K with DSPr2.  */
 MIPS_CPU ("74kf2_1", PROCESSOR_74KF2_1, 33, 0)
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h	(revision 189989)
+++ config/mips/mips.h	(working copy)
@@ -715,7 +715,7 @@  struct mips_cpu_info {
 #define MIPS_ARCH_FLOAT_SPEC \
   "%{mhard-float|msoft-float|mno-float|march=mips*:; \
      march=vr41*|march=m4k|march=4k*|march=24kc|march=24kec \
-     |march=34kc|march=74kc|march=1004kc|march=5kc \
+     |march=34kc|march=34kn|march=74kc|march=1004kc|march=5kc \
      |march=octeon|march=xlr: -msoft-float;		  \
      march=*: -mhard-float}"
 
@@ -763,7 +763,7 @@  struct mips_cpu_info {
 /* A spec that infers the -mdsp setting from an -march argument.  */
 #define BASE_DRIVER_SELF_SPECS \
   "%{!mno-dsp: \
-     %{march=24ke*|march=34k*|march=1004k*: -mdsp} \
+     %{march=24ke*|march=34kc*|march=34kf*|march=34kx*|march=1004k*: -mdsp} \
      %{march=74k*:%{!mno-dspr2: -mdspr2 -mdsp}}}"
 
 #define DRIVER_SELF_SPECS BASE_DRIVER_SELF_SPECS