Browse Source

WRS instructions should trap when Zawrs is not implemented

Fixes c5229c3f5f (r168406871)

cc @ved-rivos @JJ-Gaisler
pull/2114/head
Andrew Waterman 6 months ago
parent
commit
437a70fae1
  1. 2
      riscv/insns/wrs_nto.h
  2. 2
      riscv/insns/wrs_sto.h

2
riscv/insns/wrs_nto.h

@ -1,3 +1,5 @@
require_extension(EXT_ZAWRS);
if (get_field(STATE.mstatus->read(), MSTATUS_TW)) {
require_privilege(PRV_M);
} else if (STATE.v) {

2
riscv/insns/wrs_sto.h

@ -1 +1,3 @@
require_extension(EXT_ZAWRS);
// WRS.STO stalls for a short duration

Loading…
Cancel
Save