diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-10-19 12:25:23 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-10-19 12:27:28 -0700 |
commit | 3aa6fab85f56ac9a23728ea9bc01b32c2ba7dbaf (patch) | |
tree | 7bd4979b4718cad0f82b6fec6f5c5253ecdeb33c /isa | |
parent | 1c8495d95280d95a28696ee20ff75794e6c19cc4 (diff) | |
download | riscv-tests-3aa6fab85f56ac9a23728ea9bc01b32c2ba7dbaf.zip riscv-tests-3aa6fab85f56ac9a23728ea9bc01b32c2ba7dbaf.tar.gz riscv-tests-3aa6fab85f56ac9a23728ea9bc01b32c2ba7dbaf.tar.bz2 |
Avoid REMU in timer test
Diffstat (limited to 'isa')
-rw-r--r-- | isa/rv64mi/timer.S | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/isa/rv64mi/timer.S b/isa/rv64mi/timer.S index f3350fc..b7cc633 100644 --- 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 |