Commit c77fbfbe by Geoffrey Keating Committed by Geoffrey Keating

reload1.c (eliminate_regs_in_insn): When updating a set to the frame pointer to…

reload1.c (eliminate_regs_in_insn): When updating a set to the frame pointer to the hardware frame pointer...

	* reload1.c (eliminate_regs_in_insn): When updating a set
	to the frame pointer to the hardware frame pointer, perform
	the update always not just when REPLACE is set.

From-SVN: r44161
parent eb4d554e
2001-07-19 Geoffrey Keating <geoffk@redhat.com> 2001-07-19 Geoffrey Keating <geoffk@redhat.com>
* reload1.c (eliminate_regs_in_insn): When updating a set
to the frame pointer to the hardware frame pointer, perform
the update always not just when REPLACE is set.
* reload1.c (choose_reload_regs): Don't inherit a reload * reload1.c (choose_reload_regs): Don't inherit a reload
that crosses multiple registers if registers past the first that crosses multiple registers if registers past the first
don't fit in the desired class. don't fit in the desired class.
......
...@@ -2962,11 +2962,19 @@ eliminate_regs_in_insn (insn, replace) ...@@ -2962,11 +2962,19 @@ eliminate_regs_in_insn (insn, replace)
if (ok) if (ok)
{ {
if (replace)
{
rtx src rtx src
= plus_constant (ep->to_rtx, offset - ep->offset); = plus_constant (ep->to_rtx, offset - ep->offset);
new_body = old_body;
if (! replace)
{
new_body = copy_insn (old_body);
if (REG_NOTES (insn))
REG_NOTES (insn) = copy_insn_1 (REG_NOTES (insn));
}
PATTERN (insn) = new_body;
old_set = single_set (insn);
/* First see if this insn remains valid when we /* First see if this insn remains valid when we
make the change. If not, keep the INSN_CODE make the change. If not, keep the INSN_CODE
the same and let reload fit it up. */ the same and let reload fit it up. */
...@@ -2978,7 +2986,6 @@ eliminate_regs_in_insn (insn, replace) ...@@ -2978,7 +2986,6 @@ eliminate_regs_in_insn (insn, replace)
SET_SRC (old_set) = src; SET_SRC (old_set) = src;
SET_DEST (old_set) = ep->to_rtx; SET_DEST (old_set) = ep->to_rtx;
} }
}
val = 1; val = 1;
goto done; goto done;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment