From a0905f8bf4f33f259a484cf3399d5d418e33c4ad Mon Sep 17 00:00:00 2001 From: Bernd Schmidt Date: Thu, 5 May 2011 16:49:11 +0000 Subject: [PATCH] dwarf2out.c (dwarf2out_frame_debug_expr): Handle POST_MODIFY. * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 10]: Handle POST_MODIFY. From-SVN: r173446 --- gcc/ChangeLog | 5 +++++ gcc/dwarf2out.c | 8 ++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 791f4a2d239..642f85f0bfb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-05-05 Bernd Schmidt + + * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 10]: Handle + POST_MODIFY. + 2011-05-05 Steve Ellcey * config.gcc (hppa*64*-*-hpux11*): Modify tm_file and extra_options diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 8f2635bd7b7..e20b01b7479 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2237,7 +2237,7 @@ dwarf2out_frame_debug_cfa_restore (rtx reg, const char *label) cfa_temp.offset = Rule 10: - (set (mem (pre_modify sp:cfa_store (???? ))) ) + (set (mem ({pre,post}_modify sp:cfa_store (???? ))) ) effects: cfa_store.offset -= cfa.offset = cfa_store.offset if cfa.reg == sp cfa.reg = sp @@ -2578,6 +2578,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) /* Rule 10 */ /* With a push. */ case PRE_MODIFY: + case POST_MODIFY: /* We can't handle variable size modifications. */ gcc_assert (GET_CODE (XEXP (XEXP (XEXP (dest, 0), 1), 1)) == CONST_INT); @@ -2590,7 +2591,10 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) if (cfa.reg == STACK_POINTER_REGNUM) cfa.offset = cfa_store.offset; - offset = -cfa_store.offset; + if (GET_CODE (XEXP (dest, 0)) == POST_MODIFY) + offset -= cfa_store.offset; + else + offset = -cfa_store.offset; break; /* Rule 11 */ -- 2.30.2