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]

M32R: Fix LEGITIMATE_CONSTANT_P


Hi Guys,

  Whilst checking the M32R port for the IRA_COVER_CLASS change I came
  across an ICE due to a problem with the definition of
  LEGITIMATE_CONSTANT_P in m32r.h, so I am checking in the patch below
  to fix it.

Cheers
  Nick

gcc/ChangeLog
2008-08-29  Nick Clifton  <nickc@redhat.com>

	* config/m32r/m32r.h (LEGITIMATE_CONSTANT_P): Treat LABEL_REFs in
	the same way as SYMBOL_REFs.

Index: gcc/config/m32r/m32r.h
===================================================================
--- gcc/config/m32r/m32r.h	(revision 139723)
+++ gcc/config/m32r/m32r.h	(working copy)
@@ -1072,7 +1072,7 @@
 #define LEGITIMATE_CONSTANT_P(X)					\
   (! (GET_CODE (X) == CONST						\
       && GET_CODE (XEXP (X, 0)) == PLUS					\
-      && GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF			\
+      && (GET_CODE (XEXP (XEXP (X, 0), 0)) == SYMBOL_REF || GET_CODE (XEXP (XEXP (X, 0), 0)) == LABEL_REF) \
       && GET_CODE (XEXP (XEXP (X, 0), 1)) == CONST_INT			\
       && (unsigned HOST_WIDE_INT) INTVAL (XEXP (XEXP (X, 0), 1)) > 32767))
 


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