Check mbadaddr in ma_addr test
authorAndrew Waterman <andrew@sifive.com>
Thu, 9 Mar 2017 20:43:01 +0000 (12:43 -0800)
committerAndrew Waterman <andrew@sifive.com>
Thu, 9 Mar 2017 20:43:01 +0000 (12:43 -0800)
env
isa/rv64mi/ma_addr.S

diff --git a/env b/env
index 9e219c9ca70459bfda9067d637bb8bf52c5f0326..00d8922398c202c13d6eb5da07e92be6364309a1 160000 (submodule)
--- a/env
+++ b/env
@@ -1 +1 @@
-Subproject commit 9e219c9ca70459bfda9067d637bb8bf52c5f0326
+Subproject commit 00d8922398c202c13d6eb5da07e92be6364309a1
index be3572fec37de1ca9be65f917c71a26f560b60e0..ba96606335e9acd6322cbaf2eb8502d508489d09 100644 (file)
@@ -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