mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-25 17:29:47 +08:00
dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the frame pointer in the prologue.
/ * dwarf2out.c (dwarf2out_frame_debug): Handle adjustments of the frame pointer in the prologue. From-SVN: r17131
This commit is contained in:
parent
913b5d5489
commit
63d96a9559
@ -1221,6 +1221,39 @@ dwarf2out_frame_debug (insn)
|
|||||||
if (cfa_store_reg == STACK_POINTER_REGNUM)
|
if (cfa_store_reg == STACK_POINTER_REGNUM)
|
||||||
cfa_store_offset += offset;
|
cfa_store_offset += offset;
|
||||||
}
|
}
|
||||||
|
else if (dest == hard_frame_pointer_rtx)
|
||||||
|
{
|
||||||
|
/* Either setting the FP from an offset of the SP,
|
||||||
|
or adjusting the FP */
|
||||||
|
if (! frame_pointer_needed
|
||||||
|
|| REGNO (dest) != HARD_FRAME_POINTER_REGNUM)
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
if (XEXP (src, 0) == stack_pointer_rtx
|
||||||
|
&& GET_CODE (XEXP (src, 1)) == CONST_INT)
|
||||||
|
{
|
||||||
|
if (cfa_reg != STACK_POINTER_REGNUM)
|
||||||
|
abort ();
|
||||||
|
offset = INTVAL (XEXP (src, 1));
|
||||||
|
if (GET_CODE (src) == PLUS)
|
||||||
|
offset = -offset;
|
||||||
|
cfa_offset += offset;
|
||||||
|
cfa_reg = HARD_FRAME_POINTER_REGNUM;
|
||||||
|
}
|
||||||
|
else if (XEXP (src, 0) == hard_frame_pointer_rtx
|
||||||
|
&& GET_CODE (XEXP (src, 1)) == CONST_INT)
|
||||||
|
{
|
||||||
|
if (cfa_reg != HARD_FRAME_POINTER_REGNUM)
|
||||||
|
abort ();
|
||||||
|
offset = INTVAL (XEXP (src, 1));
|
||||||
|
if (GET_CODE (src) == PLUS)
|
||||||
|
offset = -offset;
|
||||||
|
cfa_offset += offset;
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
abort();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (GET_CODE (src) != PLUS
|
if (GET_CODE (src) != PLUS
|
||||||
|
Loading…
Reference in New Issue
Block a user