We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8b4fffe + 4a2b38f commit 066a3c1Copy full SHA for 066a3c1
riscv/insns/wfi.h
@@ -1,9 +1,7 @@
1
-if (STATE.v && STATE.prv == PRV_U) {
2
- require_novirt();
3
-} else if (get_field(STATE.mstatus->read(), MSTATUS_TW)) {
+if (get_field(STATE.mstatus->read(), MSTATUS_TW)) {
4
require_privilege(PRV_M);
5
-} else if (STATE.v) { // VS-mode
6
- if (get_field(STATE.hstatus->read(), HSTATUS_VTW))
+} else if (STATE.v) {
+ if (STATE.prv == PRV_U || get_field(STATE.hstatus->read(), HSTATUS_VTW))
7
require_novirt();
8
} else if (p->extension_enabled('S')) {
9
// When S-mode is implemented, then executing WFI in
0 commit comments