aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Celio <celio@eecs.berkeley.edu>2017-11-22 14:01:26 -0800
committerAndrew Waterman <aswaterman@gmail.com>2017-11-22 16:01:26 -0600
commit018aea17aca9abb6221e1a59d943ecdd386cc8ec (patch)
treeeeec86f341ce76f34e89bee291b224db84d471d9
parentea53b10a55e523672340af4bf5ae710e3e314a32 (diff)
downloadriscv-tests-018aea17aca9abb6221e1a59d943ecdd386cc8ec.zip
riscv-tests-018aea17aca9abb6221e1a59d943ecdd386cc8ec.tar.gz
riscv-tests-018aea17aca9abb6221e1a59d943ecdd386cc8ec.tar.bz2
Check sepc for rv64si/scall test. (#107)
Closes #105.
-rw-r--r--isa/rv64si/scall.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/isa/rv64si/scall.S b/isa/rv64si/scall.S
index 1f5e6b7..0579806 100644
--- a/isa/rv64si/scall.S
+++ b/isa/rv64si/scall.S
@@ -51,6 +51,7 @@ RVTEST_CODE_BEGIN
1:
li TESTNUM, 1
+do_scall:
scall
j fail
@@ -61,6 +62,9 @@ RVTEST_CODE_BEGIN
stvec_handler:
csrr t0, scause
bne t0, t1, fail
+ la t2, do_scall
+ csrr t0, sepc
+ bne t0, t2, fail
j pass
RVTEST_CODE_END