On 12/01/15 13:50, Ramana Radhakrishnan wrote:
In principle ok, but I'd like a comment in there explaining why we've
done this. Can you also post under what configurations these have been
tested ?

Is this better?

I tested it by running the vect.exp tests with a variety of -mcpu flags.

Andrew

2015-01-13  Andrew Stubbs  <a...@codesourcery.com>

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_arm_neon_ok_nocache): Don't try to test Neon
	on ARM architures before v7.

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 219058)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -2565,6 +2565,11 @@
 	    if { [check_no_compiler_messages_nocache arm_neon_ok object {
 		#include "arm_neon.h"
 		int dummy;
+		/* Avoid the case where a test adds -mfpu=neon, but the toolchain is
+		   configured for -mcpu=arm926ej-s, for example.  */
+		#if __ARM_ARCH < 7
+		#error Architecture too old for NEON.
+		#endif
 	    } "$flags"] } {
 		set et_arm_neon_flags $flags
 		return 1

Reply via email to