From patchwork Fri Apr 20 09:32:26 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 153990 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 4C487B7039 for ; Fri, 20 Apr 2012 19:32:52 +1000 (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=1335519172; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition: User-Agent:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=54KV14x 3zsK4XwTzFg4nTvYr8zc=; b=GswzE21zpPPmE9XO44R9XBbXVcsWghTzP/mXgMi 7B0L3bH6ORZebJnNucw/4umsIiwWYmEzwNbTs9iEOM8B6l/rZby7vXTK/6P6+baZ JdHNyTXrsdyn8lCKHL/b7yXsQKsSquezqLIvD6i/5qjcRRl1e9usgDyVKVz9+7Qo RN/U= 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:Received:Received:Received:Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=wixUfqf+aA6bjL9793AVNzJeieZt+RaIk1pvvYB4/WKqgBzam8OEEz5ENXPi7I +e0cgWU/phBkmZBgXK04aapdo1BZwr1qWosuiw9R0i7hO6elCD/hdnJrdGmC/A4M nhQmtLgYzDy8bARxT5rGpb0O0vLFKpz7+tDVT7AErnL7o=; Received: (qmail 27588 invoked by alias); 20 Apr 2012 09:32:46 -0000 Received: (qmail 27578 invoked by uid 22791); 20 Apr 2012 09:32:45 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 20 Apr 2012 09:32:32 +0000 Received: by iaag37 with SMTP id g37so14192122iaa.20 for ; Fri, 20 Apr 2012 02:32:32 -0700 (PDT) Received: by 10.50.222.131 with SMTP id qm3mr5067127igc.66.1334914352534; Fri, 20 Apr 2012 02:32:32 -0700 (PDT) Received: from bubble.grove.modra.org ([115.187.252.19]) by mx.google.com with ESMTPS id l9sm5276631iga.6.2012.04.20.02.32.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 20 Apr 2012 02:32:32 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id D0078EA3285; Fri, 20 Apr 2012 19:02:26 +0930 (CST) Date: Fri, 20 Apr 2012 19:02:26 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: David Edelsohn Subject: [RS6000] Fix PR53040 Message-ID: <20120420093226.GU3218@bubble.grove.modra.org> Mail-Followup-To: gcc-patches@gcc.gnu.org, David Edelsohn MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) 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 I'm applying this to mainline as obvious. If we save fprs inline for any reason, we must also restore them inline. (The same goes for gprs, and that is handled later in this function.) Bootstrapped and regresion tested powerpc-linux. PR target/53040 * config/rs6000/rs6000.c (rs6000_savres_strategy): When using static chain, set REST_INLINE_FPRS too. diff -urp gcc-alan4/gcc/config/rs6000/rs6000.c gcc-alan5a/gcc/config/rs6000/rs6000.c --- gcc-alan4/gcc/config/rs6000/rs6000.c 2012-04-19 18:33:20.171843404 +0930 +++ gcc-alan5a/gcc/config/rs6000/rs6000.c 2012-04-19 21:24:46.643632761 +0930 @@ -17456,8 +17456,9 @@ rs6000_savres_strategy (rs6000_stack_t * static chain is rarely used anyway. FPRs are saved w.r.t the stack pointer on Darwin. */ if (using_static_chain_p) - strategy |= (DEFAULT_ABI == ABI_DARWIN ? 0 : SAVE_INLINE_FPRS) - | SAVE_INLINE_GPRS; + strategy |= ((DEFAULT_ABI == ABI_DARWIN + ? 0 : SAVE_INLINE_FPRS | REST_INLINE_FPRS) + | SAVE_INLINE_GPRS); /* If we are going to use store multiple, then don't even bother with the out-of-line routines, since the store-multiple