From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2854 invoked by alias); 1 Jul 2010 11:06:11 -0000 Received: (qmail 2842 invoked by uid 22791); 1 Jul 2010 11:06:09 -0000 X-SWARE-Spam-Status: No, hits=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Thu, 01 Jul 2010 11:06:04 +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.13.8/8.13.8) with ESMTP id o61B5kgq011135 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 1 Jul 2010 07:05:46 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o61B5jO5013058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 1 Jul 2010 07:05:46 -0400 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4) with ESMTP id o61B6k81025015; Thu, 1 Jul 2010 13:06:46 +0200 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o61B6jdA025013; Thu, 1 Jul 2010 13:06:45 +0200 Date: Thu, 01 Jul 2010 11:06:00 -0000 From: Jakub Jelinek To: Jason Merrill , Richard Guenther Cc: Jie Zhang , Alexandre Oliva , gcc-patches@gcc.gnu.org Subject: [PATCH] Do framep replacement even on RHS outside of MEM contexts (PR debug/44694 followup) Message-ID: <20100701110645.GU25077@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <20100629143144.GM25077@tyan-ft48-01.lab.bos.redhat.com> <4C2C4E0F.8040405@codesourcery.com> <20100701082205.GT25077@tyan-ft48-01.lab.bos.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100701082205.GT25077@tyan-ft48-01.lab.bos.redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg00044.txt.bz2 On Thu, Jul 01, 2010 at 10:22:05AM +0200, Jakub Jelinek wrote: > On Thu, Jul 01, 2010 at 04:13:03PM +0800, Jie Zhang wrote: > > This patch caused ICE for arm-none-eabi target: > > > > internal compiler error: in arm_dbx_register_number, at > > config/arm/arm.c:21155 > > > > when compiling thumb multilib libstdc++. > > Richard Earnshaw has already reported this in the PR, and here is my fix for > that. I don't have any arm boxes, so will just test it on x86_64-linux and > i686-linux (the PR44694 patch has been tested also on ppc/ppc64/s390/s390x > btw), could you please test it on arm? Thanks. > > 2010-07-01 Jakub Jelinek > > PR debug/44694 > * dwarf2out.c (reg_loc_descriptor): For eliminated arg_pointer_rtx > or frame_pointer_rtx use DW_OP_fbreg offset DW_OP_stack_value. Now bootstrapped/regtested on x86_64-linux and i686-linux. Ok for trunk/4.5? > --- gcc/dwarf2out.c.jj 2010-07-01 08:45:55.000000000 +0200 > +++ gcc/dwarf2out.c 2010-07-01 09:19:47.000000000 +0200 > @@ -12999,6 +12999,26 @@ reg_loc_descriptor (rtx rtl, enum var_in > if (REGNO (rtl) >= FIRST_PSEUDO_REGISTER) > return 0; > > + /* We only use "frame base" when we're sure we're talking about the > + post-prologue local stack frame. We do this by *not* running > + register elimination until this point, and recognizing the special > + argument pointer and soft frame pointer rtx's. > + Use DW_OP_fbreg offset DW_OP_stack_value in this case. */ > + if ((rtl == arg_pointer_rtx || rtl == frame_pointer_rtx) > + && eliminate_regs (rtl, VOIDmode, NULL_RTX) != rtl) > + { > + dw_loc_descr_ref result = NULL; > + > + if (dwarf_version >= 4 || !dwarf_strict) > + { > + result = mem_loc_descriptor (rtl, VOIDmode, initialized); > + if (result) > + add_loc_descr (&result, > + new_loc_descr (DW_OP_stack_value, 0, 0)); > + } > + return result; > + } > + > regs = targetm.dwarf_register_span (rtl); > > if (hard_regno_nregs[REGNO (rtl)][GET_MODE (rtl)] > 1 || regs) > Jakub