From: Julian Seward Date: Sun, 16 Aug 2015 12:18:26 +0000 (+0000) Subject: Enable building of ARMv8 crypto instruction tests, having finally X-Git-Tag: svn/VALGRIND_3_11_0~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3953fe144cfac4c1b382d9cd2cb74252334256d2;p=thirdparty%2Fvalgrind.git Enable building of ARMv8 crypto instruction tests, having finally figured out what the relevant gcc flag is. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15557 --- diff --git a/none/tests/arm64/Makefile.am b/none/tests/arm64/Makefile.am index 135d64fb72..f06e30b89f 100644 --- a/none/tests/arm64/Makefile.am +++ b/none/tests/arm64/Makefile.am @@ -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 diff --git a/none/tests/arm64/fp_and_simd.c b/none/tests/arm64/fp_and_simd.c index 6928bb1d04..0aba2c8f87 100644 --- a/none/tests/arm64/fp_and_simd.c +++ b/none/tests/arm64/fp_and_simd.c @@ -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; }