From patchwork Wed Nov 3 22:06:21 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kaz Kojima X-Patchwork-Id: 70075 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 6050DB70A5 for ; Thu, 4 Nov 2010 09:06:32 +1100 (EST) Received: (qmail 30565 invoked by alias); 3 Nov 2010 22:06:30 -0000 Received: (qmail 30556 invoked by uid 22791); 3 Nov 2010 22:06:30 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mo10.iij4u.or.jp (HELO mo.iij4u.or.jp) (210.138.174.78) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Nov 2010 22:06:25 +0000 Received: by mo.iij4u.or.jp (mo10) id oA3M6MpV021635; Thu, 4 Nov 2010 07:06:22 +0900 Received: from localhost (238.152.138.210.bn.2iij.net [210.138.152.238]) by mbox.iij4u.or.jp (mbox11) id oA3M6LsZ004662; Thu, 4 Nov 2010 07:06:22 +0900 Date: Thu, 04 Nov 2010 07:06:21 +0900 (JST) Message-Id: <20101104.070621.04355355.kkojima@rr.iij4u.or.jp> To: gcc-patches@gcc.gnu.org Subject: [patch committed SH] Mark a stack adjustment insn as frame-related From: Kaz Kojima Mime-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * config/sh/sh.c (sh_expand_prologue): Remove unnecessary comment. Pass true to the last argument of output_stack_adjust. --- 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)