diff options
Diffstat (limited to 'riscv/insns/wrs_nto.h')
-rw-r--r-- | riscv/insns/wrs_nto.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/riscv/insns/wrs_nto.h b/riscv/insns/wrs_nto.h new file mode 100644 index 0000000..710e670 --- /dev/null +++ b/riscv/insns/wrs_nto.h @@ -0,0 +1,6 @@ +if (get_field(STATE.mstatus->read(), MSTATUS_TW)) { + require_privilege(PRV_M); +} else if (STATE.v) { + if (get_field(STATE.hstatus->read(), HSTATUS_VTW)) + require_novirt(); +} |