From patchwork Sat Mar 8 09:28:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 328170 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8B56B2C00AC for ; Sat, 8 Mar 2014 20:28:19 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:date:message-id:mime-version:content-type; q=dns; s= default; b=SjzzTxKQuYddjkafG/wB8tJqn0j0HysjeSCBPMNnt8WGHw8bfFVgE azG8L25ke1VyheEHiQSiUHciDQHjjqCgRzMJIf4DqexWo1+IomaAA40KaFQExf6S g6/LuBnQd2Wb0M14qxbxOE+fSklGokC0fWcz5rMLUmegrMbgUyBvMY= 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:from :to:subject:date:message-id:mime-version:content-type; s= default; bh=NLjTM9xqPr+/JYLKCBtp3RHFJtU=; b=H3oLgWa7qL95TluZy/ea FTtVexlwOjDXASQ/YtLNw7rmUelbddUfHrOj5Q+J+3gMexK7HXfaMtSTTXuZI8c0 zEeBbnStrP1DasX5hMbiU4v2cFp4SUTiSluoA3y/1ykb5Cb3PE2Z2kZeedYdSfce AvxXJRsRvLlZi+0W9R/HP+8= Received: (qmail 15880 invoked by alias); 8 Mar 2014 09:28:12 -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 15867 invoked by uid 89); 8 Mar 2014 09:28:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wg0-f42.google.com Received: from mail-wg0-f42.google.com (HELO mail-wg0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 08 Mar 2014 09:28:10 +0000 Received: by mail-wg0-f42.google.com with SMTP id y10so6260160wgg.1 for ; Sat, 08 Mar 2014 01:28:06 -0800 (PST) X-Received: by 10.180.188.169 with SMTP id gb9mr990368wic.17.1394270886446; Sat, 08 Mar 2014 01:28:06 -0800 (PST) Received: from localhost ([2.28.235.12]) by mx.google.com with ESMTPSA id q15sm23209947wjw.18.2014.03.08.01.28.05 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Mar 2014 01:28:05 -0800 (PST) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Subject: [committed] PR 58271: Upgrade a warning to an error Date: Sat, 08 Mar 2014 09:28:01 +0000 Message-ID: <87y50l82fy.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 PR 58271 shows a case where using -mips3 -mpaired-single will print: warning: the 'mips3' architecture does not support paired-single instructions [enabled by default] and then ICE because the -mpaired-single support implicitly assumes that MIPS IV features are available. The ICE in this case is a regression from 4.7, although 4.7 would probably ICE in other situations. This patch upgrades the warning to an error and disables -mips3d and -mpaired-single when they are not available. Tested on mips64-linux-gnu and applied. Thanks, Richard gcc/ PR target/58271 * config/mips/mips.c (mips_option_override): Promote -mpaired-single warning to an error. Disable TARGET_PAIRED_SINGLE and TARGET_MIPS3D if they can't be used. Index: gcc/config/mips/mips.c =================================================================== --- gcc/config/mips/mips.c 2014-02-02 16:10:04.116587339 +0000 +++ gcc/config/mips/mips.c 2014-03-05 20:44:40.651657638 +0000 @@ -17206,15 +17206,24 @@ mips_option_override (void) /* Make sure that when TARGET_PAIRED_SINGLE_FLOAT is true, TARGET_FLOAT64 and TARGET_HARD_FLOAT_ABI are both true. */ if (TARGET_PAIRED_SINGLE_FLOAT && !(TARGET_FLOAT64 && TARGET_HARD_FLOAT_ABI)) - error ("%qs must be used with %qs", - TARGET_MIPS3D ? "-mips3d" : "-mpaired-single", - TARGET_HARD_FLOAT_ABI ? "-mfp64" : "-mhard-float"); + { + error ("%qs must be used with %qs", + TARGET_MIPS3D ? "-mips3d" : "-mpaired-single", + TARGET_HARD_FLOAT_ABI ? "-mfp64" : "-mhard-float"); + target_flags &= ~MASK_PAIRED_SINGLE_FLOAT; + TARGET_MIPS3D = 0; + } - /* Make sure that the ISA supports TARGET_PAIRED_SINGLE_FLOAT when it is - enabled. */ + /* Make sure that -mpaired-single is only used on ISAs that support it. + We must disable it otherwise since it relies on other ISA properties + like ISA_HAS_8CC having their normal values. */ if (TARGET_PAIRED_SINGLE_FLOAT && !ISA_HAS_PAIRED_SINGLE) - warning (0, "the %qs architecture does not support paired-single" + { + error ("the %qs architecture does not support paired-single" " instructions", mips_arch_info->name); + target_flags &= ~MASK_PAIRED_SINGLE_FLOAT; + TARGET_MIPS3D = 0; + } if (mips_r10k_cache_barrier != R10K_CACHE_BARRIER_NONE && !TARGET_CACHE_BUILTIN)