From patchwork Wed Dec 14 23:23:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 131493 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 9BEB81007D6 for ; Thu, 15 Dec 2011 10:23:38 +1100 (EST) Received: (qmail 12002 invoked by alias); 14 Dec 2011 23:23:35 -0000 Received: (qmail 11989 invoked by uid 22791); 14 Dec 2011 23:23:34 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU X-Spam-Check-By: sourceware.org Received: from mo-p00-ob.rzone.de (HELO mo-p00-ob.rzone.de) (81.169.146.160) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 23:23:18 +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 smtp.strato.de (cohen mo8) (RZmta 26.15 AUTH) with ESMTPA id f04749nBENGZml ; Thu, 15 Dec 2011 00:23:06 +0100 (MET) Message-ID: <4EE92FD7.4040409@gjlay.de> Date: Thu, 15 Dec 2011 00:23:03 +0100 From: Georg-Johann Lay User-Agent: Thunderbird 2.0.0.24 (X11/20100302) MIME-Version: 1.0 To: GCC Patches CC: Denis Chertykov , Eric Weddington Subject: [Patch,AVR] Fix PR51050: Invalid RTL sharing of fp 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 This is fix for the RP. Is uses (reg:QI 28) instead of building SUBREG of frame pointer. Johann PR target/51050 * config/avr/avr.c (expand_epilogue): Don't build SUBREG of fp. (avr_prologue_setup_frame): Ditto. Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 182327) +++ gcc/config/avr/avr.c (working copy) @@ -994,7 +994,7 @@ avr_prologue_setup_frame (HOST_WIDE_INT /* The high byte (r29) does not change: Prefer SUBI (1 cycle) over ABIW (2 cycles, same size). */ - my_fp = simplify_gen_subreg (QImode, fp, Pmode, 0); + my_fp = all_regs_rtx[FRAME_POINTER_REGNUM]; } /************ Method 1: Adjust frame pointer ************/ @@ -1292,7 +1292,7 @@ expand_epilogue (bool sibcall_p) /* The high byte (r29) does not change: Prefer SUBI (1 cycle) over SBIW (2 cycles). */ - my_fp = simplify_gen_subreg (QImode, fp, Pmode, 0); + my_fp = all_regs_rtx[FRAME_POINTER_REGNUM]; } /********** Method 1: Adjust fp register **********/