Benchmarks now run in user-mode.
[riscv-tests.git] / benchmarks / median / median_main.c
index 5c435ddf56e20dc027d2e94cdc1d58dc687e7056..0691becfd5b5788a7ebe61e8532fb66e85c1c946 100644 (file)
@@ -10,6 +10,9 @@
 
 #include "median.h"
 
+int ncores = 1;
+#include "util.h"
+
 //--------------------------------------------------------------------------
 // Macros
 
@@ -67,20 +70,6 @@ void printArray( char name[], int n, int arr[] )
 }
 #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 )