This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [arm][patch] fix arm_neon_ok check on !arm_arch7


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]