diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-05-01 15:16:55 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-05-01 15:16:55 -0700 |
commit | 5ce97df1c97b4ef39b94041350b910d12f782328 (patch) | |
tree | aed3613bc885ce8a5226abf5776a3d662fa19a0b /benchmarks/dhrystone | |
parent | 4bead73f52ad5a43a5400179928aa0aa97b79b35 (diff) | |
download | riscv-tests-5ce97df1c97b4ef39b94041350b910d12f782328.zip riscv-tests-5ce97df1c97b4ef39b94041350b910d12f782328.tar.gz riscv-tests-5ce97df1c97b4ef39b94041350b910d12f782328.tar.bz2 |
Fix dhrystone timing code
Diffstat (limited to 'benchmarks/dhrystone')
-rw-r--r-- | benchmarks/dhrystone/dhrystone.c | 3 | ||||
-rw-r--r-- | benchmarks/dhrystone/dhrystone.h | 2 | ||||
-rw-r--r-- | benchmarks/dhrystone/dhrystone_main.c | 9 |
3 files changed, 7 insertions, 7 deletions
diff --git a/benchmarks/dhrystone/dhrystone.c b/benchmarks/dhrystone/dhrystone.c index 418602a..38e3376 100644 --- a/benchmarks/dhrystone/dhrystone.c +++ b/benchmarks/dhrystone/dhrystone.c @@ -180,3 +180,6 @@ Enumeration Enum_Par_Val; return (false); } /* Func_3 */ +void debug_printf(const char* str, ...) +{ +} diff --git a/benchmarks/dhrystone/dhrystone.h b/benchmarks/dhrystone/dhrystone.h index 767a657..37535e7 100644 --- a/benchmarks/dhrystone/dhrystone.h +++ b/benchmarks/dhrystone/dhrystone.h @@ -381,7 +381,7 @@ extern clock_t clock(); #elif defined(__riscv) -#define HZ 976563 +#define HZ 1000000 #define Too_Small_Time 1 #define CLOCK_TYPE "rdcycle()" #define Start_Timer() Begin_Time = rdcycle() diff --git a/benchmarks/dhrystone/dhrystone_main.c b/benchmarks/dhrystone/dhrystone_main.c index 34451f9..f2cd58e 100644 --- a/benchmarks/dhrystone/dhrystone_main.c +++ b/benchmarks/dhrystone/dhrystone_main.c @@ -42,10 +42,7 @@ #if HOST_DEBUG # define debug_printf printf #else -void debug_printf(const char* str, ...) -{ - return 0; -} +void debug_printf(const char* str, ...); #endif #include "util.h" @@ -161,8 +158,8 @@ int main (int argc, char** argv) /* Start timer */ /***************/ - Start_Timer(); setStats(1); + Start_Timer(); for (Run_Index = 1; Run_Index <= Number_Of_Runs; ++Run_Index) { @@ -214,8 +211,8 @@ int main (int argc, char** argv) /* Stop timer */ /**************/ - setStats(0); Stop_Timer(); + setStats(0); User_Time = End_Time - Begin_Time; |