aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorMark Shinwell <shinwell@codesourcery.com>2006-12-08 16:37:42 +0000
committerMark Shinwell <shinwell@gcc.gnu.org>2006-12-08 16:37:42 +0000
commitb9a76028a260e2a9cd5aae533f260144b9665a8b (patch)
treecb12e5af227339490abf2dd166a38d46008b2ef1 /gcc/config
parent00509c04eeb8e0656ed93021c905293e1d01dc64 (diff)
downloadgcc-b9a76028a260e2a9cd5aae533f260144b9665a8b.zip
gcc-b9a76028a260e2a9cd5aae533f260144b9665a8b.tar.gz
gcc-b9a76028a260e2a9cd5aae533f260144b9665a8b.tar.bz2
recog.c (mode_dependent_address_p): Identify pre-increment...
gcc/ * recog.c (mode_dependent_address_p): Identify pre-increment, pre-decrement, post-increment and post-decrement addressing as always being mode-dependent. * config/m32c/m32c.c (m32c_mode_dependent_address): Delete. * config/m32c/m32c.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/m32c/m32c-protos.h (m32c_mode_dependent_address): Delete. * config/m32r/m32r.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete PRE_DEC, PRE_INC and POST_INC checks. * config/i386/i386.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/sh/sh.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/pdp11/pdp11.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/avr/avr.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/c4x/c4x.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete PRE_DEC, PRE_INC, POST_DEC and POST_INC cases. * config/stormy16/stormy16.c (xstormy16_mode_dependent_address_p): Delete POST_INC and PRE_DEC cases. * config/m68hc11/m68hc11.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/cris/cris.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/mn10300/mn10300.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/ia64/ia64.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/m68k/m68k.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/rs6000/rs6000.c (rs6000_mode_dependent_address): Delete PRE_INC and PRE_DEC cases. * config/arc/arc.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/mcore/mcore.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/arm/arm.h (ARM_GO_IF_MODE_DEPENDENT_ADDRESS): Delete. (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/pa/pa.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. * config/vax/vax.c (vax_mode_dependent_address_p): Delete auto-increment cases. * config/h8300/h8300.h (GO_IF_MODE_DEPENDENT_ADDRESS): Delete auto-increment cases. * config/bfin/bfin.h (GO_IF_MODE_DEPENDENT_ADDRESS): Change to no-op. gcc/testsuite/ * gcc.c-torture/execute/mode-dependent-address.c: New test. From-SVN: r119660
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/arc/arc.h7
-rw-r--r--gcc/config/avr/avr.h4
-rw-r--r--gcc/config/bfin/bfin.h8
-rw-r--r--gcc/config/c4x/c4x.h7
-rw-r--r--gcc/config/cris/cris.h11
-rw-r--r--gcc/config/crx/crx.h6
-rw-r--r--gcc/config/h8300/h8300.h5
-rw-r--r--gcc/config/i386/i386.h10
-rw-r--r--gcc/config/ia64/ia64.h4
-rw-r--r--gcc/config/m32c/m32c-protos.h1
-rw-r--r--gcc/config/m32c/m32c.c9
-rw-r--r--gcc/config/m32c/m32c.h4
-rw-r--r--gcc/config/m32r/m32r.h5
-rw-r--r--gcc/config/m68hc11/m68hc11.h7
-rw-r--r--gcc/config/m68k/m68k.h6
-rw-r--r--gcc/config/mcore/mcore.h7
-rw-r--r--gcc/config/mn10300/mn10300.h4
-rw-r--r--gcc/config/pa/pa.h7
-rw-r--r--gcc/config/pdp11/pdp11.h8
-rw-r--r--gcc/config/rs6000/rs6000.c4
-rw-r--r--gcc/config/sh/sh.h10
-rw-r--r--gcc/config/stormy16/stormy16.c4
-rw-r--r--gcc/config/vax/vax.c4
23 files changed, 32 insertions, 110 deletions
diff --git a/gcc/config/arc/arc.h b/gcc/config/arc/arc.h
index c7253b1..9b9f2d6 100644
--- a/gcc/config/arc/arc.h
+++ b/gcc/config/arc/arc.h
@@ -799,12 +799,7 @@ do { \
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-{ if (GET_CODE (ADDR) == PRE_DEC) \
- goto LABEL; \
- if (GET_CODE (ADDR) == PRE_INC) \
- goto LABEL; \
-}
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
/* Given a comparison code (EQ, NE, etc.) and the first operand of a COMPARE,
return the mode to be used for the comparison. */
diff --git a/gcc/config/avr/avr.h b/gcc/config/avr/avr.h
index 48a5933..724a213 100644
--- a/gcc/config/avr/avr.h
+++ b/gcc/config/avr/avr.h
@@ -423,9 +423,7 @@ do { \
} \
} while(0)
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \
- goto LABEL
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
#define LEGITIMATE_CONSTANT_P(X) 1
diff --git a/gcc/config/bfin/bfin.h b/gcc/config/bfin/bfin.h
index bbf3ade..9b9b78a 100644
--- a/gcc/config/bfin/bfin.h
+++ b/gcc/config/bfin/bfin.h
@@ -827,13 +827,7 @@ do { \
You may assume that ADDR is a valid address for the machine.
*/
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
-do { \
- if (GET_CODE (ADDR) == POST_INC \
- || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_DEC) \
- goto LABEL; \
-} while (0)
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
#define NOTICE_UPDATE_CC(EXPR, INSN) 0
diff --git a/gcc/config/c4x/c4x.h b/gcc/config/c4x/c4x.h
index 22904e1..6df7ac8 100644
--- a/gcc/config/c4x/c4x.h
+++ b/gcc/config/c4x/c4x.h
@@ -1156,13 +1156,8 @@ CUMULATIVE_ARGS;
}
/* No mode-dependent addresses on the C4x are autoincrements. */
-
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
- if (GET_CODE (ADDR) == PRE_DEC \
- || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_INC \
- || GET_CODE (ADDR) == POST_INC \
- || GET_CODE (ADDR) == POST_MODIFY \
+ if (GET_CODE (ADDR) == POST_MODIFY \
|| GET_CODE (ADDR) == PRE_MODIFY) \
goto LABEL
diff --git a/gcc/config/cris/cris.h b/gcc/config/cris/cris.h
index 10a17dc..88bc3e1 100644
--- a/gcc/config/cris/cris.h
+++ b/gcc/config/cris/cris.h
@@ -1065,14 +1065,9 @@ struct cum_args {int regs;};
while (0)
/* In CRIS, only the postincrement address mode depends thus,
- since the increment depends on the size of the operand. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
- do \
- { \
- if (GET_CODE (ADDR) == POST_INC) \
- goto LABEL; \
- } \
- while (0)
+ since the increment depends on the size of the operand. This is now
+ treated generically within recog.c. */
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
#define LEGITIMATE_CONSTANT_P(X) 1
diff --git a/gcc/config/crx/crx.h b/gcc/config/crx/crx.h
index 9277a28d..d482bb3 100644
--- a/gcc/config/crx/crx.h
+++ b/gcc/config/crx/crx.h
@@ -405,11 +405,7 @@ struct cumulative_args
}
#endif /* REG_OK_STRICT */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-{ \
- if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == POST_DEC) \
- goto LABEL; \
-}
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
#define LEGITIMATE_CONSTANT_P(X) 1
diff --git a/gcc/config/h8300/h8300.h b/gcc/config/h8300/h8300.h
index cf64b09..7c9a241 100644
--- a/gcc/config/h8300/h8300.h
+++ b/gcc/config/h8300/h8300.h
@@ -939,11 +939,6 @@ struct cum_arg
(the amount of decrement or increment being the length of the operand). */
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
- if (GET_CODE (ADDR) == POST_INC \
- || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_INC \
- || GET_CODE (ADDR) == PRE_DEC) \
- goto LABEL; \
if (GET_CODE (ADDR) == PLUS \
&& h8300_get_index (XEXP (ADDR, 0), VOIDmode, 0) != XEXP (ADDR, 0)) \
goto LABEL;
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 78b963b..dc15a2b 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1767,13 +1767,9 @@ do { \
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
On the 80386, only postdecrement and postincrement address depend thus
- (the amount of decrement or increment being the length of the operand). */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
-do { \
- if (GET_CODE (ADDR) == POST_INC \
- || GET_CODE (ADDR) == POST_DEC) \
- goto LABEL; \
-} while (0)
+ (the amount of decrement or increment being the length of the operand).
+ These are now caught in recog.c. */
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
/* Max number of args passed in registers. If this is more than 3, we will
have problems with ebx (register #4), since it is a caller save register and
diff --git a/gcc/config/ia64/ia64.h b/gcc/config/ia64/ia64.h
index 327a313..c6d2c0d 100644
--- a/gcc/config/ia64/ia64.h
+++ b/gcc/config/ia64/ia64.h
@@ -1406,9 +1406,7 @@ do { \
on the machine mode of the memory reference it is used for or if the address
is valid for some modes but not others. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
- if (GET_CODE (ADDR) == POST_DEC || GET_CODE (ADDR) == POST_INC) \
- goto LABEL;
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL)
/* A C expression that is nonzero if X is a legitimate constant for an
immediate operand on the target machine. */
diff --git a/gcc/config/m32c/m32c-protos.h b/gcc/config/m32c/m32c-protos.h
index 06bd007..4b3ead3 100644
--- a/gcc/config/m32c/m32c-protos.h
+++ b/gcc/config/m32c/m32c-protos.h
@@ -84,7 +84,6 @@ int m32c_legitimize_reload_address (rtx *, MM, int, int, int);
rtx m32c_libcall_value (MM);
int m32c_limit_reload_class (MM, int);
int m32c_memory_move_cost (MM, int, int);
-int m32c_mode_dependent_address (rtx);
int m32c_modes_tieable_p (MM, MM);
bool m32c_mov_ok (rtx *, MM);
char * m32c_output_compare (rtx, rtx *);
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index dcfbe6e..de5f22a 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -2018,15 +2018,6 @@ m32c_legitimize_reload_address (rtx * x,
return 0;
}
-/* Used in GO_IF_MODE_DEPENDENT_ADDRESS. */
-int
-m32c_mode_dependent_address (rtx addr)
-{
- if (GET_CODE (addr) == POST_INC || GET_CODE (addr) == PRE_DEC)
- return 1;
- return 0;
-}
-
/* Implements LEGITIMATE_CONSTANT_P. We split large constants anyway,
so we can allow anything. */
int
diff --git a/gcc/config/m32c/m32c.h b/gcc/config/m32c/m32c.h
index 1b1d357..1055464 100644
--- a/gcc/config/m32c/m32c.h
+++ b/gcc/config/m32c/m32c.h
@@ -568,9 +568,7 @@ typedef struct m32c_cumulative_args
if (m32c_legitimize_reload_address(&(X),MODE,OPNUM,TYPE,IND_LEVELS)) \
goto win;
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (m32c_mode_dependent_address (ADDR)) \
- goto LABEL;
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
#define LEGITIMATE_CONSTANT_P(X) m32c_legitimate_constant_p (X)
diff --git a/gcc/config/m32r/m32r.h b/gcc/config/m32r/m32r.h
index beef7c9..b4c9ae6 100644
--- a/gcc/config/m32r/m32r.h
+++ b/gcc/config/m32r/m32r.h
@@ -1267,10 +1267,7 @@ L2: .word STATIC
#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR, LABEL) \
do \
{ \
- if ( GET_CODE (ADDR) == PRE_DEC \
- || GET_CODE (ADDR) == PRE_INC \
- || GET_CODE (ADDR) == POST_INC \
- || GET_CODE (ADDR) == LO_SUM) \
+ if (GET_CODE (ADDR) == LO_SUM) \
goto LABEL; \
} \
while (0)
diff --git a/gcc/config/m68hc11/m68hc11.h b/gcc/config/m68hc11/m68hc11.h
index 008887b..a1dc509 100644
--- a/gcc/config/m68hc11/m68hc11.h
+++ b/gcc/config/m68hc11/m68hc11.h
@@ -1239,12 +1239,7 @@ extern unsigned char m68hc11_reg_valid_for_index[FIRST_PSEUDO_REGISTER];
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
-{ \
- if (GET_CODE (ADDR) == PRE_DEC || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_INC || GET_CODE (ADDR) == POST_INC) \
- goto LABEL; \
-}
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
diff --git a/gcc/config/m68k/m68k.h b/gcc/config/m68k/m68k.h
index e4d9257..0a04beb 100644
--- a/gcc/config/m68k/m68k.h
+++ b/gcc/config/m68k/m68k.h
@@ -845,9 +845,9 @@ __transfer_from_trampoline () \
goto WIN; }}}
/* On the 68000, only predecrement and postincrement address depend thus
- (the amount of decrement or increment being the length of the operand). */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) goto LABEL
+ (the amount of decrement or increment being the length of the operand).
+ These are now treated generically in recog.c. */
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
#define CASE_VECTOR_MODE HImode
#define CASE_VECTOR_PC_RELATIVE 1
diff --git a/gcc/config/mcore/mcore.h b/gcc/config/mcore/mcore.h
index fd1ba70..5e2d8ca 100644
--- a/gcc/config/mcore/mcore.h
+++ b/gcc/config/mcore/mcore.h
@@ -786,12 +786,7 @@ extern const enum reg_class reg_class_from_letter[];
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
-{ \
- if ( GET_CODE (ADDR) == PRE_DEC || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_INC || GET_CODE (ADDR) == POST_INC) \
- goto LABEL; \
-}
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
diff --git a/gcc/config/mn10300/mn10300.h b/gcc/config/mn10300/mn10300.h
index ef153e7..6c511522 100644
--- a/gcc/config/mn10300/mn10300.h
+++ b/gcc/config/mn10300/mn10300.h
@@ -779,9 +779,7 @@ while (0)
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (GET_CODE (ADDR) == POST_INC) \
- goto LABEL
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
/* Nonzero if the constant value X is a legitimate general operand.
It is given that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
diff --git a/gcc/config/pa/pa.h b/gcc/config/pa/pa.h
index 1f57650..f463faf 100644
--- a/gcc/config/pa/pa.h
+++ b/gcc/config/pa/pa.h
@@ -1560,12 +1560,7 @@ do { \
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- if (GET_CODE (ADDR) == PRE_DEC \
- || GET_CODE (ADDR) == POST_DEC \
- || GET_CODE (ADDR) == PRE_INC \
- || GET_CODE (ADDR) == POST_INC) \
- goto LABEL
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
#define TARGET_ASM_SELECT_SECTION pa_select_section
diff --git a/gcc/config/pdp11/pdp11.h b/gcc/config/pdp11/pdp11.h
index 09de325..2850fc2 100644
--- a/gcc/config/pdp11/pdp11.h
+++ b/gcc/config/pdp11/pdp11.h
@@ -760,12 +760,10 @@ extern int may_call_alloca;
/* Go to LABEL if ADDR (a legitimate address expression)
has an effect that depends on the machine mode it is used for.
- On the pdp this is for predec/postinc */
+ On the pdp this is for predec/postinc, and this is now treated
+ generically in recog.c. */
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
- { if (GET_CODE (ADDR) == POST_INC || GET_CODE (ADDR) == PRE_DEC) \
- goto LABEL; \
- }
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
/* Specify the machine mode that this machine uses
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 08b3d01..a773483 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -3766,9 +3766,7 @@ rs6000_mode_dependent_address (rtx addr)
case LO_SUM:
return true;
- case PRE_INC:
- case PRE_DEC:
- return TARGET_UPDATE;
+ /* Auto-increment cases are now treated generically in recog.c. */
default:
break;
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index 5f8412f..ae9d8f9 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -2802,13 +2802,11 @@ struct sh_args {
??? Strictly speaking, we should also include all indexed addressing,
because the index scale factor is the length of the operand.
However, the impact of GO_IF_MODE_DEPENDENT_ADDRESS would be to
- high if we did that. So we rely on reload to fix things up. */
+ high if we did that. So we rely on reload to fix things up.
-#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL) \
-{ \
- if (GET_CODE(ADDR) == PRE_DEC || GET_CODE(ADDR) == POST_INC) \
- goto LABEL; \
-}
+ Auto-increment addressing is now treated in recog.c. */
+
+#define GO_IF_MODE_DEPENDENT_ADDRESS(ADDR,LABEL)
/* Specify the machine mode that this machine uses
for the index in the tablejump instruction. */
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 00b6e64..5f8be43 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -707,9 +707,7 @@ xstormy16_mode_dependent_address_p (rtx x)
if (GET_CODE (x) == PLUS)
x = XEXP (x, 0);
- if (GET_CODE (x) == POST_INC
- || GET_CODE (x) == PRE_DEC)
- return 1;
+ /* Auto-increment addresses are now treated generically in recog.c. */
return 0;
}
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index f005a2a..5ce9ad3 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -1306,8 +1306,8 @@ vax_mode_dependent_address_p (rtx x)
{
rtx xfoo0, xfoo1;
- if (GET_CODE (x) == POST_INC || GET_CODE (x) == PRE_DEC)
- return 1;
+ /* Auto-increment cases are now dealt with generically in recog.c. */
+
if (GET_CODE (x) != PLUS)
return 0;