re PR debug/36977 (Incorrect debug info for stack variables with stack alignment)
2008-07-31 H.J. Lu <hongjiu.lu@intel.com> PR debug/36977 * cfgexpand.c (expand_stack_alignment): Set stack_realign_tried. * dwarf2out.c (based_loc_descr): Check crtl->stack_realign_tried for stack alignment. * function.h (rtl_data): Add stack_realign_tried. Update comments. From-SVN: r138438
This commit is contained in:
parent
c983efcec6
commit
d2d93c32dc
4 changed files with 24 additions and 8 deletions
|
@ -1,3 +1,14 @@
|
|||
2008-07-31 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR debug/36977
|
||||
* cfgexpand.c (expand_stack_alignment): Set stack_realign_tried.
|
||||
|
||||
* dwarf2out.c (based_loc_descr): Check crtl->stack_realign_tried
|
||||
for stack alignment.
|
||||
|
||||
* function.h (rtl_data): Add stack_realign_tried. Update
|
||||
comments.
|
||||
|
||||
2008-07-31 Kaz Kojima <kkojima@gcc.gnu.org>
|
||||
|
||||
* config/sh/sh.c (sh_canonical_va_list_type): Remove.
|
||||
|
|
|
@ -2217,6 +2217,7 @@ expand_stack_alignment (void)
|
|||
|
||||
crtl->stack_realign_needed
|
||||
= INCOMING_STACK_BOUNDARY < crtl->stack_alignment_estimated;
|
||||
crtl->stack_realign_tried = crtl->stack_realign_needed;
|
||||
|
||||
crtl->stack_realign_processed = true;
|
||||
|
||||
|
|
|
@ -9453,8 +9453,7 @@ based_loc_descr (rtx reg, HOST_WIDE_INT offset,
|
|||
pointer + offset to access stack variables. If stack
|
||||
is aligned without drap, use stack pointer + offset to
|
||||
access stack variables. */
|
||||
if (fde
|
||||
&& fde->stack_realign
|
||||
if (crtl->stack_realign_tried
|
||||
&& cfa.reg == HARD_FRAME_POINTER_REGNUM
|
||||
&& reg == frame_pointer_rtx)
|
||||
{
|
||||
|
|
|
@ -417,20 +417,25 @@ struct rtl_data GTY(())
|
|||
/* When set, expand should optimize for speed. */
|
||||
bool maybe_hot_insn_p;
|
||||
|
||||
/* Nonzero if function stack realignment is needed. This flag may be
|
||||
set twice: before and after reload. It is set before reload wrt
|
||||
stack alignment estimation before reload. It will be changed after
|
||||
reload if by then criteria of stack realignment is different.
|
||||
/* Nonzero if function stack realignment is needed. This flag may be
|
||||
set twice: before and after reload. It is set before reload wrt
|
||||
stack alignment estimation before reload. It will be changed after
|
||||
reload if by then criteria of stack realignment is different.
|
||||
The value set after reload is the accurate one and is finalized. */
|
||||
bool stack_realign_needed;
|
||||
|
||||
/* Nonzero if function stack realignment is tried. This flag is set
|
||||
only once before reload. It affects register elimination. This
|
||||
is used to generate DWARF debug info for stack variables. */
|
||||
bool stack_realign_tried;
|
||||
|
||||
/* Nonzero if function being compiled needs dynamic realigned
|
||||
argument pointer (drap) if stack needs realigning. */
|
||||
bool need_drap;
|
||||
|
||||
/* Nonzero if function stack realignment estimation is done, namely
|
||||
stack_realign_needed flag has been set before reload wrt
|
||||
estimated stack alignment info. */
|
||||
stack_realign_needed flag has been set before reload wrt estimated
|
||||
stack alignment info. */
|
||||
bool stack_realign_processed;
|
||||
|
||||
/* Nonzero if function stack realignment has been finalized, namely
|
||||
|
|
Loading…
Add table
Reference in a new issue