[PATCH] Fix MIPS bootstrap after new enum comparison warning

Adam Nemet anemet@caviumnetworks.com
Sat Apr 18 07:53:00 GMT 2009


Along the lines of the s390 fix:

  http://gcc.gnu.org/ml/gcc-patches/2009-04/msg01343.html

OK if bootstrapping completes on mips64octeon-linux?  (It's already in stage
3.)

Adam


	* config/mips/mips.h (mips_tune_attr): New macro.
	* config/mips/mips.md (cpu): Use it.

Index: mips.h
===================================================================
--- mips.h	(revision 146303)
+++ mips.h	(working copy)
@@ -3463,3 +3463,7 @@ extern enum mips_code_readable_setting m
 
 #define FINAL_PRESCAN_INSN(INSN, OPVEC, NOPERANDS)	\
   mips_final_prescan_insn (INSN, OPVEC, NOPERANDS)
+
+/* This is necessary to avoid a warning about comparing different enum
+   types.  */
+#define mips_tune_attr ((enum attr_cpu) mips_tune)
Index: mips.md
===================================================================
--- mips.md	(revision 146303)
+++ mips.md	(working copy)
@@ -571,7 +571,7 @@ (define_attr "length" ""
 ;; with the processor_type enumeration in mips.h.
 (define_attr "cpu"
   "r3000,4kc,4kp,5kc,5kf,20kc,24kc,24kf2_1,24kf1_1,74kc,74kf2_1,74kf1_1,74kf3_2,loongson_2e,loongson_2f,m4k,octeon,r3900,r6000,r4000,r4100,r4111,r4120,r4130,r4300,r4600,r4650,r5000,r5400,r5500,r7000,r8000,r9000,r10000,sb1,sb1a,sr71000,xlr"
-  (const (symbol_ref "mips_tune")))
+  (const (symbol_ref "mips_tune_attr")))
 
 ;; The type of hardware hazard associated with this instruction.
 ;; DELAY means that the next instruction cannot read the result



More information about the Gcc-patches mailing list