From patchwork Wed Jul 7 20:59:41 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 58177 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 33DA1B6F05 for ; Thu, 8 Jul 2010 06:59:53 +1000 (EST) Received: (qmail 2651 invoked by alias); 7 Jul 2010 20:59:52 -0000 Received: (qmail 2643 invoked by uid 22791); 7 Jul 2010 20:59:51 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 07 Jul 2010 20:59:46 +0000 Received: by wye20 with SMTP id 20so81700wye.20 for ; Wed, 07 Jul 2010 13:59:44 -0700 (PDT) Received: by 10.227.128.78 with SMTP id j14mr5589090wbs.165.1278536383758; Wed, 07 Jul 2010 13:59:43 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id a1sm45552824wbb.14.2010.07.07.13.59.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 07 Jul 2010 13:59:43 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [12/27] Use target structures for init_excess_precision References: <87d3v2oqyt.fsf@firetop.home> Date: Wed, 07 Jul 2010 21:59:41 +0100 In-Reply-To: <87d3v2oqyt.fsf@firetop.home> (Richard Sandiford's message of "Sun, 04 Jul 2010 22:51:54 +0100") Message-ID: <87mxu3t3cy.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 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 patch starts the same process for lang_dependent_init_target: static void lang_dependent_init_target (void) { /* This determines excess precision settings. */ ==> init_excess_precision (); /* This creates various _DECL nodes, so needs to be called after the front end is initialized. It also depends on the HAVE_xxx macros generated from the target machine description. */ init_optabs (); Richard gcc/ * flags.h (target_flagstate): Add x_flag_excess_precision. (flag_excess_precision): Redefine as a macro. * toplev.c (flag_excess_precision): Delete. Index: gcc/flags.h =================================================================== --- gcc/flags.h 2010-07-01 22:30:15.000000000 +0100 +++ gcc/flags.h 2010-07-01 22:30:26.000000000 +0100 @@ -232,10 +232,6 @@ enum excess_precision /* The excess precision specified on the command line, or defaulted by the front end. */ extern enum excess_precision flag_excess_precision_cmdline; - -/* The excess precision currently in effect. */ -extern enum excess_precision flag_excess_precision; - /* Other basic status info about current function. */ @@ -251,6 +247,9 @@ struct target_flag_state { int x_align_labels_log; int x_align_labels_max_skip; int x_align_functions_log; + + /* The excess precision currently in effect. */ + enum excess_precision x_flag_excess_precision; }; extern struct target_flag_state default_target_flag_state; @@ -274,6 +273,8 @@ #define align_labels_max_skip \ (this_target_flag_state->x_align_labels_max_skip) #define align_functions_log \ (this_target_flag_state->x_align_functions_log) +#define flag_excess_precision \ + (this_target_flag_state->x_flag_excess_precision) /* Nonzero if subexpressions must be evaluated from left-to-right. */ extern int flag_evaluation_order; Index: gcc/toplev.c =================================================================== --- gcc/toplev.c 2010-07-01 22:30:15.000000000 +0100 +++ gcc/toplev.c 2010-07-01 22:30:26.000000000 +0100 @@ -259,7 +259,6 @@ enum ira_region flag_ira_region = IRA_RE /* Set the default for excess precision. */ enum excess_precision flag_excess_precision_cmdline = EXCESS_PRECISION_DEFAULT; -enum excess_precision flag_excess_precision = EXCESS_PRECISION_DEFAULT; /* Nonzero means change certain warnings into errors. Usually these are warnings about failure to conform to some standard. */