summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-14 10:20:48 +0000
committerechristo <echristo@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-14 10:20:48 +0000
commit100d52d8c937939d726851bd7f68a4908ebfa0ae (patch)
tree4ac88036dba89bbd0e0bd6453ac93f1c0401a94a
parentf008c4c823fc8e6dfcefee2b81983ce9b6979e83 (diff)
downloadppe42-gcc-100d52d8c937939d726851bd7f68a4908ebfa0ae.tar.gz
ppe42-gcc-100d52d8c937939d726851bd7f68a4908ebfa0ae.zip
2003-11-14 Eric Christopher <echristo@redhat.com>
* reload1.c (reload): Revert previous patch. Make check for assignment into reg_equiv_address stricter. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73595 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/reload1.c16
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 15bd740bfa3..41450e28841 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-14 Eric Christopher <echristo@redhat.com>
+
+ * reload1.c (reload): Revert previous patch. Make
+ check for assignment into reg_equiv_address stricter.
+
2003-11-14 Arnaud Charlet <charlet@act-europe.fr>
* Makefile.in (POSTSTAGE1_FLAGS_TO_PASS): Pass ADAFLAGS.
@@ -37,8 +42,8 @@
2003-11-13 Andrew Pinski <apinski@apple.com>
- * config/darwin.c (machopic_output_possible_stub_label):
- Allow stub symbol be not defined when outputting possible
+ * config/darwin.c (machopic_output_possible_stub_label):
+ Allow stub symbol be not defined when outputting possible
stub label.
2003-11-13 Kazu Hirata <kazu@cs.umass.edu>
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 7bfc142ba95..5851dbfb931 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -774,12 +774,6 @@ reload (rtx first, int global)
= force_const_mem (GET_MODE (SET_DEST (set)), x);
if (!reg_equiv_memory_loc[i])
continue;
- /* As above. Later passes of reload assume that
- all addresses found in the reg_equiv_* arrays
- were originally legitimate. */
- if (!memory_operand (reg_equiv_memory_loc[i], VOIDmode))
- reg_equiv_memory_loc[i] = NULL_RTX;
-
}
}
else
@@ -916,18 +910,24 @@ reload (rtx first, int global)
if (reg_renumber[i] < 0 && reg_equiv_memory_loc[i])
{
rtx x = eliminate_regs (reg_equiv_memory_loc[i], 0, NULL_RTX);
+ enum reg_class class = MODE_BASE_REG_CLASS (GET_MODE (x));
if (strict_memory_address_p (GET_MODE (regno_reg_rtx[i]),
XEXP (x, 0)))
reg_equiv_mem[i] = x, reg_equiv_address[i] = 0;
- else if (CONSTANT_P (XEXP (x, 0))
+ else if ((CONSTANT_P (x)
+ && LEGITIMATE_CONSTANT_P (x)
+ && PREFERRED_RELOAD_CLASS (x, class) != NO_REGS)
|| (GET_CODE (XEXP (x, 0)) == REG
&& REGNO (XEXP (x, 0)) < FIRST_PSEUDO_REGISTER)
|| (GET_CODE (XEXP (x, 0)) == PLUS
&& GET_CODE (XEXP (XEXP (x, 0), 0)) == REG
&& (REGNO (XEXP (XEXP (x, 0), 0))
< FIRST_PSEUDO_REGISTER)
- && CONSTANT_P (XEXP (XEXP (x, 0), 1))))
+ && (CONSTANT_P (XEXP (XEXP (x, 0), 1))
+ && LEGITIMATE_CONSTANT_P (XEXP (XEXP (x, 0), 1))
+ && PREFERRED_RELOAD_CLASS (XEXP (XEXP (x, 0), 1), class)
+ != NO_REGS)))
reg_equiv_address[i] = XEXP (x, 0), reg_equiv_mem[i] = 0;
else
{
OpenPOWER on IntegriCloud