diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-17 09:23:07 +0100 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-03-17 09:23:07 +0100 |
commit | b2fd964630a1e4964d97bfe84a550a701bb936b7 (patch) | |
tree | 95598f5a2bc5cc1b74496ccf71f6f343a0c008f4 /test/monniaux/sha-2 | |
parent | 8442b551dc87574bb54645adff41516b8ad02a96 (diff) | |
download | compcert-kvx-b2fd964630a1e4964d97bfe84a550a701bb936b7.tar.gz compcert-kvx-b2fd964630a1e4964d97bfe84a550a701bb936b7.zip |
isolate the slow part
Diffstat (limited to 'test/monniaux/sha-2')
-rw-r--r-- | test/monniaux/sha-2/sha-256.c | 1 | ||||
-rw-r--r-- | test/monniaux/sha-2/sha-256_run.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/test/monniaux/sha-2/sha-256.c b/test/monniaux/sha-2/sha-256.c index 05945b80..3bd48c44 100644 --- a/test/monniaux/sha-2/sha-256.c +++ b/test/monniaux/sha-2/sha-256.c @@ -289,6 +289,7 @@ void calc_sha_256(uint8_t hash[32], const void * input, size_t len) } /* Extend the first 16 words into the remaining 48 words w[16..63] of the message schedule array: */ + /* DM this is a SLOW part with ccomp */ for (i = 16; i < 64; i++) { const uint32_t s0 = right_rot7(w[i - 15]) ^ right_rot18(w[i - 15]) ^ (w[i - 15] >> 3); const uint32_t s1 = right_rot17(w[i - 2]) ^ right_rot19(w[i - 2]) ^ (w[i - 2] >> 10); diff --git a/test/monniaux/sha-2/sha-256_run.c b/test/monniaux/sha-2/sha-256_run.c index 982fc538..c3865991 100644 --- a/test/monniaux/sha-2/sha-256_run.c +++ b/test/monniaux/sha-2/sha-256_run.c @@ -268,15 +268,15 @@ int main(void) for (i = 0; i < (sizeof STRING_VECTORS / sizeof (struct string_vector)); i++) { const struct string_vector *vector = &STRING_VECTORS[i]; if (string_test(vector->input, vector->output)) - return 1; + {} /* DM return 1; */ } construct_binary_messages(); for (i = 0; i < (sizeof vectors / sizeof (struct vector)); i++) { const struct vector *vector = &vectors[i]; if (test(vector->input, vector->input_len, vector->output)) - { + { /* DM destruct_binary_messages(); - return 1; + return 1; */ } } destruct_binary_messages(); |