Skip to content

Commit 217cbc5

Browse files
authored
Merge pull request #2114 from riscv-software-src/wrs-trap
WRS instructions should trap when Zawrs is not implemented
2 parents 52794db + 437a70f commit 217cbc5

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

riscv/insns/wrs_nto.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require_extension(EXT_ZAWRS);
2+
13
if (get_field(STATE.mstatus->read(), MSTATUS_TW)) {
24
require_privilege(PRV_M);
35
} else if (STATE.v) {

riscv/insns/wrs_sto.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
require_extension(EXT_ZAWRS);
2+
13
// WRS.STO stalls for a short duration

0 commit comments

Comments
 (0)