Patchwork [committed,SH] Mark a stack adjustment insn as frame-related

login
register
mail settings
Submitter Kaz Kojima
Date Nov. 3, 2010, 10:06 p.m.
Message ID <20101104.070621.04355355.kkojima@rr.iij4u.or.jp>
Download mbox | patch
Permalink /patch/70075/
State New
Headers show

Comments

Kaz Kojima - Nov. 3, 2010, 10:06 p.m.
Hi,

g++.dg/torture/stackalign/eh-vararg-[12].C fails on sh64-*.
It looks that a stack adjustment insn isn't marked as
frame-related and causes wrong unwinding.  The patch below
is to fix this problem.  It seems that now the comment
removed with this patch doesn't match the current behavior
of dwarf2 module.
The patch is tested with bootstrap and "make -k check" on
sh4-unknown-linux-gnu with no new failures.  Applied on
trunk.

Regards,
	kaz
--
2010-11-03  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.c (sh_expand_prologue): Remove unnecessary
	comment.  Pass true to the last argument of output_stack_adjust.

Patch

--- ORIG/trunk/gcc/config/sh/sh.c	2010-11-02 10:01:03.000000000 +0900
+++ trunk/gcc/config/sh/sh.c	2010-11-02 16:07:14.000000000 +0900
@@ -6881,10 +6881,10 @@  sh_expand_prologue (void)
       && (NPARM_REGS(SImode)
 	  > crtl->args.info.arg_count[(int) SH_ARG_INT]))
     pretend_args = 0;
-  /* Dwarf2 module doesn't expect frame related insns here.  */
+
   output_stack_adjust (-pretend_args
 		       - crtl->args.info.stack_regs * 8,
-		       stack_pointer_rtx, 0, NULL, false);
+		       stack_pointer_rtx, 0, NULL, true);
   stack_usage = pretend_args + crtl->args.info.stack_regs * 8;
 
   if (TARGET_SHCOMPACT && flag_pic && crtl->args.info.call_cookie)