aboutsummaryrefslogtreecommitdiff
path: root/gcc/regrename.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@redhat.com>2001-01-04 14:17:40 +0000
committerBernd Schmidt <bernds@gcc.gnu.org>2001-01-04 14:17:40 +0000
commitf4d578da666c948839a56e141071b0ee9c50f555 (patch)
tree730a0d4118a0999cf159752ac960ad1c37f3249e /gcc/regrename.c
parent03b9ab42612740a5db1047dfbe57a89dd51cb3cb (diff)
downloadgcc-f4d578da666c948839a56e141071b0ee9c50f555.zip
gcc-f4d578da666c948839a56e141071b0ee9c50f555.tar.gz
gcc-f4d578da666c948839a56e141071b0ee9c50f555.tar.bz2
Some tidyups for ia64 problems
From-SVN: r38682
Diffstat (limited to 'gcc/regrename.c')
-rw-r--r--gcc/regrename.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/regrename.c b/gcc/regrename.c
index bb45f3a..ae25e21 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -248,7 +248,13 @@ regrename_optimize ()
}
#endif
- if (fixed_regs[reg] || global_regs[reg])
+ if (fixed_regs[reg] || global_regs[reg]
+#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
+ || (frame_pointer_needed && reg == HARD_FRAME_POINTER_REGNUM)
+#else
+ || (frame_pointer_needed && reg == FRAME_POINTER_REGNUM)
+#endif
+ )
continue;
COPY_HARD_REG_SET (this_unavailable, unavailable);
@@ -351,7 +357,8 @@ do_replace (chain, reg)
{
unsigned int regno = ORIGINAL_REGNO (*chain->loc);
*chain->loc = gen_raw_REG (GET_MODE (*chain->loc), reg);
- ORIGINAL_REGNO (*chain->loc) = regno;
+ if (regno >= FIRST_PSEUDO_REGISTER)
+ ORIGINAL_REGNO (*chain->loc) = regno;
chain = chain->next_use;
}
}