From patchwork Fri Sep 28 18:11:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 187856 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 1FDB12C007F for ; Sat, 29 Sep 2012 04:11:28 +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=1349460689; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:Received:Received:Received:Date:From:To:Subject: Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=7EslqCwQHjDnjaTB56cRexzttVo=; b=OmVHPuJMO2YhW4aJLmtzKjiDeQ7qHceLcG5wXesUhq1SvXmVaet4eDoJX3bJaL YQoSCzU3zjvf0lXOl/gUlBY1t6NTGa5eEZL54o+1OLoTYu1C6mC1WsMmTtTbioKD NiaoYty/+YCUXcVk2S07QROZ+pa5GV9/KgAWFUeg6uGO4= 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:Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent:x-cbid:X-IBM-ISS-SpamDetectors:X-IBM-ISS-DetailInfo:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=qVHhRp86Fmv7muLowI4z0Sr7qMke364sQPP2idcjsTYT/7XctOl1qkBBc9T6fw KO/b4ksr8UrtX42lcC9rWqxPDoeFb16NqisWwFMmopIcWkdpXTw086yO7ah1o0Z5 RG8DkR0pYOLfc05BJ7lS8B5u+Q1QkqchAMVOMKHNN79fU=; Received: (qmail 22991 invoked by alias); 28 Sep 2012 18:11:22 -0000 Received: (qmail 22977 invoked by uid 22791); 28 Sep 2012 18:11:21 -0000 X-SWARE-Spam-Status: No, hits=-3.8 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W X-Spam-Check-By: sourceware.org Received: from e3.ny.us.ibm.com (HELO e3.ny.us.ibm.com) (32.97.182.143) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 28 Sep 2012 18:11:16 +0000 Received: from /spool/local by e3.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Sep 2012 14:11:14 -0400 Received: from d01relay07.pok.ibm.com (9.56.227.147) by e3.ny.us.ibm.com (192.168.1.103) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 28 Sep 2012 14:11:12 -0400 Received: from d01av02.pok.ibm.com (d01av02.pok.ibm.com [9.56.224.216]) by d01relay07.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q8SIBBI237552160 for ; Fri, 28 Sep 2012 14:11:11 -0400 Received: from d01av02.pok.ibm.com (loopback [127.0.0.1]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q8SIBAGT015340 for ; Fri, 28 Sep 2012 15:11:10 -0300 Received: from ibm-tiger.the-meissners.org ([9.33.48.180]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q8SIBAmA014904; Fri, 28 Sep 2012 15:11:10 -0300 Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id B6F3841FFD; Fri, 28 Sep 2012 14:11:06 -0400 (EDT) Date: Fri, 28 Sep 2012 14:11:06 -0400 From: Michael Meissner To: Michael Meissner , David Edelsohn , gcc-patches@gcc.gnu.org, bergner@vnet.ibm.com, segher@kernel.crashing.org, iain@codesourcery.com, andreast-list@fgznet.ch Subject: Re: [PATCH] Rs6000 infrastructure cleanup (switches), revised patch #2c Message-ID: <20120928181106.GA28376@ibm-tiger.the-meissners.org> Mail-Followup-To: Michael Meissner , David Edelsohn , gcc-patches@gcc.gnu.org, bergner@vnet.ibm.com, segher@kernel.crashing.org, iain@codesourcery.com, andreast-list@fgznet.ch References: <20120912224303.GA19348@ibm-tiger.the-meissners.org> <20120917195131.GA22648@ibm-tiger.the-meissners.org> <20120920195755.GA18581@ibm-tiger.the-meissners.org> <20120927224228.GA24889@ibm-tiger.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20120927224228.GA24889@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.5.20 (2009-12-10) x-cbid: 12092818-8974-0000-0000-00000E958B9C X-IBM-ISS-SpamDetectors: X-IBM-ISS-DetailInfo: BY=3.00000294; HX=3.00000196; KW=3.00000007; PH=3.00000001; SC=3.00000008; SDB=6.00178086; UDB=6.00040329; UTC=2012-09-28 18:11:13 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 Segher Boessenkool asked me on IRC to break out the fix in the last change. This patch is just the change to set the default options if the user did not use -mcpu= and the compiler was not configured with --with-cpu=. Here are the patches. I can submit this patch first if David desires, and then resubmit the first of the infrastructure patches again, or commit both together. 2012-09-28 Michael Meissner * config/rs6000/rs6000.c (rs6000_option_override_internal): If -mcpu= is not specified and the compiler is not configured using --with-cpu=, use the bits from the TARGET_DEFAULT to set the initial options. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 191831) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -2461,6 +2461,11 @@ rs6000_option_override_internal (bool gl target_flags |= (processor_target_table[cpu_index].target_enable & set_masks); + /* If no -mcpu=, inherit any default options that were cleared via + POWERPC_MASKS. */ + if (!have_cpu) + target_flags |= (TARGET_DEFAULT & ~target_flags_explicit); + if (rs6000_tune_index >= 0) tune_index = rs6000_tune_index; else if (have_cpu)