Commit b53ef1a2 by Nick Clifton Committed by Nick Clifton

Allow the (scratch) frame pointer to be initialised from the stack pointer

plus a constant.

From-SVN: r38466
parent 8230f5e2
2000-12-22 Nick Clifton <nickc@redhat.com>
* dwarf2out_frame_debug_expr: Allow the (scratch) frame
pointer to be initialised from the stack pointer plus a
constant.
2000-12-22 Bernd Schmidt <bernds@redhat.com> 2000-12-22 Bernd Schmidt <bernds@redhat.com>
* regrename.c (struct du_chain): New field "earlyclobber". * regrename.c (struct du_chain): New field "earlyclobber".
......
...@@ -1355,16 +1355,27 @@ dwarf2out_frame_debug_expr (expr, label) ...@@ -1355,16 +1355,27 @@ dwarf2out_frame_debug_expr (expr, label)
} }
else else
{ {
if (GET_CODE (src) != PLUS if (GET_CODE (src) != PLUS)
|| XEXP (src, 1) != stack_pointer_rtx)
abort (); abort ();
if (GET_CODE (XEXP (src, 0)) != REG
|| (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg) if (GET_CODE (XEXP (src, 0)) == REG
abort (); && REGNO (XEXP (src, 0)) == cfa.reg
if (cfa.reg != STACK_POINTER_REGNUM) && GET_CODE (XEXP (src, 1)) == CONST_INT)
abort (); /* Setting the FP (or a scratch that will be copied into the FP
cfa_store.reg = REGNO (dest); later on) from SP + const. */
cfa_store.offset = cfa.offset - cfa_temp_value; cfa.reg = REGNO (dest);
else
{
if (XEXP (src, 1) != stack_pointer_rtx)
abort ();
if (GET_CODE (XEXP (src, 0)) != REG
|| (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg)
abort ();
if (cfa.reg != STACK_POINTER_REGNUM)
abort ();
cfa_store.reg = REGNO (dest);
cfa_store.offset = cfa.offset - cfa_temp_value;
}
} }
break; break;
......
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