From patchwork Mon Feb 29 17:48:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 590065 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 07933140778 for ; Tue, 1 Mar 2016 04:48:57 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=utFiODbu; dkim-atps=neutral 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=Yv04YW3NJSynZoxDn4qC/Ruwqxq4PfDudKyF98T+4qP MW5mB2ezUTQw1ahKFylsJS/IsRpy4J5Eqar1hVbWC8UGgmyQYWZUDQRupU+bogU5 hBtBrHVeH5FUddWm33416hgSkNlvBDco9DQrmyQP6Z8t9tkEUVMIn6tjdWiBnhvY = 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=kK+6gJUP2HrxvNBtUPtfe6RAxRc=; b=utFiODbudh6FgpgW0 Wor17yluA8qXjR7qtCCzCD5f+LuEAub9qcgNAuc2j0ZsiolpopL8cV7X5hS81Kmy bOQMYpJcMJyTddOUZPVlrUQd2Bpnq/PU3hQHLM2FzvD5S5yWYG1Pn6YZg5XaMJ4I SwvVV0uZn0W0Bu5T24QMWNOYMQ= Received: (qmail 35924 invoked by alias); 29 Feb 2016 17:48: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 35903 invoked by uid 89); 29 Feb 2016 17:48:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Feb 2016 17:48:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8029E49; Mon, 29 Feb 2016 09:47:52 -0800 (PST) Received: from [10.2.206.200] (e100706-lin.cambridge.arm.com [10.2.206.200]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 947F83F213; Mon, 29 Feb 2016 09:48:46 -0800 (PST) Message-ID: <56D4847C.1000305@foss.arm.com> Date: Mon, 29 Feb 2016 17:48:44 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches CC: Ramana Radhakrishnan , Richard Earnshaw Subject: [PATCH][ARM] Error out of arm_neon.h if compiling for soft-float ABI Hi all, Now that we've moved to pragmas guarding the various intrinsics in arm_neon.h I think we should still throw a #error if someone tries to include the header while compiling for -mfloat-abi=soft. This gives a more helpful error message when someone has a compiler configured --with-float=soft and forgets to add an appropriate -mfloat-abi option on the command line. Currently we'll just give tons of error messages whereas with this patch we just show a simple clean message. Tested on arm. This could be argued to be a user experience regression fix. Ok for trunk? Thanks, Kyrill 2016-02-29 Kyrylo Tkachov * config/arm/arm_neon.h: Show error if using with soft-float ABI. diff --git a/gcc/config/arm/arm_neon.h b/gcc/config/arm/arm_neon.h index 47816d52187b979b92d7592991d29e4cbe8f9357..6a880235d24759e9938fb08365eaddff77d60f0e 100644 --- a/gcc/config/arm/arm_neon.h +++ b/gcc/config/arm/arm_neon.h @@ -27,6 +27,10 @@ #ifndef _GCC_ARM_NEON_H #define _GCC_ARM_NEON_H 1 +#ifndef __ARM_FP +#error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softp or -mfloat-abi=hard" +#else + #pragma GCC push_options #pragma GCC target ("fpu=neon") @@ -14833,3 +14837,4 @@ vmull_high_p64 (poly64x2_t __a, poly64x2_t __b) #pragma GCC pop_options #endif +#endif