From 26015d8c21fe1e8e34e36ffd1c83de7b08ad4902 Mon Sep 17 00:00:00 2001 From: Christopher Celio Date: Thu, 10 Oct 2013 15:00:57 -0700 Subject: Benchmarks now run in user-mode. - Jump to main performed by eret. - Nano trap handler added. - FinishTest refactored to perform SYS_exit, placed in util.h. - Only SYS_exit with test_result=1 results in a passed test. - Any other exceptions/syscalls/test_results end program with FAILED test. - PCR status set to S64/U64 if compiled in 64b. --- benchmarks/median/median_main.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'benchmarks/median') diff --git a/benchmarks/median/median_main.c b/benchmarks/median/median_main.c index 5c435dd..0691bec 100644 --- a/benchmarks/median/median_main.c +++ b/benchmarks/median/median_main.c @@ -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 ) -- cgit v1.1