Skip to content

Commit

Permalink
Merge pull request riscv#536 from eiji-y/check_svnapot
Browse files Browse the repository at this point in the history
If Svnapot is not implemented, skip the test.
  • Loading branch information
aswaterman authored Feb 3, 2024
2 parents 67e7759 + 9f053a8 commit ad33ed3
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions isa/rv64ssvnapot/napot.S
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ RVTEST_CODE_BEGIN
# Do a store to MY_VA
li a0, MY_VA
li a1, 42
napot_store:
sw a1, (a0)

# Clear MPRV
Expand Down Expand Up @@ -153,6 +154,16 @@ RVTEST_CODE_BEGIN
.align 2
.global mtvec_handler
mtvec_handler:
# Skip if Svnapot is not implemented.
csrr t5, mcause
li t6, CAUSE_STORE_PAGE_FAULT
bne t5, t6, die
csrr t5, mepc
la t6, napot_store
bne t5, t6, die
csrr t5, mtval
li t6, MY_VA
beq t5, t6, pass
die:
RVTEST_FAIL

Expand Down

0 comments on commit ad33ed3

Please sign in to comment.