This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] Patch to add basic VR4130 support


This patch adds basic VR4130 support to the MIPS port.  The scheduler
and related optimisations will follow later.

Tested on mips64vrel-elf, applied to trunk.

Richard


	* config/mips/mips.h (PROCESSOR_R4130): New processor_type.
	(TARGET_MIPS4130): New macro.
	(ISA_HAS_MACC): Return true if TARGET_MIPS4130 && !TARGET_MIPS16.
	* config/mips/mips.c (mips_cpu_info_table): Add a vr4130 entry.
	(override_options): Extend MIPS_MARCH_CONTROLS_SOFT_FLOAT to deal
	with PROCESSOR_R4130.
	* config/mips/mips.md (define_attr cpu): Add r4130.
	* doc/invoke.texi: Document vr4130 as a supported MIPS architecture.

Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.327
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.327 mips.h
--- config/mips/mips.h	11 Mar 2004 20:02:16 -0000	1.327
+++ config/mips/mips.h	23 Mar 2004 09:50:30 -0000
@@ -57,6 +57,7 @@ enum processor_type {
   PROCESSOR_R4100,
   PROCESSOR_R4111,
   PROCESSOR_R4120,
+  PROCESSOR_R4130,
   PROCESSOR_R4300,
   PROCESSOR_R4600,
   PROCESSOR_R4650,
@@ -321,6 +322,7 @@ #define ISA_MIPS64                  (mip
 #define TARGET_MIPS3900             (mips_arch == PROCESSOR_R3900)
 #define TARGET_MIPS4000             (mips_arch == PROCESSOR_R4000)
 #define TARGET_MIPS4120             (mips_arch == PROCESSOR_R4120)
+#define TARGET_MIPS4130             (mips_arch == PROCESSOR_R4130)
 #define TARGET_MIPS5400             (mips_arch == PROCESSOR_R5400)
 #define TARGET_MIPS5500             (mips_arch == PROCESSOR_R5500)
 #define TARGET_MIPS7000             (mips_arch == PROCESSOR_R7000)
@@ -883,6 +885,7 @@ #define ISA_HAS_MSAC            (TARGET_
 /* ISA has three operand multiply instructions that  the result
    from a 4th operand and puts the result in an accumulator.  */
 #define ISA_HAS_MACC            ((TARGET_MIPS4120 && !TARGET_MIPS16)	\
+                                 || (TARGET_MIPS4130 && !TARGET_MIPS16)	\
                                  || TARGET_MIPS5400                     \
                                  || TARGET_MIPS5500                     \
                                  || TARGET_SR71K                        \
Index: config/mips/mips.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.c,v
retrieving revision 1.397
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.397 mips.c
--- config/mips/mips.c	16 Mar 2004 09:22:34 -0000	1.397
+++ config/mips/mips.c	23 Mar 2004 09:50:32 -0000
@@ -646,6 +646,7 @@ const struct mips_cpu_info mips_cpu_info
   { "vr4100", PROCESSOR_R4100, 3 },
   { "vr4111", PROCESSOR_R4111, 3 },
   { "vr4120", PROCESSOR_R4120, 3 },
+  { "vr4130", PROCESSOR_R4130, 3 },
   { "vr4300", PROCESSOR_R4300, 3 },
   { "r4400", PROCESSOR_R4000, 3 }, /* = r4000 */
   { "r4600", PROCESSOR_R4600, 3 },
@@ -4657,6 +4658,7 @@ override_options (void)
 	case PROCESSOR_R4100:
 	case PROCESSOR_R4111:
 	case PROCESSOR_R4120:
+	case PROCESSOR_R4130:
 	  target_flags |= MASK_SOFT_FLOAT;
 	  break;
 
Index: config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
retrieving revision 1.227
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.227 mips.md
--- config/mips/mips.md	18 Mar 2004 23:47:31 -0000	1.227
+++ config/mips/mips.md	23 Mar 2004 09:50:34 -0000
@@ -219,7 +219,7 @@ (define_attr "length" ""
 ;; Attribute describing the processor.  This attribute must match exactly
 ;; with the processor_type enumeration in mips.h.
 (define_attr "cpu"
-  "default,4kc,5kc,20kc,m4k,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sr71000"
+  "default,4kc,5kc,20kc,m4k,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,sb1,sr71000"
   (const (symbol_ref "mips_tune")))
 
 ;; The type of hardware hazard associated with this instruction.
Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.432
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.432 invoke.texi
--- doc/invoke.texi	24 Mar 2004 09:36:44 -0000	1.432
+++ doc/invoke.texi	24 Mar 2004 09:55:42 -0000
@@ -7757,7 +7757,7 @@ The processor names are:
 @samp{rm9000},
 @samp{orion},
 @samp{sb1},
-@samp{vr4100}, @samp{vr4111}, @samp{vr4120}, @samp{vr4300},
+@samp{vr4100}, @samp{vr4111}, @samp{vr4120}, @samp{vr4130}, @samp{vr4300},
 @samp{vr5000}, @samp{vr5400} and @samp{vr5500}.
 The special value @samp{from-abi} selects the
 most compatible architecture for the selected ABI (that is,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]