Benchmarks now run in user-mode.
[riscv-tests.git] / benchmarks / qsort / qsort_main.c
index 486b8fc81df31ce429ebcde4fd7712518930b96b..e61eef2491c94aba3173dcb012ecf535806765d8 100644 (file)
@@ -11,6 +11,9 @@
 // processor simulator itself. You should not change anything except
 // the HOST_DEBUG and PREALLOCATE macros for your timing run.
 
+int ncores = 1;
+#include "util.h"
+
 //--------------------------------------------------------------------------
 // Macros
 
@@ -83,20 +86,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 )