+2002-08-08 Lars Brinkhoff <lars@nocrew.org>
+ Richard Henderson <rth@redhat.com>
+
+ * emit-rtl.c (gen_rtx_REG): After reload, only return
+ frame_pointer_rtx or hard_frame_pointer_rtx if frame_pointer_needed.
+
2002-08-08 Jakub Jelinek <jakub@redhat.com>
* config/rs6000/rs6000-protos.h (rs6000_field_alignment): Remove.
if (mode == Pmode && !reload_in_progress)
{
- if (regno == FRAME_POINTER_REGNUM)
+ if (regno == FRAME_POINTER_REGNUM
+ && (!reload_completed || frame_pointer_needed))
return frame_pointer_rtx;
#if FRAME_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
- if (regno == HARD_FRAME_POINTER_REGNUM)
+ if (regno == HARD_FRAME_POINTER_REGNUM
+ && (!reload_completed || frame_pointer_needed))
return hard_frame_pointer_rtx;
#endif
#if FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM && HARD_FRAME_POINTER_REGNUM != ARG_POINTER_REGNUM
This code is disabled for now until we can fix the various backends
which depend on having non-shared hard registers in some cases. Long
term we want to re-enable this code as it can significantly cut down
- on the amount of useless RTL that gets generated. */
+ on the amount of useless RTL that gets generated.
+
+ We'll also need to fix some code that runs after reload that wants to
+ set ORIGINAL_REGNO. */
+
if (cfun
&& cfun->emit
&& regno_reg_rtx