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]

[addrmodes] Provide boolean REG_STRICT_P


Some ports already use something like that. The name was taken from ARM.

Committed to branch.

Paolo
2006-08-21  Paolo Bonzini  <bonzini@gnu.org>

	* reload.c (REG_STRICT_P): New.
	* Makefile.in (cs-tm.h): Define REG_STRICT_P to 0.
	* config/alpha/alpha.h (GO_IF_LEGITIMATE_ADDRESS): Unify definition.
	* config/avr/avr.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/bfin/bfin.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/crx/crx.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/c4x/c4x.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/fr30/fr30.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/h8300/h8300.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/mips/mips.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/mt/mt.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/iq2000/iq2000.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/m68hc11/m68hc11.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/xstormy16/xstormy16.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/i386/i386.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/s390/s390.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.
	* config/sparc/sparc.h (GO_IF_LEGITIMATE_ADDRESS, EXTRA_CONSTRAINT):
	Likewise.
	* config/vax/vax.h (GO_IF_LEGITIMATE_ADDRESS): Likewise.

	* config/arm/arm.h (REG_STRICT_P): Do not define.
	* config/frv/frv.h (REG_OK_STRICT_P): Remove.
	(GO_IF_LEGITIMATE_ADDRESS): Use REG_STRICT_P instead.
	* config/m32c/m32c.h (REG_OK_STRICT_V): Remove.
	(GO_IF_LEGITIMATE_ADDRESS): Use REG_STRICT_P instead.
	* config/mn10300/mn10300.h (REG_STRICT): Remove.
	(REGNO_OK_FOR_BIT_BASE_P, REGNO_OK_FOR_BASE_P, REGNO_OK_FOR_INDEX_P,
	GO_IF_LEGITIMATE_ADDRESS): Use REG_STRICT_P instead.
	* config/mmix/mmix.h (MMIX_REG_OK_STRICT): Remove.
	(EXTRA_CONSTRAINT, GO_IF_LEGITIMATE_ADDRESS): Use REG_STRICT_P instead.
	* config/rs6000/rs6000.h (REG_OK_STRICT_FLAG): Remove.
	(REG_OK_FOR_BASE_P, REG_OK_FOR_INDEX_P, GO_IF_LEGITIMATE_ADDRESS):
	Use REG_STRICT_P instead.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 116286)
+++ Makefile.in	(working copy)
@@ -1208,7 +1208,7 @@ cs-tconfig.h: Makefile
 
 cs-tm.h: Makefile
 	TARGET_CPU_DEFAULT="$(target_cpu_default)" \
-	HEADERS="$(tm_include_list)" DEFINES="$(tm_defines)" \
+	HEADERS="$(tm_include_list)" DEFINES="$(tm_defines) REG_STRICT_P=0" \
 	$(SHELL) $(srcdir)/mkconfig.sh tm.h
 
 cs-tm_p.h: Makefile
Index: reload.c
===================================================================
--- reload.c	(revision 116286)
+++ reload.c	(working copy)
@@ -87,6 +87,7 @@ an ordinary operand, it is classified as
 a register with any other reload.  */
 
 #define REG_OK_STRICT
+#define REG_STRICT_P 1
 
 #include "config.h"
 #include "system.h"
Index: config/alpha/alpha.h
===================================================================
--- config/alpha/alpha.h	(revision 116286)
+++ config/alpha/alpha.h	(working copy)
@@ -1088,19 +1088,11 @@ do {						\
 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression that is a
    valid memory address for an instruction.  */
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)	\
 do {						\
-  if (alpha_legitimate_address_p (MODE, X, 1))	\
+  if (alpha_legitimate_address_p (MODE, X, REG_STRICT_P))	\
     goto WIN;					\
 } while (0)
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)	\
-do {						\
-  if (alpha_legitimate_address_p (MODE, X, 0))	\
-    goto WIN;					\
-} while (0)
-#endif
 
 /* Try machine-dependent ways of modifying an illegitimate address
    to be legitimate.  If we find one, return the new, valid address.
Index: config/frv/frv.h
===================================================================
--- config/frv/frv.h	(revision 116286)
+++ config/frv/frv.h	(working copy)
@@ -2075,16 +2075,10 @@ __asm__("\n"								\
    definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
    `PRINT_OPERAND_ADDRESS'.  */
 
-#ifdef REG_OK_STRICT
-#define REG_OK_STRICT_P 1
-#else
-#define REG_OK_STRICT_P 0
-#endif
-
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)			\
   do									\
     {									\
-      if (frv_legitimate_address_p (MODE, X, REG_OK_STRICT_P,		\
+      if (frv_legitimate_address_p (MODE, X, REG_STRICT_P,		\
  				    FALSE, FALSE))			\
 	goto LABEL;							\
     }									\
Index: config/s390/s390.h
===================================================================
--- config/s390/s390.h	(revision 116286)
+++ config/s390/s390.h	(working copy)
@@ -709,19 +709,11 @@ CUMULATIVE_ARGS;
    valid memory address for an instruction.
    The MODE argument is the machine mode for the MEM expression
    that wants to use this address.  */
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
 {                                                                       \
-  if (legitimate_address_p (MODE, X, 1))                                \
+  if (legitimate_address_p (MODE, X, REG_STRICT_P))                     \
     goto ADDR;                                                          \
 }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)                         \
-{                                                                       \
-  if (legitimate_address_p (MODE, X, 0))                                \
-    goto ADDR;                                                          \
-}
-#endif
 
 /* Try machine-dependent ways of modifying an illegitimate address
    to be legitimate.  If we find one, return the new, valid address.
Index: config/m32c/m32c.h
===================================================================
--- config/m32c/m32c.h	(revision 116286)
+++ config/m32c/m32c.h	(working copy)
@@ -543,19 +543,11 @@ typedef struct m32c_cumulative_args
 #define CONSTANT_ADDRESS_P(X) CONSTANT_P(X)
 #define MAX_REGS_PER_ADDRESS 1
 
-/* This is passed to the macros below, so that they can be implemented
-   in m32c.c.  */
-#ifdef REG_OK_STRICT
-#define REG_OK_STRICT_V 1
-#else
-#define REG_OK_STRICT_V 0
-#endif
-
 #define GO_IF_LEGITIMATE_ADDRESS(MODE,X,LABEL) \
-	if (m32c_legitimate_address_p (MODE, X, REG_OK_STRICT_V)) \
+	if (m32c_legitimate_address_p (MODE, X, REG_STRICT_P)) \
 	  goto LABEL;
 
-#define REG_OK_FOR_BASE_P(X) m32c_reg_ok_for_base_p (X, REG_OK_STRICT_V)
+#define REG_OK_FOR_BASE_P(X) m32c_reg_ok_for_base_p (X, REG_STRICT_P)
 #define REG_OK_FOR_INDEX_P(X) 0
 
 /* #define FIND_BASE_TERM(X) when we do unspecs for symrefs */
Index: config/sparc/sparc.h
===================================================================
--- config/sparc/sparc.h	(revision 116286)
+++ config/sparc/sparc.h	(working copy)
@@ -1889,15 +1889,6 @@ do {									\
    or if it is a pseudo reg.  */
 #define REG_OK_FOR_BASE_P(X)  REG_OK_FOR_INDEX_P (X)
 
-/* 'T', 'U' are for aligned memory loads which aren't needed for arch64.
-   'W' is like 'T' but is assumed true on arch64.
-
-   Remember to accept pseudo-registers for memory constraints if reload is
-   in progress.  */
-
-#define EXTRA_CONSTRAINT(OP, C) \
-	sparc_extra_constraint_check(OP, C, 0)
-
 #else
 
 /* Nonzero if X is a hard reg that can be used as an index.  */
@@ -1905,10 +1896,17 @@ do {									\
 /* Nonzero if X is a hard reg that can be used as a base reg.  */
 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
 
+#endif
+
+/* 'T', 'U' are for aligned memory loads which aren't needed for arch64.
+   'W' is like 'T' but is assumed true on arch64.
+
+   Remember to accept pseudo-registers for memory constraints if reload is
+   in progress.  */
+
 #define EXTRA_CONSTRAINT(OP, C) \
-	sparc_extra_constraint_check(OP, C, 1)
+	sparc_extra_constraint_check(OP, C, REG_STRICT_P)
 
-#endif
 
 /* Should gcc use [%reg+%lo(xx)+offset] addresses?  */
 
@@ -1948,19 +1946,11 @@ do {									\
 #define RTX_OK_FOR_OLO10_P(X)						\
   (GET_CODE (X) == CONST_INT && INTVAL (X) >= -0x1000 && INTVAL (X) < 0xc00 - 8)
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		\
 {							\
-  if (legitimate_address_p (MODE, X, 1))		\
+  if (legitimate_address_p (MODE, X, REG_STRICT_P))		\
     goto ADDR;						\
 }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		\
-{							\
-  if (legitimate_address_p (MODE, X, 0))		\
-    goto ADDR;						\
-}
-#endif
 
 /* Go to LABEL if ADDR (a legitimate address expression)
    has an effect that depends on the machine mode it is used for.
Index: config/i386/i386.h
===================================================================
--- config/i386/i386.h	(revision 116286)
+++ config/i386/i386.h	(working copy)
@@ -1633,22 +1633,12 @@ typedef struct ix86_args {
 
 #define LEGITIMATE_CONSTANT_P(X)  legitimate_constant_p (X)
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
 do {									\
-  if (legitimate_address_p ((MODE), (X), 1))				\
+  if (legitimate_address_p ((MODE), (X), REG_STRICT_P))				\
     goto ADDR;								\
 } while (0)
 
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
-do {									\
-  if (legitimate_address_p ((MODE), (X), 0))				\
-    goto ADDR;								\
-} while (0)
-
-#endif
-
 /* If defined, a C expression to determine the base term of address X.
    This macro is used in only one place: `find_base_term' in alias.c.
 
Index: config/avr/avr.h
===================================================================
--- config/avr/avr.h	(revision 116286)
+++ config/avr/avr.h	(working copy)
@@ -341,19 +341,11 @@ extern int avr_reg_order[];
 
 #define MAX_REGS_PER_ADDRESS 1
 
-#ifdef REG_OK_STRICT
-#  define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR)	\
-{							\
-  if (legitimate_address_p (mode, operand, 1))		\
-    goto ADDR;						\
-}
-#  else
 #  define GO_IF_LEGITIMATE_ADDRESS(mode, operand, ADDR)	\
 {							\
-  if (legitimate_address_p (mode, operand, 0))		\
+  if (legitimate_address_p (mode, operand, REG_STRICT_P))		\
     goto ADDR;						\
 }
-#endif
 
 #define REG_OK_FOR_BASE_NOSTRICT_P(X) \
   (REGNO (X) >= FIRST_PSEUDO_REGISTER || REG_OK_FOR_BASE_STRICT_P(X))
Index: config/crx/crx.h
===================================================================
--- config/crx/crx.h	(revision 116286)
+++ config/crx/crx.h	(working copy)
@@ -391,19 +391,11 @@ struct cumulative_args
 #define REG_OK_FOR_INDEX_P(X)	1
 #endif /* REG_OK_STRICT */
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)			\
 {									\
-  if (crx_legitimate_address_p (MODE, X, 1))				\
+  if (crx_legitimate_address_p (MODE, X, REG_STRICT_P))				\
       goto LABEL;							\
 }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)			\
-{									\
-  if (crx_legitimate_address_p (MODE, X, 0))				\
-      goto LABEL;							\
-}
-#endif /* REG_OK_STRICT */
 
 #define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)			\
 {									\
Index: config/c4x/c4x.h
===================================================================
--- config/c4x/c4x.h	(revision 116286)
+++ config/c4x/c4x.h	(working copy)
@@ -1062,12 +1062,6 @@ CUMULATIVE_ARGS;
 
 #define REG_OK_FOR_INDEX_P(X) IS_INDEX_OR_PSEUDO_REG(X)
 
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
-{									\
-  if (c4x_legitimate_address_p (MODE, X, 0))				\
-    goto ADDR;								\
-}
-
 #else
 
 /* Nonzero if X is a hard reg that can be used as an index.  */
@@ -1078,14 +1072,14 @@ CUMULATIVE_ARGS;
 
 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
 
+#endif
+
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)				\
 {									\
-  if (c4x_legitimate_address_p (MODE, X, 1))				\
+  if (c4x_legitimate_address_p (MODE, X, REG_STRICT_P))				\
     goto ADDR;								\
 }
 
-#endif
-
 #define LEGITIMIZE_ADDRESS(X, OLDX, MODE, WIN) \
 {									\
   rtx new;								\
Index: config/stormy16/stormy16.h
===================================================================
--- config/stormy16/stormy16.h	(revision 116286)
+++ config/stormy16/stormy16.h	(working copy)
@@ -552,19 +552,11 @@ enum reg_class
 
 #define MAX_REGS_PER_ADDRESS 1
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)	\
 do {							\
-  if (xstormy16_legitimate_address_p (MODE, X, 1))	\
+  if (xstormy16_legitimate_address_p (MODE, X, REG_STRICT_P))	\
     goto LABEL;						\
 } while (0)
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)	\
-do {							\
-  if (xstormy16_legitimate_address_p (MODE, X, 0))	\
-    goto LABEL;						\
-} while (0)
-#endif
 
 #ifdef REG_OK_STRICT
 #define REG_OK_FOR_BASE_P(X) 						   \
Index: config/fr30/fr30.h
===================================================================
--- config/fr30/fr30.h	(revision 116286)
+++ config/fr30/fr30.h	(working copy)
@@ -834,29 +834,6 @@ do										\
 
    At the moment we only support the first two of these special cases.  */
    
-#ifdef REG_OK_STRICT
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)			\
-  do									\
-    {									\
-      if (GET_CODE (X) == REG && REG_OK_FOR_BASE_P (X))			\
-        goto LABEL;							\
-      if (GET_CODE (X) == PLUS						\
-	  && ((MODE) == SImode || (MODE) == SFmode)			\
-	  && GET_CODE (XEXP (X, 0)) == REG				\
-          && REGNO (XEXP (X, 0)) == STACK_POINTER_REGNUM		\
-	  && GET_CODE (XEXP (X, 1)) == CONST_INT			\
-	  && IN_RANGE (INTVAL (XEXP (X, 1)), 0, (1 <<  6) - 4))		\
-	goto LABEL;							\
-      if (GET_CODE (X) == PLUS						\
-	  && ((MODE) == SImode || (MODE) == SFmode)			\
-	  && GET_CODE (XEXP (X, 0)) == REG				\
-          && REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM		\
-	  && GET_CODE (XEXP (X, 1)) == CONST_INT			\
-	  && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4))	\
-        goto LABEL;							\
-    }									\
-  while (0)
-#else
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)			\
   do									\
     {									\
@@ -873,13 +850,12 @@ do										\
 	  && ((MODE) == SImode || (MODE) == SFmode)			\
 	  && GET_CODE (XEXP (X, 0)) == REG				\
           && (REGNO (XEXP (X, 0)) == FRAME_POINTER_REGNUM		\
-	      || REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM)		\
+	      || (!REG_STRICT_P && REGNO (XEXP (X, 0)) == ARG_POINTER_REGNUM))		\
 	  && GET_CODE (XEXP (X, 1)) == CONST_INT			\
 	  && IN_RANGE (INTVAL (XEXP (X, 1)), -(1 << 9), (1 <<  9) - 4))	\
         goto LABEL;							\
     }									\
   while (0)
-#endif
 
 /* A C expression that is nonzero if X (assumed to be a `reg' RTX) is valid for
    use as a base register.  For hard registers, it should always accept those
Index: config/m68hc11/m68hc11.h
===================================================================
--- config/m68hc11/m68hc11.h	(revision 116286)
+++ config/m68hc11/m68hc11.h	(working copy)
@@ -1180,17 +1180,10 @@ extern unsigned char m68hc11_reg_valid_f
 	&& SP_REG_P (XEXP (X, 0)))
 
 /* Go to ADDR if X is a valid address.  */
-#ifndef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
 { \
-  if (m68hc11_go_if_legitimate_address ((X), (MODE), 0)) goto ADDR; \
-}
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		 \
-{							 \
-  if (m68hc11_go_if_legitimate_address ((X), (MODE), 1)) goto ADDR; \
+  if (m68hc11_go_if_legitimate_address ((X), (MODE), REG_STRICT_P)) goto ADDR; \
 }
-#endif
 
 /* The macros REG_OK_FOR..._P assume that the arg is a REG rtx and check its
    validity for a certain class.  We have two alternate definitions for each
Index: config/iq2000/iq2000.h
===================================================================
--- config/iq2000/iq2000.h	(revision 116286)
+++ config/iq2000/iq2000.h	(working copy)
@@ -533,19 +533,11 @@ typedef struct iq2000_args
 
 #define MAX_REGS_PER_ADDRESS 1
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		\
   {							\
-    if (iq2000_legitimate_address_p (MODE, X, 1))	\
+    if (iq2000_legitimate_address_p (MODE, X, REG_STRICT_P))	\
       goto ADDR;					\
   }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)		\
-  {							\
-    if (iq2000_legitimate_address_p (MODE, X, 0))	\
-      goto ADDR;					\
-  }
-#endif
 
 #define REG_OK_FOR_INDEX_P(X) 0
 
Index: config/mt/mt.h
===================================================================
--- config/mt/mt.h	(revision 116286)
+++ config/mt/mt.h	(working copy)
@@ -624,19 +624,11 @@ extern struct mt_frame_info current_fram
    number that `GO_IF_LEGITIMATE_ADDRESS' would ever accept.  */
 #define MAX_REGS_PER_ADDRESS 1
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
 {						\
-  if (mt_legitimate_address_p (MODE, X, 1))	\
+  if (mt_legitimate_address_p (MODE, X, REG_STRICT_P))	\
     goto ADDR;					\
 }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
-{						\
-  if (mt_legitimate_address_p (MODE, X, 0))	\
-    goto ADDR;					\
-}
-#endif
 
 #ifdef REG_OK_STRICT
 #define REG_OK_FOR_BASE_P(X) mt_reg_ok_for_base_p (X, 1)
Index: config/mn10300/mn10300.h
===================================================================
--- config/mn10300/mn10300.h	(revision 116286)
+++ config/mn10300/mn10300.h	(working copy)
@@ -345,12 +345,6 @@ enum reg_class {
    Since they use reg_renumber, they are safe only once reg_renumber
    has been allocated, which happens in local-alloc.c.  */
 
-#ifndef REG_OK_STRICT
-# define REG_STRICT 0
-#else
-# define REG_STRICT 1
-#endif
-
 # define REGNO_IN_RANGE_P(regno,min,max,strict) \
   (IN_RANGE ((regno), (min), (max)) 		\
    || ((strict)					\
@@ -382,21 +376,21 @@ enum reg_class {
    || REGNO_ADDRESS_P ((regno), (strict)) \
    || REGNO_EXTENDED_P ((regno), (strict)))
 #define REGNO_OK_FOR_BASE_P(regno) \
-  (REGNO_STRICT_OK_FOR_BASE_P ((regno), REG_STRICT))
+  (REGNO_STRICT_OK_FOR_BASE_P ((regno), REG_STRICT_P))
 #define REG_OK_FOR_BASE_P(X) \
   (REGNO_OK_FOR_BASE_P (REGNO (X)))
 
 #define REGNO_STRICT_OK_FOR_BIT_BASE_P(regno, strict) \
   (REGNO_SP_P ((regno), (strict)) || REGNO_ADDRESS_P ((regno), (strict)))
 #define REGNO_OK_FOR_BIT_BASE_P(regno) \
-  (REGNO_STRICT_OK_FOR_BIT_BASE_P ((regno), REG_STRICT))
+  (REGNO_STRICT_OK_FOR_BIT_BASE_P ((regno), REG_STRICT_P))
 #define REG_OK_FOR_BIT_BASE_P(X) \
   (REGNO_OK_FOR_BIT_BASE_P (REGNO (X)))
 
 #define REGNO_STRICT_OK_FOR_INDEX_P(regno, strict) \
   (REGNO_DATA_P ((regno), (strict)) || REGNO_EXTENDED_P ((regno), (strict)))
 #define REGNO_OK_FOR_INDEX_P(regno) \
-  (REGNO_STRICT_OK_FOR_INDEX_P ((regno), REG_STRICT))
+  (REGNO_STRICT_OK_FOR_INDEX_P ((regno), REG_STRICT_P))
 #define REG_OK_FOR_INDEX_P(X) \
   (REGNO_OK_FOR_INDEX_P (REGNO (X)))
 
@@ -749,7 +743,7 @@ struct cum_arg {int nbytes; };
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)    	\
 do							\
   {							\
-    if (legitimate_address_p ((MODE), (X), REG_STRICT))	\
+    if (legitimate_address_p ((MODE), (X), REG_STRICT_P))	\
       goto ADDR;					\
   }							\
 while (0) 
Index: config/rs6000/rs6000.h
===================================================================
--- config/rs6000/rs6000.h	(revision 116286)
+++ config/rs6000/rs6000.h	(working copy)
@@ -1616,12 +1616,6 @@ typedef struct rs6000_args
    After reload, it makes no difference, since pseudo regs have
    been eliminated by then.  */
 
-#ifdef REG_OK_STRICT
-# define REG_OK_STRICT_FLAG 1
-#else
-# define REG_OK_STRICT_FLAG 0
-#endif
-
 /* Nonzero if X is a hard reg that can be used as an index
    or if it is a pseudo reg in the non-strict case.  */
 #define INT_REG_OK_FOR_INDEX_P(X, STRICT)			\
@@ -1634,8 +1628,8 @@ typedef struct rs6000_args
   ((!(STRICT) && REGNO (X) >= FIRST_PSEUDO_REGISTER)		\
    || REGNO_OK_FOR_BASE_P (REGNO (X)))
 
-#define REG_OK_FOR_INDEX_P(X) INT_REG_OK_FOR_INDEX_P (X, REG_OK_STRICT_FLAG)
-#define REG_OK_FOR_BASE_P(X)  INT_REG_OK_FOR_BASE_P (X, REG_OK_STRICT_FLAG)
+#define REG_OK_FOR_INDEX_P(X) INT_REG_OK_FOR_INDEX_P (X, REG_STRICT_P)
+#define REG_OK_FOR_BASE_P(X)  INT_REG_OK_FOR_BASE_P (X, REG_STRICT_P)
 
 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
    that is a valid memory address for an instruction.
@@ -1656,7 +1650,7 @@ typedef struct rs6000_args
    during assembly output.  */
 
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)			\
-{ if (rs6000_legitimate_address (MODE, X, REG_OK_STRICT_FLAG))	\
+{ if (rs6000_legitimate_address (MODE, X, REG_STRICT_P))	\
     goto ADDR;							\
 }
 
Index: config/arm/arm.h
===================================================================
--- config/arm/arm.h	(revision 116286)
+++ config/arm/arm.h	(working copy)
@@ -1913,8 +1913,6 @@ typedef struct
 	   || (X) == hard_frame_pointer_rtx	\
 	   || (X) == arg_pointer_rtx)))
 
-#define REG_STRICT_P 0
-
 #else /* REG_OK_STRICT */
 
 #define ARM_REG_OK_FOR_BASE_P(X) 		\
@@ -1923,8 +1921,6 @@ typedef struct
 #define THUMB_REG_MODE_OK_FOR_BASE_P(X, MODE)	\
   THUMB_REGNO_MODE_OK_FOR_BASE_P (REGNO (X), MODE)
 
-#define REG_STRICT_P 1
-
 #endif /* REG_OK_STRICT */
 
 /* Now define some helpers in terms of the above.  */
Index: config/mips/mips.h
===================================================================
--- config/mips/mips.h	(revision 116286)
+++ config/mips/mips.h	(working copy)
@@ -2136,19 +2136,11 @@ typedef struct mips_args {
 
 #define MAX_REGS_PER_ADDRESS 1
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
 {						\
-  if (mips_legitimate_address_p (MODE, X, 1))	\
+  if (mips_legitimate_address_p (MODE, X, REG_STRICT_P))	\
     goto ADDR;					\
 }
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
-{						\
-  if (mips_legitimate_address_p (MODE, X, 0))	\
-    goto ADDR;					\
-}
-#endif
 
 /* Check for constness inline but use mips_legitimate_address_p
    to check whether a constant really is an address.  */
Index: config/vax/vax.h
===================================================================
--- config/vax/vax.h	(revision 116286)
+++ config/vax/vax.h	(working copy)
@@ -571,11 +571,6 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_
    or if it is a pseudo reg.  */
 #define REG_OK_FOR_BASE_P(X) 1
 
-/* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
-   that is a valid memory address for an instruction.  */
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
-  { if (legitimate_address_p ((MODE), (X), 0)) goto ADDR; }
-
 #else
 
 /* Nonzero if X is a hard reg that can be used as an index.  */
@@ -584,12 +579,12 @@ enum reg_class { NO_REGS, ALL_REGS, LIM_
 /* Nonzero if X is a hard reg that can be used as a base reg.  */
 #define REG_OK_FOR_BASE_P(X) REGNO_OK_FOR_BASE_P (REGNO (X))
 
+#endif
+
 /* GO_IF_LEGITIMATE_ADDRESS recognizes an RTL expression
    that is a valid memory address for an instruction.  */
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
-  { if (legitimate_address_p ((MODE), (X), 1)) goto ADDR; }
-
-#endif
+  { if (legitimate_address_p ((MODE), (X), REG_STRICT_P)) goto ADDR; }
 
 /* Go to LABEL if ADDR (a legitimate address expression)
    has an effect that depends on the machine mode it is used for.  */
Index: config/h8300/h8300.h
===================================================================
--- config/h8300/h8300.h	(revision 116286)
+++ config/h8300/h8300.h	(working copy)
@@ -914,23 +914,13 @@ struct cum_arg
   ((C) == 'W')
 
 
-#ifndef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
   do						\
     {						\
-      if (h8300_legitimate_address_p ((MODE), (X), 0))	\
+      if (h8300_legitimate_address_p ((MODE), (X), REG_STRICT_P))	\
 	goto ADDR;				\
     }						\
   while (0)
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR)	\
-  do						\
-    {						\
-      if (h8300_legitimate_address_p ((MODE), (X), 1))	\
-	goto ADDR;				\
-    }						\
-  while (0)
-#endif
 
 /* Go to LABEL if ADDR (a legitimate address expression)
    has an effect that depends on the machine mode it is used for.
Index: config/mmix/mmix.h
===================================================================
--- config/mmix/mmix.h	(revision 116286)
+++ config/mmix/mmix.h	(working copy)
@@ -72,12 +72,6 @@ Boston, MA 02110-1301, USA.  */
    untouched by the epilogue".  */
 #define MMIX_EH_RETURN_STACKADJ_REGNUM MMIX_STATIC_CHAIN_REGNUM
 
-#ifdef REG_OK_STRICT
-# define MMIX_REG_OK_STRICT 1
-#else
-# define MMIX_REG_OK_STRICT 0
-#endif
-
 #define MMIX_FUNCTION_ARG_SIZE(MODE, TYPE) \
  ((MODE) != BLKmode ? GET_MODE_SIZE (MODE) : int_size_in_bytes (TYPE))
 
@@ -523,7 +517,7 @@ enum reg_class
  mmix_const_ok_for_letter_p (VALUE, C)
 
 #define EXTRA_CONSTRAINT(VALUE, C)	\
- mmix_extra_constraint (VALUE, C, MMIX_REG_OK_STRICT)
+ mmix_extra_constraint (VALUE, C, REG_STRICT_P)
 
 /* Do we need anything serious here?  Yes, any FLOT constant.  */
 #define CONST_DOUBLE_OK_FOR_LETTER_P(VALUE, C)			\
@@ -703,7 +697,7 @@ typedef struct { int regs; int lib; } CU
 #define MAX_REGS_PER_ADDRESS 2
 
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, LABEL)		\
- if (mmix_legitimate_address (MODE, X, MMIX_REG_OK_STRICT))	\
+ if (mmix_legitimate_address (MODE, X, REG_STRICT_P))	\
    goto LABEL
 
 #ifndef REG_OK_STRICT
Index: config/bfin/bfin.h
===================================================================
--- config/bfin/bfin.h	(revision 116286)
+++ config/bfin/bfin.h	(working copy)
@@ -759,19 +759,11 @@ typedef struct {
 #define LEGITIMATE_MODE_FOR_AUTOINC_P(MODE) \
       (GET_MODE_SIZE (MODE) <= 4 || (MODE) == PDImode)
 
-#ifdef REG_OK_STRICT
 #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)		\
   do {							\
-    if (bfin_legitimate_address_p (MODE, X, 1))		\
+    if (bfin_legitimate_address_p (MODE, X, REG_STRICT_P))		\
       goto WIN;						\
   } while (0);
-#else
-#define GO_IF_LEGITIMATE_ADDRESS(MODE, X, WIN)		\
-  do {							\
-    if (bfin_legitimate_address_p (MODE, X, 0))		\
-      goto WIN;						\
-  } while (0);
-#endif
 
 /* Try machine-dependent ways of modifying an illegitimate address
    to be legitimate.  If we find one, return the new, valid address.

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