From patchwork Fri Dec 2 18:08:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joel Sherrill X-Patchwork-Id: 128929 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 DBDA2B6F67 for ; Sat, 3 Dec 2011 05:09:29 +1100 (EST) Received: (qmail 32086 invoked by alias); 2 Dec 2011 18:09:26 -0000 Received: (qmail 32077 invoked by uid 22791); 2 Dec 2011 18:09:25 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from oarmail.oarcorp.com (HELO OARmail.OARCORP.com) (67.63.146.244) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Dec 2011 18:09:01 +0000 Received: from iceland.oarcorp.com (192.168.1.171) by OARmail.OARCORP.com (192.168.2.2) with Microsoft SMTP Server (TLS) id 8.1.436.0; Fri, 2 Dec 2011 12:09:00 -0600 Message-ID: <4ED9143B.2020102@oarcorp.com> Date: Fri, 2 Dec 2011 12:08:59 -0600 From: Joel Sherrill User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0) Gecko/20110927 Thunderbird/7.0 MIME-Version: 1.0 To: "Joseph S. Myers" CC: "gcc-patches@gcc.gnu.org" Subject: Re: rs6000 options change for rtems.h References: <4ED8FB5F.7070909@oarcorp.com> <4ED90187.8040300@oarcorp.com> In-Reply-To: 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 On 12/02/2011 11:57 AM, Joseph S. Myers wrote: > On Fri, 2 Dec 2011, Joel Sherrill wrote: > >> On 12/02/2011 10:38 AM, Joseph S. Myers wrote: >>> On Fri, 2 Dec 2011, Joel Sherrill wrote: >>> >>>> 2011-12-02 Joel Sherrill >>>> >>>> * config/rs6000/rtems.h: Switch to using global_options_set >>>> in SUBSUBTARGET_OVERRIDE_OPTIONS. >>> Is it deliberate that you are removing the first part of each "if" >>> condition (thus, no longer checking TARGET_HARD_FLOAT before setting >>> rs6000_float_gprs, no longer checking rs6000_float_gprs before setting >>> rs6000_spe, etc.)? >>> >> I patterned this after what was in other files. >> It is done this way everywhere it is referenced. >> >> Should all of them be changed? > Not necessarily. > > I described how I think this sort of logic should work in > . I think that means > something closer to the other headers than to rtems.h - but I don't think > a semantic change should be mixed with a change that's just supposed to > get things to build again. > OK. I obviously read too much into the other uses. I did not intend to change semantics just account for the change making this not compile. How does the the new version look? Index: rtems.h =================================================================== --- rtems.h (revision 181924) +++ rtems.h (working copy) @@ -57,15 +57,15 @@ { "cpp_os_rtems", CPP_OS_RTEMS_SPEC } #undef SUBSUBTARGET_OVERRIDE_OPTIONS -#define SUBSUBTARGET_OVERRIDE_OPTIONS \ - do { \ - if (TARGET_E500) \ - { \ - if (TARGET_HARD_FLOAT && !rs6000_explicit_options.float_gprs) \ - rs6000_float_gprs = 1; \ - if (rs6000_float_gprs != 0 && !rs6000_explicit_options.spe) \ - rs6000_spe = 1; \ - if (rs6000_spe && !rs6000_explicit_options.spe_abi) \ - rs6000_spe_abi = 1; \ - } \ +#define SUBSUBTARGET_OVERRIDE_OPTIONS \ + do { \ + if (TARGET_E500) \ + { \ + if (TARGET_HARD_FLOAT && !global_options_set.x_rs6000_float_gprs) \ + rs6000_float_gprs = 1; \ + if (rs6000_float_gprs != 0 && !global_options_set.x_rs6000_spe) \ + rs6000_spe = 1; \ + if (rs6000_spe && !global_options_set.x_rs6000_spe_abi) \ + rs6000_spe_abi = 1; \ + } \ } while(0)