aboutsummaryrefslogtreecommitdiff
path: root/isa
diff options
context:
space:
mode:
Diffstat (limited to 'isa')
-rw-r--r--isa/rv64mi/ma_addr.S4
1 files changed, 4 insertions, 0 deletions
diff --git a/isa/rv64mi/ma_addr.S b/isa/rv64mi/ma_addr.S
index be3572f..ba96606 100644
--- a/isa/rv64mi/ma_addr.S
+++ b/isa/rv64mi/ma_addr.S
@@ -22,6 +22,7 @@ RVTEST_CODE_BEGIN
#define MISALIGNED_LDST_TEST(testnum, insn, base, offset) \
li TESTNUM, testnum; \
+ addi t1, base, offset; \
insn x0, offset(base); \
j fail \
@@ -70,6 +71,9 @@ mtvec_handler:
csrr t0, mcause
bne t0, s1, fail
+ csrr t0, mbadaddr
+ bne t0, t1, fail
+
csrr t0, mepc
addi t0, t0, 8
csrw mepc, t0