Benchmarks now run in user-mode.
[riscv-tests.git] / benchmarks / dhrystone / dhrystone_main.c
index c2a8038de8c8dabbc07a1b022a6e1196e7a9d298..93b79da92b09f25d7ac4f925bac24210868c813f 100644 (file)
@@ -8,6 +8,9 @@
 
 #include "dhrystone.h"
 
+int ncores = 1;
+#include "util.h"
+
 //--------------------------------------------------------------------------
 // Macros
 
@@ -44,20 +47,6 @@ int __attribute__((noinline)) do_fprintf(FILE* f, const char* str, ...)
 }
 #endif
 
-void finishTest( int toHostValue )
-{
-#if HOST_DEBUG
-  if ( toHostValue == 1 )
-    printf( "*** PASSED ***\n" );
-  else
-    printf( "*** FAILED *** (tohost = %d)\n", toHostValue );
-  exit(0);
-#else
-  asm( "mtpcr %0, tohost" : : "r" (toHostValue) );
-  while ( 1 ) { }
-#endif
-}
-
 void setStats( int enable )
 {
 #if ( !HOST_DEBUG && SET_STATS )