From patchwork Mon Jul 25 03:33:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 106605 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 20CF2B6F85 for ; Mon, 25 Jul 2011 13:33:27 +1000 (EST) Received: (qmail 11825 invoked by alias); 25 Jul 2011 03:33:25 -0000 Received: (qmail 11814 invoked by uid 22791); 25 Jul 2011 03:33:24 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 03:33:05 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p6P3X5Tx032420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 24 Jul 2011 23:33:05 -0400 Received: from pebble.twiddle.home (vpn-226-63.phx2.redhat.com [10.3.226.63]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p6P3X4ZH015054 for ; Sun, 24 Jul 2011 23:33:05 -0400 Message-ID: <4E2CE3F0.1050501@redhat.com> Date: Sun, 24 Jul 2011 20:33:04 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11 MIME-Version: 1.0 To: GCC Patches Subject: Re: Fix debug/49825 References: <4E2CDDEC.3010001@redhat.com> <4E2CDFB7.90703@redhat.com> In-Reply-To: <4E2CDFB7.90703@redhat.com> 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 With the last two fixes, the only remaining i686 regression from Thursday is 1 fortran testcase, whose number I have misplaced. This highlights an accidental change I made while moving code around between functions, and an assertion I added trying to see if we'd Done The Right Thing already. The entire treatment of args_size is Very Confusing. I suspect it ought to be all re-written, but I'll save that for later once the dust has settled. r~ PR debug/49825 * dwarf2cfi.c (dwarf2out_stack_adjust): Move A_O_A test earlier. (dwarf2out_notice_stack_adjust): Use args_size from call_insn. 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; }