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,8 +1355,18 @@ dwarf2out_frame_debug_expr (expr, label) ...@@ -1355,8 +1355,18 @@ 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 ();
if (GET_CODE (XEXP (src, 0)) == REG
&& REGNO (XEXP (src, 0)) == cfa.reg
&& GET_CODE (XEXP (src, 1)) == CONST_INT)
/* Setting the FP (or a scratch that will be copied into the FP
later on) from SP + const. */
cfa.reg = REGNO (dest);
else
{
if (XEXP (src, 1) != stack_pointer_rtx)
abort (); abort ();
if (GET_CODE (XEXP (src, 0)) != REG if (GET_CODE (XEXP (src, 0)) != REG
|| (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg) || (unsigned) REGNO (XEXP (src, 0)) != cfa_temp_reg)
...@@ -1366,6 +1376,7 @@ dwarf2out_frame_debug_expr (expr, label) ...@@ -1366,6 +1376,7 @@ dwarf2out_frame_debug_expr (expr, label)
cfa_store.reg = REGNO (dest); cfa_store.reg = REGNO (dest);
cfa_store.offset = cfa.offset - cfa_temp_value; cfa_store.offset = cfa.offset - cfa_temp_value;
} }
}
break; break;
case CONST_INT: case CONST_INT:
......
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