From: Andrew Waterman Date: Thu, 9 Mar 2017 20:43:01 +0000 (-0800) Subject: Check mbadaddr in ma_addr test X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f5d59f657b25bdd5bebdc6c8875c8cd629dd330;p=riscv-tests.git Check mbadaddr in ma_addr test --- diff --git a/env b/env index 9e219c9..00d8922 160000 --- a/env +++ b/env @@ -1 +1 @@ -Subproject commit 9e219c9ca70459bfda9067d637bb8bf52c5f0326 +Subproject commit 00d8922398c202c13d6eb5da07e92be6364309a1 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