stmt.c: (expand_goto): Set hard_frame_pointer_rtx when restoring the frame.
authorDoug Evans <dje@gnu.org>
Fri, 24 Sep 1993 19:56:05 +0000 (19:56 +0000)
committerDoug Evans <dje@gnu.org>
Fri, 24 Sep 1993 19:56:05 +0000 (19:56 +0000)
* stmt.c: (expand_goto): Set hard_frame_pointer_rtx when restoring
the frame.  Use it when restoring other registers.
(expand_end_bindings): ARG_POINTER_REGNUM will be eliminated into
HARD_FRAME_POINTER_REGNUM, not FRAME_POINTER_REGNUM; adjust code accordingly.

From-SVN: r5468

gcc/stmt.c

index 11acaa4468020f607a977b05164921f4556466eb..799f9be39cf36757e4eae802a6d8b9f0915586f7 100644 (file)
@@ -726,7 +726,7 @@ expand_goto (label)
             to the location of the function's incoming static chain info.
             The non-local goto handler will then adjust it to contain the
             proper value and reload the argument pointer, if needed.  */
-         emit_move_insn (frame_pointer_rtx, lookup_static_chain (label));
+         emit_move_insn (hard_frame_pointer_rtx, lookup_static_chain (label));
 
          /* We have now loaded the frame pointer hardware register with
             the address of that corresponds to the start of the virtual
@@ -737,21 +737,22 @@ expand_goto (label)
             which will do any cleanups and then jump to the label.  */
          addr = copy_rtx (p->nonlocal_goto_handler_slot);
          temp = copy_to_reg (replace_rtx (addr, virtual_stack_vars_rtx,
-                                          frame_pointer_rtx));
+                                          hard_frame_pointer_rtx));
          
          /* Restore the stack pointer.  Note this uses fp just restored.  */
          addr = p->nonlocal_goto_stack_level;
          if (addr)
            addr = replace_rtx (copy_rtx (addr),
-                               virtual_stack_vars_rtx, frame_pointer_rtx);
+                               virtual_stack_vars_rtx,
+                               hard_frame_pointer_rtx);
 
          emit_stack_restore (SAVE_NONLOCAL, addr, NULL_RTX);
 
          /* Put in the static chain register the nonlocal label address.  */
          emit_move_insn (static_chain_rtx, label_ref);
-         /* USE of frame_pointer_rtx added for consistency; not clear if
+         /* USE of hard_frame_pointer_rtx added for consistency; not clear if
             really needed.  */
-         emit_insn (gen_rtx (USE, VOIDmode, frame_pointer_rtx));
+         emit_insn (gen_rtx (USE, VOIDmode, hard_frame_pointer_rtx));
          emit_insn (gen_rtx (USE, VOIDmode, stack_pointer_rtx));
          emit_insn (gen_rtx (USE, VOIDmode, static_chain_rtx));
          emit_indirect_jump (temp);
@@ -3144,7 +3145,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
           decrementing fp by STARTING_FRAME_OFFSET.  */
        emit_move_insn (virtual_stack_vars_rtx, frame_pointer_rtx);
 
-#if ARG_POINTER_REGNUM != FRAME_POINTER_REGNUM
+#if ARG_POINTER_REGNUM != HARD_FRAME_POINTER_REGNUM
       if (fixed_regs[ARG_POINTER_REGNUM])
        {
 #ifdef ELIMINABLE_REGS
@@ -3158,7 +3159,7 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
 
          for (i = 0; i < sizeof elim_regs / sizeof elim_regs[0]; i++)
            if (elim_regs[i].from == ARG_POINTER_REGNUM
-               && elim_regs[i].to == FRAME_POINTER_REGNUM)
+               && elim_regs[i].to == HARD_FRAME_POINTER_REGNUM)
              break;
 
          if (i == sizeof elim_regs / sizeof elim_regs [0])