summaryrefslogtreecommitdiff
path: root/gcc/local-alloc.c
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-24 19:49:18 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>1993-09-24 19:49:18 +0000
commit4c956bf6c197ec767d01e85c096e17df41bd5899 (patch)
tree3346de9647b6304a4f481f16f26e18600b133ba7 /gcc/local-alloc.c
parentc7cac72efe944603ae61ac2c65e5a0e310bfbe5a (diff)
downloadgcc-4c956bf6c197ec767d01e85c096e17df41bd5899.tar.gz
* local-alloc.c: (find_free_reg): Make sure we will always be able
to eliminate FRAME_POINTER_REGNUM into HARD_FRAME_POINTER_REGNUM. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@5460 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/local-alloc.c')
-rw-r--r--gcc/local-alloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 00c06e804ad..d626fd7d004 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -1945,6 +1945,11 @@ find_free_reg (class, mode, qty, accept_call_clobbered, just_try_suggested,
#ifdef ELIMINABLE_REGS
for (i = 0; i < sizeof eliminables / sizeof eliminables[0]; i++)
SET_HARD_REG_BIT (used, eliminables[i].from);
+#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
+ /* If FRAME_POINTER_REGNUM is not a real register, then protect the one
+ that it might be eliminated into. */
+ SET_HARD_REG_BIT (used, HARD_FRAME_POINTER_REGNUM);
+#endif
#else
SET_HARD_REG_BIT (used, FRAME_POINTER_REGNUM);
#endif