This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [arm][patch] fix arm_neon_ok check on !arm_arch7
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Andrew Stubbs <ams at codesourcery dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 15 Sep 2014 10:46:40 +0100
- Subject: Re: [arm][patch] fix arm_neon_ok check on !arm_arch7
- Authentication-results: sourceware.org; auth=none
- References: <5414B99D dot 3020202 at codesourcery dot com>
On 13/09/14 22:39, Andrew Stubbs wrote:
> Hi,
>
> I get a lot of "vect/*" and "neon-*" test failure in my armv5te testing
> because the arm_neon_ok test incorrectly detects that NEON is valid on
> arm926ej-s.
>
> It turns out that the reason is that the compiler only disallows NEON
> for Thumb1 or soft-float configurations. Otherwise it just takes
> -mfpu=neon at face value, regardless of -march or -mcpu.
>
> This patch limits NEON to armv7 or higher.
>
> OK?
>
> Andrew
>
>
> arm_neon_ok.patch
>
>
> 2014-09-13 Andrew Stubbs <ams@codesourcery.com>
>
> gcc/
> * config/arm/arm.h (TARGET_NEON): Ensure target is v7 or higher.
>
> Index: gcc/config/arm/arm.h
> ===================================================================
> --- gcc/config/arm/arm.h (revision 215228)
> +++ gcc/config/arm/arm.h (working copy)
> @@ -323,6 +323,7 @@
> and TARGET_HARD_FLOAT to ensure that NEON instructions are
> available. */
> #define TARGET_NEON (TARGET_32BIT && TARGET_HARD_FLOAT \
> + && arm_arch7 \
> && TARGET_VFP && arm_fpu_desc->neon)
>
> /* Q-bit is present. */
>
Hmm, I wonder if arm_override_options should reject neon + (arch < 7).
R.