From patchwork Thu Jul 18 14:58:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pat Haugen X-Patchwork-Id: 260073 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id BEE052C0090 for ; Fri, 19 Jul 2013 00:58:56 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=VChc8LqFdQt6SKPaiiA/eE/4vytGhHvaSb7AxxF4lWo Oh1lg2ezaYIbVqzJMiHZnq/BsNkHlakQQaR54xNV8iqzPoxijgalHZVE5hVdF+BK jgDaGq5xx8n+H93ung871KEqJj7kqzzRA1sY0jFEejI7CkWIqtx8z0XuXbBpbths = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=HV0wmuIcHD5i2/MvGpkA2ugzcaE=; b=MUwiseDDuJ46dpMuI hT5M4JD0QNm8iC0Ttd34KPlilsFJ0fEg6HCa5oaepu0c2f00s42+gyH+FHw5J6hZ F6yDFuxebfSdH6tcaO0Iw3PnV7JnO3VKp3jSVqo+ky4uEGKsmbGquNiVFaxolyyb ebn6VLHGcc7c2/PLufIXNB7loA= Received: (qmail 14209 invoked by alias); 18 Jul 2013 14:58:50 -0000 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 Received: (qmail 14198 invoked by uid 89); 18 Jul 2013 14:58:50 -0000 X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RDNS_NONE autolearn=no version=3.3.1 Received: from Unknown (HELO e39.co.us.ibm.com) (32.97.110.160) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 18 Jul 2013 14:58:49 +0000 Received: from /spool/local by e39.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Jul 2013 08:58:42 -0600 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e39.co.us.ibm.com (192.168.1.139) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 18 Jul 2013 08:58:39 -0600 Received: from d01relay07.pok.ibm.com (d01relay07.pok.ibm.com [9.56.227.147]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 1177E6E803F for ; Thu, 18 Jul 2013 10:58:34 -0400 (EDT) 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 r6IEwavT19988548 for ; Thu, 18 Jul 2013 10:58:36 -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 r6IEwaBr029051 for ; Thu, 18 Jul 2013 11:58:36 -0300 Received: from pthw510.ibm.com (sig-9-76-21-103.mts.ibm.com [9.76.21.103]) by d01av02.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r6IEwYjK028931; Thu, 18 Jul 2013 11:58:36 -0300 Message-ID: <51E8029A.2000708@linux.vnet.ibm.com> Date: Thu, 18 Jul 2013 09:58:34 -0500 From: Pat Haugen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130513 Thunderbird/17.0.6 MIME-Version: 1.0 To: GCC Patches CC: David Edelsohn Subject: [PATCH, rs6000] Fix flag interaction of new Power8 flags X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071814-3620-0000-0000-00000393D89C X-Virus-Found: No The following patch fixes a testsuite failure due to the fact that -mcpu=power8 was turning on the new flags such as power8-vector, which would then result in the VSX flag being turned back on after it was previously turned off due to a conflicting option such as -msoft-float. Bootstrap/regtest with no new regressions, ok for trunk? -Pat 2013-07-18 Pat Haugen * config/rs6000/rs6000.c (rs6000_option_override_internal): Adjust flag interaction for new Power8 flags and VSX. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 200903) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -2952,7 +2952,10 @@ rs6000_option_override_internal (bool gl if (rs6000_isa_flags_explicit & OPTION_MASK_VSX) msg = N_("-mvsx requires hardware floating point"); else - rs6000_isa_flags &= ~ OPTION_MASK_VSX; + { + rs6000_isa_flags &= ~ OPTION_MASK_VSX; + rs6000_isa_flags_explicit |= OPTION_MASK_VSX; + } } else if (TARGET_PAIRED_FLOAT) msg = N_("-mvsx and -mpaired are incompatible"); @@ -2980,6 +2983,16 @@ rs6000_option_override_internal (bool gl } } + /* If hard-float/altivec/vsx were explicitly turned off then don't allow + the -mcpu setting to enable options that conflict. */ + if ((!TARGET_HARD_FLOAT || !TARGET_ALTIVEC || !TARGET_VSX) + && (rs6000_isa_flags_explicit & (OPTION_MASK_SOFT_FLOAT + | OPTION_MASK_ALTIVEC + | OPTION_MASK_VSX)) != 0) + rs6000_isa_flags &= ~((OPTION_MASK_P8_VECTOR | OPTION_MASK_CRYPTO + | OPTION_MASK_DIRECT_MOVE) + & ~rs6000_isa_flags_explicit); + if (TARGET_DEBUG_REG || TARGET_DEBUG_TARGET) rs6000_print_isa_options (stderr, 0, "before defaults", rs6000_isa_flags);