Skip to content

Commit 93e9866

Browse files
author
sewardj
committed
Add test cases for: SHA1C SHA1H SHA1M SHA1P SHA1SU0 SHA1SU1 SHA256H2 SHA256H
SHA256SU0 SHA256SU1. Increase the number of iterations from 10 to 50 for AESD AESE AESIMC AESMC. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15908 a5019735-40e9-0310-863c-91ae7b9d1cf9
1 parent 63d0832 commit 93e9866

File tree

2 files changed

+717
-53
lines changed

2 files changed

+717
-53
lines changed

none/tests/arm64/fp_and_simd.c

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4548,7 +4548,6 @@ GEN_THREEVEC_TEST(sha256su1_4s_4s_4s, "sha256su1 v29.4s, v28.4s, v27.4s",
45484548

45494549
int main ( void )
45504550
{
4551-
int i;
45524551
assert(sizeof(V128) == 16);
45534552

45544553
// ======================== FP ========================
@@ -7382,44 +7381,36 @@ int main ( void )
73827381

73837382
// ======================== CRYPTO ========================
73847383

7385-
// By default each test only runs once. That seems a bit too minimal
7386-
// for the crypto ones. So here's an extra run multiplication factor.
7387-
const int CRYPTO_ITER_MULTIPLIER = 10;
7388-
73897384
// aesd 16b (aes single round decryption)
73907385
// aese 16b (aes single round encryption)
73917386
// aesimc 16b (aes inverse mix columns)
73927387
// aesmc 16b (aes mix columns)
7393-
if (1) for (i = 0; i < CRYPTO_ITER_MULTIPLIER; i++)
7394-
test_aesd_16b_16b(TyNONE);
7395-
if (1) for (i = 0; i < CRYPTO_ITER_MULTIPLIER; i++)
7396-
test_aese_16b_16b(TyNONE);
7397-
if (1) for (i = 0; i < CRYPTO_ITER_MULTIPLIER; i++)
7398-
test_aesimc_16b_16b(TyNONE);
7399-
if (1) for (i = 0; i < CRYPTO_ITER_MULTIPLIER; i++)
7400-
test_aesmc_16b_16b(TyNONE);
7388+
if (1) DO50( test_aesd_16b_16b(TyNONE) );
7389+
if (1) DO50( test_aese_16b_16b(TyNONE) );
7390+
if (1) DO50( test_aesimc_16b_16b(TyNONE) );
7391+
if (1) DO50( test_aesmc_16b_16b(TyNONE) );
74017392

74027393
// sha1c q_s_4s
74037394
// sha1h s_s
74047395
// sha1m q_s_4s
74057396
// sha1p q_s_4s
74067397
// sha1su0 4s_4s_4s
74077398
// sha1su1 4s_4s
7408-
if (0) test_sha1c_q_s_4s(TyNONE);
7409-
if (0) test_sha1h_s_s(TyNONE);
7410-
if (0) test_sha1m_q_s_4s(TyNONE);
7411-
if (0) test_sha1p_q_s_4s(TyNONE);
7412-
if (0) test_sha1su0_4s_4s_4s(TyNONE);
7413-
if (0) test_sha1su1_4s_4s(TyNONE);
7399+
if (1) DO50( test_sha1c_q_s_4s(TyNONE) );
7400+
if (1) DO50( test_sha1h_s_s(TyNONE) );
7401+
if (1) DO50( test_sha1m_q_s_4s(TyNONE) );
7402+
if (1) DO50( test_sha1p_q_s_4s(TyNONE) );
7403+
if (1) DO50( test_sha1su0_4s_4s_4s(TyNONE) );
7404+
if (1) DO50( test_sha1su1_4s_4s(TyNONE) );
74147405

74157406
// sha256h2 q_q_4s
74167407
// sha256h q_q_4s
74177408
// sha256su0 4s_4s
74187409
// sha256su1 4s_4s_4s
7419-
if (0) test_sha256h2_q_q_4s(TyNONE);
7420-
if (0) test_sha256h_q_q_4s(TyNONE);
7421-
if (0) test_sha256su0_4s_4s(TyNONE);
7422-
if (0) test_sha256su1_4s_4s_4s(TyNONE);
7410+
if (1) DO50( test_sha256h2_q_q_4s(TyNONE) );
7411+
if (1) DO50( test_sha256h_q_q_4s(TyNONE) );
7412+
if (1) DO50( test_sha256su0_4s_4s(TyNONE) );
7413+
if (1) DO50( test_sha256su1_4s_4s_4s(TyNONE) );
74237414

74247415
return 0;
74257416
}

0 commit comments

Comments
 (0)