Skip to content

Commit f3550b7

Browse files
matthiasgoergensMozak Bot
authored and
Mozak Bot
committed
update: RISC-V tests files
1 parent 7667e83 commit f3550b7

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
68c70f52115267097bc1381f3e85a18df15bbad4
1+
e2cdf460d248925b43b9085a3470102ce8a0a83b

riscv-testdata/testdata/rv64mi/illegal.S

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,19 @@ msip:
7272
beqz t2, bare_s_1
7373
csrc sstatus, t0
7474

75-
# Make sure SFENCE.VMA and sptbr don't trap when TVM=0.
75+
# Make sure SFENCE.VMA and satp don't trap when TVM=0.
7676
sfence.vma
77-
csrr t0, sptbr
77+
csrr t0, satp
7878
bad5:
7979
.word 0
8080
j fail
8181

8282
bad6:
83-
# Make sure SFENCE.VMA and sptbr do trap when TVM=1.
83+
# Make sure SFENCE.VMA and satp do trap when TVM=1.
8484
sfence.vma
8585
j fail
8686
bad7:
87-
csrr t0, sptbr
87+
csrr t0, satp
8888
j fail
8989

9090
test_tsr:
@@ -120,7 +120,7 @@ bare_s_2:
120120
j fail
121121

122122
# And access to satp should not trap
123-
csrr t0, sptbr
123+
csrr t0, satp
124124
bare_s_3:
125125
.word 0
126126
j fail
@@ -156,7 +156,7 @@ synchronous_exception:
156156
csrr t0, mepc
157157

158158
# Make sure mtval contains either 0 or the instruction word.
159-
csrr t2, mbadaddr
159+
csrr t2, mtval
160160
beqz t2, 1f
161161
lhu t1, 0(t0)
162162
xor t2, t2, t1

riscv-testdata/testdata/rv64mi/ma_addr.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ mtvec_handler:
103103
j fail
104104
1:
105105

106-
csrr t0, mbadaddr
106+
csrr t0, mtval
107107
beqz t0, 1f
108108
bne t0, t1, fail
109109

riscv-testdata/testdata/rv64si/dirty.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RVTEST_CODE_BEGIN
2222
la a1, page_table_1
2323
srl a1, a1, RISCV_PGSHIFT
2424
or a1, a1, a0
25-
csrw sptbr, a1
25+
csrw satp, a1
2626
sfence.vma
2727

2828
# Set up MPRV with MPP=S, so loads and stores use S-mode

riscv-testdata/testdata/rv64si/icache-alias.S

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ RVTEST_CODE_BEGIN
4848
la a1, page_table_1
4949
srl a1, a1, RISCV_PGSHIFT
5050
or a1, a1, a0
51-
csrw sptbr, a1
51+
csrw satp, a1
5252
sfence.vma
5353

5454
# Enter supervisor mode and make sure correct page is accessed

riscv-testdata/testdata/rv64si/ma_fetch.S

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ RVTEST_CODE_BEGIN
1717
#define sscratch mscratch
1818
#define sstatus mstatus
1919
#define scause mcause
20-
#define sbadaddr mbadaddr
20+
#define stval mtval
2121
#define sepc mepc
2222
#define sret mret
2323
#define stvec_handler mtvec_handler
@@ -205,8 +205,8 @@ stvec_handler:
205205
addi a1, a1, 4
206206
bne t0, a1, fail
207207

208-
# verify that badaddr == 0 or badaddr == t0+2.
209-
csrr a0, sbadaddr
208+
# verify that tval == 0 or tval == t0+2.
209+
csrr a0, stval
210210
beqz a0, 1f
211211
addi a0, a0, -2
212212
bne a0, t0, fail

0 commit comments

Comments
 (0)