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]

[mips patch RFA] fix enum processor_type vs. "cpu" attrdifferences.


Added missing entries to define_attr "cpu" and re-ordered mis-ordered
entries.  Since it looks like people are going to insert entries into
the middle of "enum processor_type" (i.e., rather than tacking them on
to the end), it seems to me that the entries (excluding default)
should be sorted.  This patch does that.  (Nothing in the code uses
r{4,5,20}kc names for the "cpu" attr, either, so tweaked them to match
the PROCESSOR_* names.)

build mips-elf and ran make check against the simulator with and
without the change, no diff.

changelog format cribbed from earlier changelog entries, since i
wasn't really sure what to do with the define_attr cpu thang.  8-)



cgd
--
2003-02-18  Chris Demetriou  <cgd@broadcom.com>

	* config/mips/mips.h (enum processor_type): Sort entries
	alphabetically.
	* config/mips/mips.md (define_attr cpu): Sync with processor_type
	enum values, including adding entries that were missing.

Index: config/mips/mips.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.h,v
retrieving revision 1.238
diff -u -p -r1.238 mips.h
--- config/mips/mips.h	31 Jan 2003 23:34:16 -0000	1.238
+++ config/mips/mips.h	18 Feb 2003 19:56:51 -0000
@@ -58,6 +58,10 @@ enum delay_type {
 
 enum processor_type {
   PROCESSOR_DEFAULT,
+  PROCESSOR_4KC,
+  PROCESSOR_5KC,
+  PROCESSOR_20KC,
+  PROCESSOR_M4K,
   PROCESSOR_R3000,
   PROCESSOR_R3900,
   PROCESSOR_R6000,
@@ -72,12 +76,8 @@ enum processor_type {
   PROCESSOR_R5400,
   PROCESSOR_R5500,
   PROCESSOR_R8000,
-  PROCESSOR_4KC,
-  PROCESSOR_5KC,
-  PROCESSOR_20KC,
-  PROCESSOR_M4K,
-  PROCESSOR_SR71000,
-  PROCESSOR_SB1
+  PROCESSOR_SB1,
+  PROCESSOR_SR71000
 };
 
 /* Recast the cpu class to be the cpu attribute.  */
Index: config/mips/mips.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/mips.md,v
retrieving revision 1.162
diff -u -p -r1.162 mips.md
--- config/mips/mips.md	8 Jan 2003 19:57:49 -0000	1.162
+++ config/mips/mips.md	18 Feb 2003 19:56:52 -0000
@@ -125,7 +125,7 @@
 
 ;; ??? Fix everything that tests this attribute.
 (define_attr "cpu"
-  "default,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4300,r4600,r4650,r5000,r5400,r5500,r8000,sr71000,r4kc,r5kc,r20kc"
+  "default,4kc,5kc,20kc,m4k,r3000,r3900,r6000,r4000,r4100,r4111,r4120,r4300,r4600,r4650,r5000,r5400,r5500,r8000,sb1,sr71000"
   (const (symbol_ref "mips_cpu_attr")))
 
 ;; Does the instruction have a mandatory delay slot?


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