File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ RVTEST_CODE_BEGIN
2020
2121 # indicate it's a load test
2222 li s1, CAUSE_MISALIGNED_LOAD
23+ li s2, CAUSE_LOAD_ACCESS
2324
2425#define SEXT(x, n) ((-((x) >> ((n)-1 )) << (n)) | ((x) & ((1 << (n))-1 )))
2526
@@ -56,6 +57,7 @@ RVTEST_CODE_BEGIN
5657
5758 # indicate it's a store test
5859 li s1, CAUSE_MISALIGNED_STORE
60+ li s2, CAUSE_STORE_ACCESS
5961
6062/* Check that a misaligned store has some effect and takes no exception,
6163 or takes no effect and generates an exception. This is not very
@@ -96,7 +98,10 @@ RVTEST_CODE_BEGIN
9698 .global mtvec_handler
9799mtvec_handler:
98100 csrr t0, mcause
99- bne t0, s1, fail
101+ beq t0, s1, 1f
102+ beq t0, s2, 1f
103+ j fail
104+ 1:
100105
101106 csrr t0, mbadaddr
102107 beqz t0, 1f
You can’t perform that action at this time.
0 commit comments