From: Richard Henderson Date: Tue, 22 Mar 2011 16:02:59 +0000 (-0700) Subject: * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 11]: Handle post_dec. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d090a5aa09a5e837bc576dcab89cda8bbcd63d78;p=gcc.git * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 11]: Handle post_dec. From-SVN: r171296 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 396c8be7a84..3fff7d69741 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -16,6 +16,8 @@ (*pushhi, *pushsi, *pushsf, popqi): Likewise. (pophi): Remove. + * dwarf2out.c (dwarf2out_frame_debug_expr) [rule 11]: Handle post_dec. + 2011-03-22 Nathan Froyd * tree.c (build_call_1): New function. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 5d64b8d3fb9..32ffe1b6d62 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -2239,7 +2239,7 @@ dwarf2out_frame_debug_cfa_restore (rtx reg, const char *label) cfa.base_offset = -cfa_store.offset Rule 11: - (set (mem ({pre_inc,pre_dec} sp:cfa_store.reg)) ) + (set (mem ({pre_inc,pre_dec,post_dec} sp:cfa_store.reg)) ) effects: cfa_store.offset += -/+ mode_size(mem) cfa.offset = cfa_store.offset if cfa.reg == sp cfa.reg = sp @@ -2258,7 +2258,7 @@ dwarf2out_frame_debug_cfa_restore (rtx reg, const char *label) cfa.base_offset = -{cfa_store,cfa_temp}.offset Rule 14: - (set (mem (postinc :cfa_temp )) ) + (set (mem (post_inc :cfa_temp )) ) effects: cfa.reg = cfa.base_offset = -cfa_temp.offset cfa_temp.offset -= mode_size(mem) @@ -2591,6 +2591,7 @@ dwarf2out_frame_debug_expr (rtx expr, const char *label) /* Rule 11 */ case PRE_INC: case PRE_DEC: + case POST_DEC: offset = GET_MODE_SIZE (GET_MODE (dest)); if (GET_CODE (XEXP (dest, 0)) == PRE_INC) offset = -offset; @@ -2615,7 +2616,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_DEC) + offset += -cfa_store.offset; + else + offset = -cfa_store.offset; break; /* Rule 12 */