From patchwork Tue Jun 29 15:55:46 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Froyd X-Patchwork-Id: 57285 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 25E07B6EEA for ; Wed, 30 Jun 2010 01:56:02 +1000 (EST) Received: (qmail 19166 invoked by alias); 29 Jun 2010 15:56:01 -0000 Received: (qmail 19151 invoked by uid 22791); 29 Jun 2010 15:55:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 15:55:48 +0000 Received: (qmail 20239 invoked from network); 29 Jun 2010 15:55:46 -0000 Received: from unknown (HELO localhost) (froydnj@127.0.0.2) by mail.codesourcery.com with ESMTPA; 29 Jun 2010 15:55:46 -0000 Date: Tue, 29 Jun 2010 08:55:46 -0700 From: Nathan Froyd To: gcc-patches@gcc.gnu.org Subject: fix PR bootstrap/44713 Message-ID: <20100629155545.GO22606@codesourcery.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.17+20080114 (2008-01-14) 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 botched my testing of the FUNCTION_ARG &co. hookization patch. The patch below fixes the bootstrap problems. Tested on x86_64-unknown-linux-gnu. Will commit as obvious. -Nathan PR bootstrap/44713 * config/i386/i386.c (type_natural_mode): Const-ify CUM parameter. (function_arg_advance_32): Const-ify TYPE parameter. (function_arg_advance_64): Likewise. Change type of NAMED to bool. (ix86_function_arg_advance): Change type of NAMED to bool. (function_arg_32): Const-ify CUM and TYPE parameters. (function_arg_64): Likewise. Change type of NAMED to bool. (function_arg_ms_64): Const-ify CUM parameter. Change type of NAMED to bool. (ix86_function_arg): Change type of NAMED to bool. (ix86_setup_incoming_varargs): Call ix86_function_arg_advance. Pass last argument as a bool. Index: config/i386/i386.c =================================================================== --- config/i386/i386.c (revision 161534) +++ config/i386/i386.c (working copy) @@ -5180,7 +5180,7 @@ init_cumulative_args (CUMULATIVE_ARGS *c NULL. */ static enum machine_mode -type_natural_mode (const_tree type, CUMULATIVE_ARGS *cum) +type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum) { enum machine_mode mode = TYPE_MODE (type); @@ -5937,7 +5937,8 @@ construct_container (enum machine_mode m static void function_arg_advance_32 (CUMULATIVE_ARGS *cum, enum machine_mode mode, - tree type, HOST_WIDE_INT bytes, HOST_WIDE_INT words) + const_tree type, HOST_WIDE_INT bytes, + HOST_WIDE_INT words) { switch (mode) { @@ -6025,7 +6026,7 @@ function_arg_advance_32 (CUMULATIVE_ARGS static void function_arg_advance_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, - tree type, HOST_WIDE_INT words, int named) + const_tree type, HOST_WIDE_INT words, bool named) { int int_nregs, sse_nregs; @@ -6067,7 +6068,7 @@ function_arg_advance_ms_64 (CUMULATIVE_A static void ix86_function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, - const_tree type, int named) + const_tree type, bool named) { HOST_WIDE_INT bytes, words; @@ -6102,8 +6103,8 @@ ix86_function_arg_advance (CUMULATIVE_AR (otherwise it is an extra parameter matching an ellipsis). */ static rtx -function_arg_32 (CUMULATIVE_ARGS *cum, enum machine_mode mode, - enum machine_mode orig_mode, tree type, +function_arg_32 (const CUMULATIVE_ARGS *cum, enum machine_mode mode, + enum machine_mode orig_mode, const_tree type, HOST_WIDE_INT bytes, HOST_WIDE_INT words) { static bool warnedsse, warnedmmx; @@ -6219,8 +6220,8 @@ function_arg_32 (CUMULATIVE_ARGS *cum, e } static rtx -function_arg_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, - enum machine_mode orig_mode, tree type, int named) +function_arg_64 (const CUMULATIVE_ARGS *cum, enum machine_mode mode, + enum machine_mode orig_mode, const_tree type, bool named) { /* Handle a hidden AL argument containing number of registers for varargs x86-64 functions. */ @@ -6255,8 +6256,8 @@ function_arg_64 (CUMULATIVE_ARGS *cum, e } static rtx -function_arg_ms_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode, - enum machine_mode orig_mode, int named, +function_arg_ms_64 (const CUMULATIVE_ARGS *cum, enum machine_mode mode, + enum machine_mode orig_mode, bool named, HOST_WIDE_INT bytes) { unsigned int regno; @@ -6314,7 +6315,7 @@ function_arg_ms_64 (CUMULATIVE_ARGS *cum static rtx ix86_function_arg (const CUMULATIVE_ARGS *cum, enum machine_mode omode, - const_tree type, int named) + const_tree type, bool named) { enum machine_mode mode = omode; HOST_WIDE_INT bytes, words; @@ -7047,7 +7048,7 @@ ix86_setup_incoming_varargs (CUMULATIVE_ For stdargs, we do want to skip the last named argument. */ next_cum = *cum; if (stdarg_p (fntype)) - function_arg_advance (&next_cum, mode, type, 1); + ix86_function_arg_advance (&next_cum, mode, type, true); if (cum->call_abi == MS_ABI) setup_incoming_varargs_ms_64 (&next_cum);