aboutsummaryrefslogtreecommitdiffstats
path: root/test/c/siphash24.c
diff options
context:
space:
mode:
authorDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-20 14:06:21 +0200
committerDavid Monniaux <david.monniaux@univ-grenoble-alpes.fr>2020-04-20 14:06:21 +0200
commit168393089024b5f926836cb813fddf14e6b6e4d4 (patch)
tree5d018198dc26be847544f162b87ad3dcecbab479 /test/c/siphash24.c
parent633b72565b022f159526338b5bbb9fcac86dfd2b (diff)
parentb3431b1d9ee5121883d307cff0b62b7e53369891 (diff)
downloadcompcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.tar.gz
compcert-kvx-168393089024b5f926836cb813fddf14e6b6e4d4.zip
Merge remote-tracking branch 'origin/mppa-work' into mppa-fast-div
(unfinished)
Diffstat (limited to 'test/c/siphash24.c')
-rw-r--r--test/c/siphash24.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/c/siphash24.c b/test/c/siphash24.c
index 4a42e013..ce0df78c 100644
--- a/test/c/siphash24.c
+++ b/test/c/siphash24.c
@@ -235,13 +235,19 @@ int test_vectors()
u8 testdata[100] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 12, 34, 56, 78, 90 };
+#ifdef __K1C__
+#define NITER 1000
+#else
+#define NITER 1000000
+#endif
+
int speed_test(void)
{
u8 out[8], k[16];
int i;
for(i = 0; i < 16; ++i ) k[i] = i;
- for(i = 0; i < 1000000; i++) {
+ for(i = 0; i < NITER; i++) {
testdata[99] = (u8) i;
crypto_auth(out, testdata, 100, k);
}