diff options
author | Andrew Waterman <andrew@sifive.com> | 2024-02-02 19:58:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-02 19:58:08 -0800 |
commit | ad33ed3cb50b4cc23a44657a541f76325e659af0 (patch) | |
tree | 98507ad25f7765ab73f2ed8d2e59d2a078f88891 | |
parent | 67e775962321ef48f77e7ab5aa4f40ce3cf82b08 (diff) | |
parent | 9f053a87bc9ce3afbdaf5e808f98eed5a8229887 (diff) | |
download | riscv-tests-ad33ed3cb50b4cc23a44657a541f76325e659af0.zip riscv-tests-ad33ed3cb50b4cc23a44657a541f76325e659af0.tar.gz riscv-tests-ad33ed3cb50b4cc23a44657a541f76325e659af0.tar.bz2 |
Merge pull request #536 from eiji-y/check_svnapot
If Svnapot is not implemented, skip the test.
-rw-r--r-- | isa/rv64ssvnapot/napot.S | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/isa/rv64ssvnapot/napot.S b/isa/rv64ssvnapot/napot.S index 92d2b49..fbc4014 100644 --- a/isa/rv64ssvnapot/napot.S +++ b/isa/rv64ssvnapot/napot.S @@ -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 @@ -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 |