diff options
Diffstat (limited to 'test')
-rwxr-xr-x | test/benchmarks/dhrystone/check | 6 | ||||
-rw-r--r-- | test/benchmarks/dhrystone/dhrystone.h | 2 | ||||
-rw-r--r-- | test/benchmarks/dhrystone/dhrystone_main.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/test/benchmarks/dhrystone/check b/test/benchmarks/dhrystone/check index 79f5456..0c9d2ae 100755 --- a/test/benchmarks/dhrystone/check +++ b/test/benchmarks/dhrystone/check @@ -28,7 +28,11 @@ echo "ERROR: $march-$mabi failed to run" >$out tempdir=$(mktemp -d) trap "rm -rf $tempdir" EXIT -$cc ${c[@]} -march=$march -mabi=$mabi -O3 -o $tempdir/dhrystone -static -Wno-all +for f in ${c[@]} +do + $cc -c $f -march=$march -mabi=$mabi -O3 -fno-common -fno-inline -o $tempdir/$(basename $f).o -static -Wno-all +done +$cc -march=$march -mabi=$mabi $tempdir/*.o -o $tempdir/dhrystone $objdump -d $tempdir/dhrystone > ~/dump begin_pc=$($objdump -d $tempdir/dhrystone | grep 'Begin_Time' | grep -e 'sd' -e 'sw' | cut -d: -f1 | xargs echo) diff --git a/test/benchmarks/dhrystone/dhrystone.h b/test/benchmarks/dhrystone/dhrystone.h index c2ef663..e36a93a 100644 --- a/test/benchmarks/dhrystone/dhrystone.h +++ b/test/benchmarks/dhrystone/dhrystone.h @@ -391,7 +391,7 @@ extern clock_t clock(); *** You must define HZ!!! *** #endif /* HZ */ #ifndef PASS2 -struct tms time_info; +extern struct tms time_info; #endif /*extern int times ();*/ /* see library function "times" */ diff --git a/test/benchmarks/dhrystone/dhrystone_main.c b/test/benchmarks/dhrystone/dhrystone_main.c index 9ba0c0e..c07fd58 100644 --- a/test/benchmarks/dhrystone/dhrystone_main.c +++ b/test/benchmarks/dhrystone/dhrystone_main.c @@ -7,6 +7,8 @@ // This is the classic Dhrystone synthetic integer benchmark. // +struct tms time_info; + #define read_csr(reg) ({ unsigned long __tmp; \ asm volatile ("csrr %0, " #reg : "=r"(__tmp)); \ __tmp; }) |