Skip to content

Commit 437a70f

Browse files
Andrew WatermanAndrew Waterman
authored andcommitted
WRS instructions should trap when Zawrs is not implemented
Fixes c5229c3#r168406871 cc @ved-rivos @JJ-Gaisler
1 parent 52794db commit 437a70f

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)