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/dhrystone/dhrystone_main.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'benchmarks/dhrystone') diff --git a/benchmarks/dhrystone/dhrystone_main.c b/benchmarks/dhrystone/dhrystone_main.c index c2a8038..93b79da 100644 --- a/benchmarks/dhrystone/dhrystone_main.c +++ b/benchmarks/dhrystone/dhrystone_main.c @@ -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 ) -- cgit v1.1