diff mbox

[testsuite] add __ARM_ARCH check for arm_v8_neon_ok

Message ID 53E93D3D.2050109@mentor.com
State New
Headers show

Commit Message

Janis Johnson Aug. 11, 2014, 10:01 p.m. UTC
The check for effective target arm_v8_neon_ok passes even if __ARM_ARCH
is not 8 or greater, but then some tests fail because intrinsic functions
used in the test have not been declared.  This patch requires that
__ARM_ARCH be 8 or greater.  Tested for arm-none-linux-gnu for mainline
and 4.9 with a variety of multilib flags.

OK for mainline and the 4.9 branch?

Janis
2014-08-11  Janis Johnson  <janisjo@codesourcery.com>

	* lib/target/supports.exp
	(check_effective_target_arm_v8_neon_ok_nocache): Check for armv8
	or later.

Comments

Mike Stump Aug. 11, 2014, 11:56 p.m. UTC | #1
On Aug 11, 2014, at 3:01 PM, Janis Johnson <janis_johnson@mentor.com> wrote:
> The check for effective target arm_v8_neon_ok passes even if __ARM_ARCH
> is not 8 or greater, but then some tests fail because intrinsic functions
> used in the test have not been declared.  This patch requires that
> __ARM_ARCH be 8 or greater.  Tested for arm-none-linux-gnu for mainline
> and 4.9 with a variety of multilib flags.
> 
> OK for mainline and the 4.9 branch?

Ok.
Ramana Radhakrishnan Aug. 14, 2014, 8:06 a.m. UTC | #2
On Mon, Aug 11, 2014 at 11:01 PM, Janis Johnson
<janis_johnson@mentor.com> wrote:
> The check for effective target arm_v8_neon_ok passes even if __ARM_ARCH
> is not 8 or greater, but then some tests fail because intrinsic functions
> used in the test have not been declared.  This patch requires that
> __ARM_ARCH be 8 or greater.  Tested for arm-none-linux-gnu for mainline
> and 4.9 with a variety of multilib flags.


Out of curiosity  - A number of tests are gated off by the target
triplet arm*-*-*eabi* , I wonder how many of them actually run if you
test with arm-none-linux-gnu . Also given this is the pre-EABI linux
triplet, so I'd prefer not to conflate this with the use of the
triplet arm-none-linux-gnueabi(hf).

regards
Ramana
>
> OK for mainline and the 4.9 branch?
>
> Janis
Janis Johnson Aug. 15, 2014, 12:01 a.m. UTC | #3
On 08/14/2014 01:06 AM, Ramana Radhakrishnan wrote:
> On Mon, Aug 11, 2014 at 11:01 PM, Janis Johnson
> <janis_johnson@mentor.com> wrote:
>> The check for effective target arm_v8_neon_ok passes even if __ARM_ARCH
>> is not 8 or greater, but then some tests fail because intrinsic functions
>> used in the test have not been declared.  This patch requires that
>> __ARM_ARCH be 8 or greater.  Tested for arm-none-linux-gnu for mainline
>> and 4.9 with a variety of multilib flags.
> 
> 
> Out of curiosity  - A number of tests are gated off by the target
> triplet arm*-*-*eabi* , I wonder how many of them actually run if you
> test with arm-none-linux-gnu . Also given this is the pre-EABI linux
> triplet, so I'd prefer not to conflate this with the use of the
> triplet arm-none-linux-gnueabi(hf).
> 

I hadn't noticed those but yes, they are run for arm-none-linux-gnueabi.
The effective-target arm_eabi checks for __ARM_EABI__, which is also true
for arm-none-linux-gnueabi.

I was wrong about my upstream testing in this case; I used arm-none-eabi,
and testing with our sources used both arm-none-eabi and arm-none-linux-gnueabi.

Janis
diff mbox

Patch

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 213831)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -2578,6 +2578,9 @@ 
     if { [check_effective_target_arm32] } {
 	foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp-armv8" "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"} {
 	    if { [check_no_compiler_messages_nocache arm_v8_neon_ok object {
+		#if __ARM_ARCH < 8
+		#error not armv8 or later
+		#endif
 		#include "arm_neon.h"
 		void
 		foo ()