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:
0c4cfe0
)
Fix breakpoint test when only one breakpoint present
author
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 18 Jun 2016 04:06:37 +0000
(21:06 -0700)
committer
Andrew Waterman
<waterman@cs.berkeley.edu>
Sat, 18 Jun 2016 04:06:37 +0000
(21:06 -0700)
isa/rv64mi/breakpoint.S
patch
|
blob
|
history
diff --git
a/isa/rv64mi/breakpoint.S
b/isa/rv64mi/breakpoint.S
index 848435e64039c25bf3e8beff8a64c002c182a96b..77c9509c4e5f0d8ceb95c683271b5054dde27905 100644
(file)
--- a/
isa/rv64mi/breakpoint.S
+++ b/
isa/rv64mi/breakpoint.S
@@
-16,7
+16,7
@@
RVTEST_CODE_BEGIN
# Set up breakpoint to trap on M-mode fetches.
li TESTNUM, 2
- # Skip tdrselect i
s
hard-wired.
+ # Skip tdrselect i
f
hard-wired.
li a0, 1<<(_RISCV_SZLONG-1)
csrw tdrselect, a0
csrr a1, tdrselect
@@
-87,6
+87,13
@@
RVTEST_CODE_BEGIN
csrw tdrselect, a0
csrr a1, tdrselect
bne a0, a1, pass
+
+ # Make sure there's a breakpoint there.
+ csrr a0, tdrdata1
+ srli a0, a0, _RISCV_SZLONG-4
+ li a1, 1
+ bne a0, a1, pass
+
li a0, BPCONTROL_M | BPCONTROL_R
csrw tdrdata1, a0
la a3, data2