aboutsummaryrefslogtreecommitdiff
path: root/riscv/insns/hsv_w.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-06-19 17:56:05 +0530
committerAnup Patel <anup@brainfault.org>2020-07-09 23:04:18 +0530
commit564ed97f618321b8499a3e8837c36f622ee8a893 (patch)
tree81754eab18ac55c64f7c2b3017c451d99bb9d457 /riscv/insns/hsv_w.h
parentb75aff9e5d132a16d9326bc0b3bbc724ae3c753c (diff)
downloadspike-564ed97f618321b8499a3e8837c36f622ee8a893.zip
spike-564ed97f618321b8499a3e8837c36f622ee8a893.tar.gz
spike-564ed97f618321b8499a3e8837c36f622ee8a893.tar.bz2
Implement new instructions of hypervisor extension
We add new HFENCE, HLV, and HSV instructions for HS-mode which are defined as part of the RISC-V hypervisor extension. Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'riscv/insns/hsv_w.h')
-rw-r--r--riscv/insns/hsv_w.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/riscv/insns/hsv_w.h b/riscv/insns/hsv_w.h
new file mode 100644
index 0000000..efa7d97
--- /dev/null
+++ b/riscv/insns/hsv_w.h
@@ -0,0 +1,4 @@
+require_extension('H');
+require_privilege(get_field(STATE.hstatus, HSTATUS_HU) ? PRV_S : PRV_U);
+require_novirt();
+MMU.guest_store_uint32(RS1, RS2);