projects
/
riscv-tests.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7dfc16a
)
Check mbadaddr in ma_addr test
author
Andrew Waterman
<andrew@sifive.com>
Thu, 9 Mar 2017 20:43:01 +0000
(12:43 -0800)
committer
Andrew Waterman
<andrew@sifive.com>
Thu, 9 Mar 2017 20:43:01 +0000
(12:43 -0800)
env
patch
|
blob
|
history
isa/rv64mi/ma_addr.S
patch
|
blob
|
history
diff --git
a/env
b/env
index 9e219c9ca70459bfda9067d637bb8bf52c5f0326..00d8922398c202c13d6eb5da07e92be6364309a1 160000
(submodule)
--- 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 be3572fec37de1ca9be65f917c71a26f560b60e0..ba96606335e9acd6322cbaf2eb8502d508489d09 100644
(file)
--- 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