From 9ba9677d94409d428076221374ccb1c0ce9186b9 Mon Sep 17 00:00:00 2001 From: Karel Miko Date: Tue, 9 May 2017 22:10:42 +0200 Subject: [PATCH] x86_prof - spd1, spd2, avg are now ulong64 --- testprof/tomcrypt_test.h | 2 +- testprof/x86_prof.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/testprof/tomcrypt_test.h b/testprof/tomcrypt_test.h index 64f2c23..48c6c07 100644 --- a/testprof/tomcrypt_test.h +++ b/testprof/tomcrypt_test.h @@ -74,7 +74,7 @@ int multi_test(void); extern struct list { int id; - unsigned long spd1, spd2, avg; + ulong64 spd1, spd2, avg; } results[]; extern int no_results; diff --git a/testprof/x86_prof.c b/testprof/x86_prof.c index 43d8591..671ecb2 100644 --- a/testprof/x86_prof.c +++ b/testprof/x86_prof.c @@ -590,7 +590,7 @@ int time_keysched(void) c1 = (t1 > c1) ? c1 : t1; } t1 = c1 - skew; - results[no_results].spd1 = results[no_results].avg = (unsigned long)t1; + results[no_results].spd1 = results[no_results].avg = t1; results[no_results++].id = x; fprintf(stderr, "."); fflush(stdout); @@ -659,8 +659,8 @@ int time_cipher(void) ecb_done(&ecb); results[no_results].id = x; - results[no_results].spd1 = (unsigned long)(a1/(sizeof(pt)/cipher_descriptor[x].block_length)); - results[no_results].spd2 = (unsigned long)(a2/(sizeof(pt)/cipher_descriptor[x].block_length)); + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; ++no_results; fprintf(stderr, "."); fflush(stdout); @@ -734,8 +734,8 @@ int time_cipher2(void) cbc_done(&cbc); results[no_results].id = x; - results[no_results].spd1 = (unsigned long)(a1/(sizeof(pt)/cipher_descriptor[x].block_length)); - results[no_results].spd2 = (unsigned long)(a2/(sizeof(pt)/cipher_descriptor[x].block_length)); + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; ++no_results; fprintf(stderr, "."); fflush(stdout); @@ -809,8 +809,8 @@ int time_cipher3(void) ctr_done(&ctr); results[no_results].id = x; - results[no_results].spd1 = (unsigned long)(a1/(sizeof(pt)/cipher_descriptor[x].block_length)); - results[no_results].spd2 = (unsigned long)(a2/(sizeof(pt)/cipher_descriptor[x].block_length)); + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; ++no_results; fprintf(stderr, "."); fflush(stdout); @@ -886,8 +886,8 @@ int time_cipher4(void) lrw_done(&lrw); results[no_results].id = x; - results[no_results].spd1 = (unsigned long)(a1/(sizeof(pt)/cipher_descriptor[x].block_length)); - results[no_results].spd2 = (unsigned long)(a2/(sizeof(pt)/cipher_descriptor[x].block_length)); + results[no_results].spd1 = a1/(sizeof(pt)/cipher_descriptor[x].block_length); + results[no_results].spd2 = a2/(sizeof(pt)/cipher_descriptor[x].block_length); results[no_results].avg = (results[no_results].spd1 + results[no_results].spd2+1)/2; ++no_results; fprintf(stderr, "."); fflush(stdout); @@ -944,7 +944,7 @@ int time_hash(void) t1 = c2 - c1 - skew; t1 = ((t1 * CONST64(1000))) / ((ulong64)hash_descriptor[x].blocksize); results[no_results].id = x; - results[no_results].spd1 = results[no_results].avg = (unsigned long)t1; + results[no_results].spd1 = results[no_results].avg = t1; ++no_results; fprintf(stderr, "."); fflush(stdout); #undef DO2