projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1c8495d
)
Avoid REMU in timer test
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Mon, 19 Oct 2015 19:25:23 +0000
(12:25 -0700)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Mon, 19 Oct 2015 19:27:28 +0000
(12:27 -0700)
isa/rv64mi/timer.S
patch
|
blob
|
history
diff --git
a/isa/rv64mi/timer.S
b/isa/rv64mi/timer.S
index f3350fc6ae51c696bd8edff528835689bc47384a..b7cc633613f8cd57e70165ecd6a69fd00f18c6c7 100644
(file)
--- a/
isa/rv64mi/timer.S
+++ b/
isa/rv64mi/timer.S
@@
-39,9
+39,14
@@
RVTEST_CODE_BEGIN
add s4, s4, 1
bltu s8, s9, 1b
- #
make sure the LFSR was computed correctly
+ #
compute iteration count % 1023 without using REMU
li s1, 1023
- remu s4, s4, s1
+ bltu s4, s1, 2f
+1:sub s4, s4, s1
+ bgeu s4, s1, 1b
+2:
+
+ # make sure the LFSR was computed correctly
la s1, lfsr
sll s4, s4, 2
add s1, s1, s4