aboutsummaryrefslogtreecommitdiff
path: root/benchmarks/dhrystone
diff options
context:
space:
mode:
authorChristopher Celio <celio@eecs.berkeley.edu>2013-10-10 15:00:57 -0700
committerChristopher Celio <celio@eecs.berkeley.edu>2013-10-10 15:00:57 -0700
commit26015d8c21fe1e8e34e36ffd1c83de7b08ad4902 (patch)
treedf503e45fd71a95501b2c32019aa419260789007 /benchmarks/dhrystone
parent8dd97c2e7af399bc04b9d132bd1f1a4bdbbfec57 (diff)
downloadriscv-tests-26015d8c21fe1e8e34e36ffd1c83de7b08ad4902.zip
riscv-tests-26015d8c21fe1e8e34e36ffd1c83de7b08ad4902.tar.gz
riscv-tests-26015d8c21fe1e8e34e36ffd1c83de7b08ad4902.tar.bz2
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.
Diffstat (limited to 'benchmarks/dhrystone')
-rw-r--r--benchmarks/dhrystone/dhrystone_main.c17
1 files changed, 3 insertions, 14 deletions
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 )