]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Enable building of ARMv8 crypto instruction tests, having finally
authorJulian Seward <jseward@acm.org>
Sun, 16 Aug 2015 12:18:26 +0000 (12:18 +0000)
committerJulian Seward <jseward@acm.org>
Sun, 16 Aug 2015 12:18:26 +0000 (12:18 +0000)
figured out what the relevant gcc flag is.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15557

none/tests/arm64/Makefile.am
none/tests/arm64/fp_and_simd.c

index 135d64fb725155f76c5313794d539b46ec7e562b..f06e30b89fe3450e14398c03a7c2999618b61606 100644 (file)
@@ -22,6 +22,7 @@ AM_CCASFLAGS += @FLAG_M64@
 
 allexec_CFLAGS     = $(AM_CFLAGS) @FLAG_W_NO_NONNULL@
 
+fp_and_simd_CFLAGS = $(AM_CFLAGS) -march=armv8-a+crypto
 integer_CFLAGS     = $(AM_CFLAGS) -g -O0 -DTEST_BFM=0
 
 fp_and_simd_LDADD  = -lm
index 6928bb1d045d58a9a778a8e3883d8e5032d89278..0aba2c8f87dd20626e725fa7d6abcee5c0e7324a 100644 (file)
@@ -4527,23 +4527,23 @@ GEN_UNARY_TEST(xtn2, 16b, 8h)
 // GNU assembler (GNU Binutils) 2.24.0.20140311 Linaro 2014.03
 // cannot be persuaded to accept those instructions (AFAICT).
 
-//GEN_TWOVEC_TEST(aesd_16b_16b,    "aesd v6.16b,  v27.16b",  6, 27)
-//GEN_TWOVEC_TEST(aese_16b_16b,    "aese v6.16b,  v27.16b",  6, 27)
-//GEN_TWOVEC_TEST(aesimc_16b_16b,  "aesimc v6.16b,  v27.16b",  6, 27)
-//GEN_TWOVEC_TEST(aesmc_16b_16b,   "aesmc v6.16b,  v27.16b",  6, 27)
-//
-//GEN_THREEVEC_TEST(sha1c_q_s_4s,     "sha1c q29, s28, v27.4s", 29,28,27)
-//GEN_TWOVEC_TEST(sha1h_s_s,          "sha1h s6,  s27",  6, 27)
-//GEN_THREEVEC_TEST(sha1m_q_s_4s,     "sha1m q29, s28, v27.4s", 29,28,27)
-//GEN_THREEVEC_TEST(sha1p_q_s_4s,     "sha1p q29, s28, v27.4s", 29,28,27)
-//GEN_THREEVEC_TEST(sha1su0_4s_4s_4s, "sha1su0 v29.4s, v28.4s, v27.4s", 29,28,27)
-//GEN_TWOVEC_TEST(sha1su1_4s_4s,      "sha1su1 v6.4s,  v27.4s",  6, 27)
-//
-//GEN_THREEVEC_TEST(sha256h2_q_q_4s,  "sha256h2 q29, q28, v27.4s", 29,28,27)
-//GEN_THREEVEC_TEST(sha256h_q_q_4s,   "sha256h q29, q28, v27.4s", 29,28,27)
-//GEN_TWOVEC_TEST(sha256su0_4s_4s,    "sha256su0 v6.4s,  v27.4s",  6, 27)
-//GEN_THREEVEC_TEST(sha256su1_4s_4s_4s, "sha256su1 v29.4s, v28.4s, v27.4s", 
-//                                      29,28,27)
+GEN_TWOVEC_TEST(aesd_16b_16b,    "aesd v6.16b,  v27.16b",  6, 27)
+GEN_TWOVEC_TEST(aese_16b_16b,    "aese v6.16b,  v27.16b",  6, 27)
+GEN_TWOVEC_TEST(aesimc_16b_16b,  "aesimc v6.16b,  v27.16b",  6, 27)
+GEN_TWOVEC_TEST(aesmc_16b_16b,   "aesmc v6.16b,  v27.16b",  6, 27)
+
+GEN_THREEVEC_TEST(sha1c_q_s_4s,     "sha1c q29, s28, v27.4s", 29,28,27)
+GEN_TWOVEC_TEST(sha1h_s_s,          "sha1h s6,  s27",  6, 27)
+GEN_THREEVEC_TEST(sha1m_q_s_4s,     "sha1m q29, s28, v27.4s", 29,28,27)
+GEN_THREEVEC_TEST(sha1p_q_s_4s,     "sha1p q29, s28, v27.4s", 29,28,27)
+GEN_THREEVEC_TEST(sha1su0_4s_4s_4s, "sha1su0 v29.4s, v28.4s, v27.4s", 29,28,27)
+GEN_TWOVEC_TEST(sha1su1_4s_4s,      "sha1su1 v6.4s,  v27.4s",  6, 27)
+
+GEN_THREEVEC_TEST(sha256h2_q_q_4s,  "sha256h2 q29, q28, v27.4s", 29,28,27)
+GEN_THREEVEC_TEST(sha256h_q_q_4s,   "sha256h q29, q28, v27.4s", 29,28,27)
+GEN_TWOVEC_TEST(sha256su0_4s_4s,    "sha256su0 v6.4s,  v27.4s",  6, 27)
+GEN_THREEVEC_TEST(sha256su1_4s_4s_4s, "sha256su1 v29.4s, v28.4s, v27.4s", 
+                                      29,28,27)
 
 
 /* ---------------------------------------------------------------- */
@@ -7385,18 +7385,14 @@ int main ( void )
 
    // ======================== CRYPTO ========================
 
-   // These tests are believed to be correct but are disabled because
-   // GNU assembler (GNU Binutils) 2.24.0.20140311 Linaro 2014.03
-   // cannot be persuaded to accept those instructions (AFAICT).
-
    // aesd       16b (aes single round decryption)
    // aese       16b (aes single round encryption)
    // aesimc     16b (aes inverse mix columns)
    // aesmc      16b (aes mix columns)
-   //if (0) test_aesd_16b_16b(TyNONE);
-   //if (0) test_aese_16b_16b(TyNONE);
-   //if (0) test_aesimc_16b_16b(TyNONE);
-   //if (0) test_aesmc_16b_16b(TyNONE);
+   if (0) test_aesd_16b_16b(TyNONE);
+   if (0) test_aese_16b_16b(TyNONE);
+   if (0) test_aesimc_16b_16b(TyNONE);
+   if (0) test_aesmc_16b_16b(TyNONE);
 
    // sha1c      q_s_4s
    // sha1h      s_s
@@ -7404,21 +7400,21 @@ int main ( void )
    // sha1p      q_s_4s
    // sha1su0    4s_4s_4s
    // sha1su1    4s_4s
-   //if (0) test_sha1c_q_s_4s(TyNONE);
-   //if (0) test_sha1h_s_s(TyNONE);
-   //if (0) test_sha1m_q_s_4s(TyNONE);
-   //if (0) test_sha1p_q_s_4s(TyNONE);
-   //if (0) test_sha1su0_4s_4s_4s(TyNONE);
-   //if (0) test_sha1su1_4s_4s(TyNONE);
+   if (0) test_sha1c_q_s_4s(TyNONE);
+   if (0) test_sha1h_s_s(TyNONE);
+   if (0) test_sha1m_q_s_4s(TyNONE);
+   if (0) test_sha1p_q_s_4s(TyNONE);
+   if (0) test_sha1su0_4s_4s_4s(TyNONE);
+   if (0) test_sha1su1_4s_4s(TyNONE);
 
    // sha256h2   q_q_4s
    // sha256h    q_q_4s
    // sha256su0  4s_4s
    // sha256su1  4s_4s_4s
-   //if (0) test_sha256h2_q_q_4s(TyNONE);
-   //if (0) test_sha256h_q_q_4s(TyNONE);
-   //if (0) test_sha256su0_4s_4s(TyNONE);
-   //if (0) test_sha256su1_4s_4s_4s(TyNONE);
+   if (0) test_sha256h2_q_q_4s(TyNONE);
+   if (0) test_sha256h_q_q_4s(TyNONE);
+   if (0) test_sha256su0_4s_4s(TyNONE);
+   if (0) test_sha256su1_4s_4s_4s(TyNONE);
 
    return 0;
 }