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
2014-09-13  Andrew Stubbs  <a...@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.  */

Reply via email to