This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[ARM][PATCH] Fix failing poly64 tests on ARM
- From: Tamar Christina <Tamar dot Christina at arm dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Christophe Lyon <christophe dot lyon at linaro dot org>, Kyrylo Tkachov <Kyrylo dot Tkachov at arm dot com>, "nickc at redhat dot com" <nickc at redhat dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Cc: nd <nd at arm dot com>
- Date: Mon, 5 Dec 2016 10:39:25 +0000
- Subject: [ARM][PATCH] Fix failing poly64 tests on ARM
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Tamar dot Christina at arm dot com;
- Nodisclaimer: True
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi All,
This patch fixes test failures on arm-none-eabi.
Poly64 was being used by files that were not supposed
to be testing poly64 types.
I have added a new MACRO that must be defined in addition
to having CRYPTO available before use of Poly64 types are
allowed in the header arm-neon-ref.h.
Ok for trunk?
gcc/testsuite/
2016-12-01 Tamar Christina <tamar.christina@arm.com>
* gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h: Gate use of Poly64 on USE_CRYPTO_TYPES.
* gcc.target/aarch64/advsimd-intrinsics/p64_p128.c: Define USE_CRYPTO_TYPES.
* gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p128.c: Likewise.
* gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p64.c: Likewise.
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
index beaf6ac31d5c5affe3702a505ad0df8679229e32..8ed76c5c6f0adef4f5c123add1043eed1122ce84 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/arm-neon-ref.h
@@ -40,6 +40,10 @@ extern size_t strlen(const char *);
#define AARCH64_ONLY(X)
#endif
+#if defined (USE_POLY_TYPES) && defined (__ARM_FEATURE_CRYPTO)
+#define USE_CRYPTO_TYPES 1
+#endif
+
#define xSTR(X) #X
#define STR(X) xSTR(X)
@@ -99,7 +103,7 @@ extern size_t strlen(const char *);
fprintf(stderr, "CHECKED %s %s\n", STR(VECT_TYPE(T, W, N)), MSG); \
}
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
#define CHECK_CRYPTO(MSG,T,W,N,FMT,EXPECTED,COMMENT) \
CHECK(MSG,T,W,N,FMT,EXPECTED,COMMENT)
#else
@@ -155,7 +159,7 @@ static ARRAY(result, uint, 32, 2);
static ARRAY(result, uint, 64, 1);
static ARRAY(result, poly, 8, 8);
static ARRAY(result, poly, 16, 4);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
static ARRAY(result, poly, 64, 1);
#endif
#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -175,7 +179,7 @@ static ARRAY(result, uint, 32, 4);
static ARRAY(result, uint, 64, 2);
static ARRAY(result, poly, 8, 16);
static ARRAY(result, poly, 16, 8);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
static ARRAY(result, poly, 64, 2);
#endif
#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -198,7 +202,7 @@ extern ARRAY(expected, uint, 32, 2);
extern ARRAY(expected, uint, 64, 1);
extern ARRAY(expected, poly, 8, 8);
extern ARRAY(expected, poly, 16, 4);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
extern ARRAY(expected, poly, 64, 1);
#endif
extern ARRAY(expected, hfloat, 16, 4);
@@ -214,7 +218,7 @@ extern ARRAY(expected, uint, 32, 4);
extern ARRAY(expected, uint, 64, 2);
extern ARRAY(expected, poly, 8, 16);
extern ARRAY(expected, poly, 16, 8);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
extern ARRAY(expected, poly, 64, 2);
#endif
extern ARRAY(expected, hfloat, 16, 8);
@@ -420,7 +424,7 @@ static void clean_results (void)
CLEAN(result, uint, 64, 1);
CLEAN(result, poly, 8, 8);
CLEAN(result, poly, 16, 4);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
CLEAN(result, poly, 64, 1);
#endif
#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -438,7 +442,7 @@ static void clean_results (void)
CLEAN(result, uint, 64, 2);
CLEAN(result, poly, 8, 16);
CLEAN(result, poly, 16, 8);
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
CLEAN(result, poly, 64, 2);
#endif
#if defined (__ARM_FP16_FORMAT_IEEE) || defined (__ARM_FP16_FORMAT_ALTERNATIVE)
@@ -466,7 +470,7 @@ static void clean_results (void)
#define DECL_VARIABLE(VAR, T1, W, N) \
VECT_TYPE(T1, W, N) VECT_VAR(VAR, T1, W, N)
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
#define DECL_VARIABLE_CRYPTO(VAR, T1, W, N) \
DECL_VARIABLE(VAR, T1, W, N)
#else
@@ -570,7 +574,7 @@ static void clean_results (void)
/* Helpers to call macros with 1 constant and 5 variable
arguments. */
-#if defined (__ARM_FEATURE_CRYPTO)
+#if defined (USE_CRYPTO_TYPES)
#define MACRO_CRYPTO(MACRO, VAR1, VAR2, T1, T2, T3, W, N) \
MACRO(VAR1, VAR2, T1, T2, T3, W, N)
#else
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/p64_p128.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/p64_p128.c
index 8907b38cde90b44a8f1501f72b2c4e812cba5707..1b66a6a243ac5ea16cf1d05cb4f2853a5ed23e7d 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/p64_p128.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/p64_p128.c
@@ -4,7 +4,7 @@
/* { dg-require-effective-target arm_crypto_ok { target { arm*-*-* } } } */
/* { dg-add-options arm_crypto } */
/* { dg-additional-options "-march=armv8-a+crypto" { target { aarch64*-*-* } } }*/
-
+#define USE_POLY_TYPES 1
#include <arm_neon.h>
#include "arm-neon-ref.h"
#include "compute-ref-data.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p128.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p128.c
index f192d4dda514287c8417e7fc922bc580b209b163..5529f03140e8411a73d4c837608db5ba25a39bcd 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p128.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p128.c
@@ -3,7 +3,7 @@
/* { dg-require-effective-target arm_crypto_ok { target { arm*-*-* } } } */
/* { dg-add-options arm_crypto } */
/* { dg-additional-options "-march=armv8-a+crypto" { target { aarch64*-*-* } } }*/
-
+#define USE_POLY_TYPES 1
#include <arm_neon.h>
#include "arm-neon-ref.h"
#include "compute-ref-data.h"
diff --git a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p64.c b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p64.c
index c915fd2fea6b4d8770c9a4aab88caad391105d89..23db9988396f971175dd339fb4b20beed7d353f8 100644
--- a/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p64.c
+++ b/gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vreinterpret_p64.c
@@ -3,7 +3,7 @@
/* { dg-require-effective-target arm_crypto_ok { target { arm*-*-* } } } */
/* { dg-add-options arm_crypto } */
/* { dg-additional-options "-march=armv8-a+crypto" { target { aarch64*-*-* } } }*/
-
+#define USE_POLY_TYPES 1
#include <arm_neon.h>
#include "arm-neon-ref.h"
#include "compute-ref-data.h"