diff options
author | Richard Henderson <rth@redhat.com> | 2011-07-24 20:26:35 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-07-24 20:26:35 -0700 |
commit | 981dc73548710dcf4df7754d60e95f6b5fa48910 (patch) | |
tree | dc95780c346e5398d559604450950f4b6b3386e0 | |
parent | 3382318ac8a06d22910426545aa61c1ecd47fd39 (diff) | |
download | gcc-981dc73548710dcf4df7754d60e95f6b5fa48910.zip gcc-981dc73548710dcf4df7754d60e95f6b5fa48910.tar.gz gcc-981dc73548710dcf4df7754d60e95f6b5fa48910.tar.bz2 |
re PR debug/49825 (Many testcase failures)
PR debug/49825
* dwarf2cfi.c (dwarf2out_stack_adjust): Move A_O_A test earlier.
(dwarf2out_notice_stack_adjust): Use args_size from call_insn.
From-SVN: r176729
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/dwarf2cfi.c | 19 |
2 files changed, 15 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4fc18ee..b88996e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2011-07-24 Richard Henderson <rth@redhat.com> + PR debug/49825 + * dwarf2cfi.c (dwarf2out_stack_adjust): Move A_O_A test earlier. + (dwarf2out_notice_stack_adjust): Use args_size from call_insn. + +2011-07-24 Richard Henderson <rth@redhat.com> + PR debug/49827 * dwarf2cfi.c (create_trace_edges): Handle sequences properly. diff --git a/gcc/dwarf2cfi.c b/gcc/dwarf2cfi.c index 9e64de6..de19d06 100644 --- a/gcc/dwarf2cfi.c +++ b/gcc/dwarf2cfi.c @@ -956,14 +956,6 @@ dwarf2out_stack_adjust (HOST_WIDE_INT offset) if (cur_trace->cfa_store.reg == dw_stack_pointer_regnum) cur_trace->cfa_store.offset += offset; -#ifndef STACK_GROWS_DOWNWARD - offset = -offset; -#endif - - queued_args_size += offset; - if (queued_args_size < 0) - queued_args_size = 0; - /* ??? The assumption seems to be that if A_O_A, the only CFA adjustments involving the stack pointer are inside the prologue and marked as RTX_FRAME_RELATED_P. That said, should we not verify this assumption @@ -972,6 +964,14 @@ dwarf2out_stack_adjust (HOST_WIDE_INT offset) if (ACCUMULATE_OUTGOING_ARGS) return; +#ifndef STACK_GROWS_DOWNWARD + offset = -offset; +#endif + + queued_args_size += offset; + if (queued_args_size < 0) + queued_args_size = 0; + def_cfa_1 (&loc); if (flag_asynchronous_unwind_tables) dwarf2out_args_size (queued_args_size); @@ -1016,8 +1016,7 @@ dwarf2out_notice_stack_adjust (rtx insn, bool after_p) if (GET_CODE (insn) == SET) insn = SET_SRC (insn); gcc_assert (GET_CODE (insn) == CALL); - gcc_assert (queued_args_size == INTVAL (XEXP (insn, 1))); - dwarf2out_args_size (queued_args_size); + dwarf2out_args_size (INTVAL (XEXP (insn, 1))); } return; } |