aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-02-12 00:49:04 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-11 17:49:04 -0700
commit3520cdec817a18b86eaaa019b6d98d8261487372 (patch)
treead26035c66306b5a8be515286cce48265032b483 /gcc
parent49f79f8209d68ca0ac30d2581da2d45cc7054ef3 (diff)
downloadgcc-3520cdec817a18b86eaaa019b6d98d8261487372.zip
gcc-3520cdec817a18b86eaaa019b6d98d8261487372.tar.gz
gcc-3520cdec817a18b86eaaa019b6d98d8261487372.tar.bz2
reload.c (find_reloads_address_1): Fix handling of an autoincremented pseudo which is homed in the stack.
* reload.c (find_reloads_address_1): Fix handling of an autoincremented pseudo which is homed in the stack. From-SVN: r25162
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/reload.c8
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c0e107e..0863f1d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
Fri Feb 12 00:51:26 1999 Jeffrey A Law (law@cygnus.com)
+ * reload.c (find_reloads_address_1): Fix handling of an autoincremented
+ pseudo which is homed in the stack.
+
* mips.c (save_restore_insns): Fix loop to save/restore FP registers.
(compute_frame_size): Change loop over FP regs to be consistent
with the loop in save_restore_insns.
diff --git a/gcc/reload.c b/gcc/reload.c
index aa16d10..9959942 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -5334,6 +5334,14 @@ find_reloads_address_1 (mode, x, context, loc, opnum, type, ind_levels, insn)
(context ? INDEX_REG_CLASS : BASE_REG_CLASS),
GET_MODE (x), GET_MODE (x), 0, 0,
opnum, RELOAD_OTHER);
+
+ /* If we created a new MEM based on reg_equiv_mem[REGNO], then
+ LOC above is part of the new MEM, not the MEM in INSN.
+
+ We must also replace the address of the MEM in INSN. */
+ if (&XEXP (x_orig, 0) != loc)
+ push_replacement (&XEXP (x_orig, 0), reloadnum, VOIDmode);
+
}
else
{