From patchwork Sat Jun 2 21:52:21 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Miller X-Patchwork-Id: 162453 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 93F5CB6EEC for ; Sun, 3 Jun 2012 07:52:45 +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=1339278765; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: Message-Id:To:Cc:Subject:From:In-Reply-To:References: Mime-Version:Content-Type:Content-Transfer-Encoding:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=GOBk/VRtXTFXRpCl9jem3sLuFR4=; b=hKF+mnO5jPD0408TSsZRzdv6CvLfOzc0iEXAp8jiODSTBGJYsHNbHG/mx8uex9 efMOtjX/45E597RszYiEhQIx5fr+Cm1SLbzMZIzHLkUnmn2FSYbwTXQLNW4OtSHi 274559sS3HxhLZ7rpVtIX/1cvcT/n4EyfWZkoidzDTVLA= 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:Date:Message-Id:To:Cc:Subject:From:In-Reply-To:References:Mime-Version:Content-Type:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Npums0pgL/5N9R71wgQE6XLQMjruVo4A7F83IOIuV+rvS8YOJTiCOHhDjHjlFH qUk5wjOU9ME7rxWZZCfLkyRSECKPTIHLwI0jxuwtckuVsbPxl2xko44fp8gVJl1O YFpjD/0QzFgpbPdavRzJ5GoCKGWKR+McwKIzMrGzIGPNE=; Received: (qmail 30322 invoked by alias); 2 Jun 2012 21:52:41 -0000 Received: (qmail 30312 invoked by uid 22791); 2 Jun 2012 21:52:39 -0000 X-SWARE-Spam-Status: No, hits=-1.0 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, TW_GJ, TW_SV, URIBL_BLACK X-Spam-Check-By: sourceware.org Received: from shards.monkeyblade.net (HELO shards.monkeyblade.net) (149.20.54.216) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 02 Jun 2012 21:52:23 +0000 Received: from localhost (cpe-66-108-119-99.nyc.res.rr.com [66.108.119.99]) by shards.monkeyblade.net (Postfix) with ESMTPSA id 2D593582496; Sat, 2 Jun 2012 14:52:22 -0700 (PDT) Date: Sat, 02 Jun 2012 17:52:21 -0400 (EDT) Message-Id: <20120602.175221.1361670961044731053.davem@davemloft.net> To: ro@CeBiTec.Uni-Bielefeld.DE Cc: stevenb.gcc@gmail.com, gcc-patches@gcc.gnu.org Subject: Re: sparc build broken... From: David Miller In-Reply-To: <20120601.135048.2004322911417558065.davem@davemloft.net> References: <20120601.135048.2004322911417558065.davem@davemloft.net> Mime-Version: 1.0 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 From: David Miller Date: Fri, 01 Jun 2012 13:50:48 -0400 (EDT) > I hit the same problem, but solved it by removing the > 'from' parameter entirely. To move things forward I committed the following: -------------------- Restore Sparc build. gcc/ * config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Split out to new function sparc_initial_elimination_offset. * config/sparc/sparc.c (sparc_initial_elimination_offset): New function. * config/sparc/sparc-protos.h (sparc_initial_elimination_offset): Prototype it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@188142 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 9 +++++++++ gcc/config/sparc/sparc-protos.h | 1 + gcc/config/sparc/sparc.c | 17 +++++++++++++++++ gcc/config/sparc/sparc.h | 15 ++++++--------- 4 files changed, 33 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5a43bb7..2eb5720 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2012-06-02 Steven Bosscher + + * config/sparc/sparc.h (INITIAL_ELIMINATION_OFFSET): Split out to + new function sparc_initial_elimination_offset. + * config/sparc/sparc.c (sparc_initial_elimination_offset): New + function. + * config/sparc/sparc-protos.h (sparc_initial_elimination_offset): + Prototype it. + 2012-06-2 Kenneth Zadeck * expmed.c (expand_mult, choose_multiplier): Change "2 * diff --git a/gcc/config/sparc/sparc-protos.h b/gcc/config/sparc/sparc-protos.h index 52acc09..b03f5cc 100644 --- a/gcc/config/sparc/sparc-protos.h +++ b/gcc/config/sparc/sparc-protos.h @@ -37,6 +37,7 @@ extern enum direction function_arg_padding (enum machine_mode, const_tree); extern void order_regs_for_local_alloc (void); extern HOST_WIDE_INT sparc_compute_frame_size (HOST_WIDE_INT, int); +extern int sparc_initial_elimination_offset (int); extern void sparc_expand_prologue (void); extern void sparc_flat_expand_prologue (void); extern void sparc_expand_epilogue (bool); diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 54fce8f..7b1899d 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -4551,6 +4551,23 @@ sparc_compute_frame_size (HOST_WIDE_INT size, int leaf_function) return frame_size; } +/* Implement the macro INITIAL_ELIMINATION_OFFSET, return the OFFSET. */ + +int +sparc_initial_elimination_offset (int to) +{ + int offset; + + if (to == STACK_POINTER_REGNUM) + offset = sparc_compute_frame_size (get_frame_size (), + current_function_is_leaf); + else + offset = 0; + + offset += SPARC_STACK_BIAS; + return offset; +} + /* Output any necessary .register pseudo-ops. */ void diff --git a/gcc/config/sparc/sparc.h b/gcc/config/sparc/sparc.h index a2bf09f..234edcf 100644 --- a/gcc/config/sparc/sparc.h +++ b/gcc/config/sparc/sparc.h @@ -1104,15 +1104,12 @@ extern char leaf_reg_remap[]; {{ FRAME_POINTER_REGNUM, STACK_POINTER_REGNUM}, \ { FRAME_POINTER_REGNUM, HARD_FRAME_POINTER_REGNUM} } -#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ - do { \ - if ((TO) == STACK_POINTER_REGNUM) \ - (OFFSET) = sparc_compute_frame_size (get_frame_size (), \ - current_function_is_leaf); \ - else \ - (OFFSET) = 0; \ - (OFFSET) += SPARC_STACK_BIAS; \ - } while (0) +#define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \ + do \ + { \ + (OFFSET) = sparc_initial_elimination_offset ((TO)); \ + } \ + while (0) /* Keep the stack pointer constant throughout the function. This is both an optimization and a necessity: longjmp