From patchwork Wed Feb 22 10:39:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 142444 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 7395EB6F9F for ; Wed, 22 Feb 2012 21:41:03 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1330512066; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=R2U9qRpt0dWCD85oewRQ 6mXKD2Q=; b=JlgIsitvRyIaoGdkv0NkgK8RU6tS9C9DczhVKPmgwFkPIqDp898s TWDSyc12zNiML/ob2xbA8+DgGuqZmusu4MV+fxzKUj1elOrxzWpoawKFXYAE77KI LmJztOfBSh2FMg713pWu++3tOOtK+McInTWMg7VCTDwSXOwH0hbjkK0= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:X-RZG-AUTH:X-RZG-CLASS-ID:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=FvTBE+m5CummINlZdPYmbaREN87iABpQ2qpgJOPheh8dKZhYj8cbbMbGUIVUIu zcHMPTe/M09yz7R+zZRPuWj604L//DuOstqtrQORK488fFiJp3XYDr6kE7ajVjnu l9QZcR0qAry3D4nqAW2qX/hSzl5FFI3Ln1acm8GMpdneU=; Received: (qmail 32252 invoked by alias); 22 Feb 2012 10:40:57 -0000 Received: (qmail 32242 invoked by uid 22791); 22 Feb 2012 10:40:56 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE, TW_OV, TW_VH X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Feb 2012 10:40:41 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT2k715jHQaJercGObUOFkj18odoYNahU4Q== X-RZG-CLASS-ID: mo00 Received: from [192.168.0.22] (business-188-111-022-002.static.arcor-ip.net [188.111.22.2]) by post.strato.de (mrclete mo41) (RZmta 27.7 AUTH) with ESMTPA id i05e45o1MA3IJy ; Wed, 22 Feb 2012 11:39:42 +0100 (MET) Message-ID: <4F44C5ED.1030002@gjlay.de> Date: Wed, 22 Feb 2012 11:39:41 +0100 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: Denis Chertykov CC: Richard Henderson , Jakub Jelinek , gcc-patches@gcc.gnu.org, Eric Weddington Subject: [Patch,AVR,4.6]: Fix PR50063 GCC does not support FP = SP References: <4F438248.70503@gjlay.de> <20120221115235.GA18768@tyan-ft48-01.lab.bos.redhat.com> <4F43CF99.2040706@gjlay.de> <4F43D2CD.9080507@redhat.com> In-Reply-To: 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 Denis Chertykov wrote: > 2012/2/21 Richard Henderson: >> On 02/21/12 09:08, Georg-Johann Lay wrote: >>> PR rtl-optimization/50063 >>> * config/avr/avr.md (movhi_sp_r): Handle -1 (unknown IRQ state) >>> and 2 (8-bit SP) in operand 2. >>> * config/avr/avr.c (avr_prologue_setup_frame): Adjust prologue >>> setup to use movhi_sp_r instead of vanilla move to write SP. >>> Adjust REG_CFA notes to superseed unspec. >>> (expand_epilogue): Adjust epilogue setup to use read_sp instead >>> of vanilla move. >>> As function body might contain CLI or SEI: Use irq_state 0 (IRQ >>> known to be off) only with TARGET_NO_INTERRUPTS. Never use >>> irq_state 1 (IRQ known to be on) here. >> The CFA bits in avr_prologue_setup_frame look good. >> I'll let Denis or Eric review the movhi_sp_r change. > > Approved. > > Denis. Here is a patchlet for 4.6. It just sets -fno-dse to work around the problem because I think back-porting all what's needed is too much change. Compiling avr-libc without DSE gives the same sizes for all objects which shows that this is not a crucial optimization for avr. Ok for 4.6 branch? Johann PR rtl-optimization/50063 * config/avr/avr.c (avr_option_override): Disable DSE. Index: config/avr/avr.c =================================================================== --- config/avr/avr.c (revision 184460) +++ config/avr/avr.c (working copy) @@ -245,6 +245,11 @@ avr_option_override (void) flag_delete_null_pointer_checks = 0; + /* Kick off DSE in order to hack around PR rtl-optimization/50063. + Backporting all of 4.7 is too much. */ + + flag_dse = 0; + for (t = avr_mcu_types; t->name; t++) if (strcmp (t->name, avr_mcu_name) == 0) break;