From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Archive: List-Post: List-Help: Sender: gcc-patches-owner@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:00 -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 Content-Type: multipart/mixed; boundary="------------080507040002070208070109" X-SW-Source: 2016-02/txt/msg01967.txt.bz2 This is a multi-part message in MIME format. --------------080507040002070208070109 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-length: 718 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. --------------080507040002070208070109 Content-Type: text/x-patch; name="arm-neon-soft.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="arm-neon-soft.patch" Content-length: 618 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 --------------080507040002070208070109--