diff --git a/examples/asm/sumtest/sumtest.S b/examples/asm/sumtest/sumtest.S index 17ef77f0a..150b5ba10 100644 --- a/examples/asm/sumtest/sumtest.S +++ b/examples/asm/sumtest/sumtest.S @@ -6,9 +6,13 @@ rvtest_entry_point: la sp, topofstack # Initialize stack pointer la t0, N # get address of N in data ld a0, 0(t0) # load N + csrr s8, instret # count instructions before call jal sum # call sum(N) + csrr s9, instret # count instructions after call + sub s9, s9, s8 # length of call la t0, begin_signature # address of signature sd a0, 0(t0) # store sum(N) in signature + sd s9, 8(t0) # record performance write_tohost: la t1, tohost @@ -28,8 +32,9 @@ fromhost: N: .dword 4 +.EQU XLEN,64 begin_signature: - .fill 2,4,0xdeadbeef + .fill 2*(XLEN/32),4,0xdeadbeef # end_signature: # Initialize stack with room for 512 bytes diff --git a/examples/asm/sumtest/sumtest.reference_output b/examples/asm/sumtest/sumtest.reference_output index 91bf6ed77..721f31daf 100644 --- a/examples/asm/sumtest/sumtest.reference_output +++ b/examples/asm/sumtest/sumtest.reference_output @@ -1 +1,2 @@ 000000000000000A +000000000000001C diff --git a/wally-pipelined/regression/sim-wally-batch b/wally-pipelined/regression/sim-wally-batch index 86bb6142f..6af36b4f7 100755 --- a/wally-pipelined/regression/sim-wally-batch +++ b/wally-pipelined/regression/sim-wally-batch @@ -1,3 +1,3 @@ vsim -c <