Don't use FPU in benchmarks that don't need to use the FPU
[riscv-tests.git] / benchmarks / dhrystone / dhrystone.h
index 767a65728b796ab462b593071ed2f39060a27bcb..e350c177862a8db3f0bdcea626d4e5d2f7e6792a 100644 (file)
@@ -381,11 +381,11 @@ 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()
-#define Stop_Timer() End_Time = rdcycle()
+#define Start_Timer() Begin_Time = read_csr(mcycle)
+#define Stop_Timer() End_Time = read_csr(mcycle)
 
 #else
                 /* Use times(2) time function unless    */
@@ -412,7 +412,7 @@ struct tms      time_info;
 #endif /* TIME */
 
 
-#define Mic_secs_Per_Second     1000000.0
+#define Mic_secs_Per_Second     1000000
 #define NUMBER_OF_RUNS         500 /* Default number of runs */
 
 #ifdef  NOSTRUCTASSIGN