From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26635 invoked by alias); 16 Jun 2011 11:47:29 -0000 Received: (qmail 26625 invoked by uid 22791); 16 Jun 2011 11:47:28 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-ew0-f47.google.com (HELO mail-ew0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Jun 2011 11:47:15 +0000 Received: by ewy5 with SMTP id 5so584596ewy.20 for ; Thu, 16 Jun 2011 04:47:13 -0700 (PDT) Received: by 10.14.96.78 with SMTP id q54mr331945eef.157.1308224833295; Thu, 16 Jun 2011 04:47:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.14.186.16 with HTTP; Thu, 16 Jun 2011 04:46:53 -0700 (PDT) In-Reply-To: References: <4DF0FAB5.6070704@gjlay.de> <4DF11D20.4030907@gjlay.de> <4DF1ED76.4030507@gjlay.de> <4DF650B7.3030705@gjlay.de> <4DF73490.2080709@gjlay.de> <4DF7D2B5.1090708@gjlay.de> <4DF8ED42.1030706@redhat.com> <4DF918A9.4070003@gjlay.de> <4DF92AEA.4000906@redhat.com> <4DF93B17.8020008@redhat.com> From: Denis Chertykov Date: Thu, 16 Jun 2011 12:01:00 -0000 Message-ID: Subject: Re: [Patch, AVR]: Fix PR46779 To: Richard Henderson Cc: Georg-Johann Lay , gcc-patches@gcc.gnu.org, Anatoly Sokolov , "Eric B. Weddington" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 2011-06/txt/msg01237.txt.bz2 2011/6/16 Denis Chertykov : > 2011/6/16 Richard Henderson : >> On 06/15/2011 02:58 PM, Richard Henderson wrote: >>> Indeed, I can work around this particular crash by either >>> hacking Z to be call-saved, or hacking the frame pointer to >>> not be required. =C2=A0The former of course changes the abi, and >>> the second produces awful code due to too many copies from >>> the stack pointer. =C2=A0So neither option is "preferred". >> >> Perhaps I spoke too soon re the frame pointer. =C2=A0The old >> code is even worse. >> >> =C2=A0 text =C2=A0 =C2=A0data =C2=A0 =C2=A0 bss =C2=A0 =C2=A0 dec =C2=A0= =C2=A0 hex filename >> =C2=A010032 =C2=A0 =C2=A0 =C2=A025 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 10057 = =C2=A0 =C2=A02749 bld-avr-orig/gcc/z.o >> =C2=A0 5816 =C2=A0 =C2=A0 =C2=A025 =C2=A0 =C2=A0 =C2=A0 0 =C2=A0 =C2=A05= 841 =C2=A0 =C2=A016d1 bld-avr-new/gcc/z.o >> >> That said, there's a crash building libgcc so there's >> still work to do. > > @rth (while you are diving into AVR microworld ;-) > May be you can give a suggestion to change the AVR abi. > I have tuned the abi for code size almost 13 years ago. > The register pressure to r18-r31 are very high. > > I have a set of experiments with omitting the frame poiner and I found th= at > better to support fake addressing modes (infinite displacement for frame > pointer). I forgot to said that suggestion from Bernd Schmidt about HARD_FRAME_POINTER_REGNUM seems very useful: > Maybe it would help for your port to define a separate > FRAME_POINTER_REGNUM, able to hold an HImode value, which then gets > eliminated to HARD_FRAME_POINTER_REGNUM? This mechanism is used on many > other ports if you need examples. It's not related to addressing modes but it's related to frame pointer bugs. Denis.