aboutsummaryrefslogtreecommitdiff
path: root/riscv/encoding.h
diff options
context:
space:
mode:
authorAnup Patel <anup.patel@wdc.com>2020-11-24 05:29:15 +0530
committerGitHub <noreply@github.com>2020-11-23 15:59:15 -0800
commit8be5c086bdf17b1a6813bfa3bb8a8993a07675ca (patch)
treeea30eb81c1efd3a40320691731ad344f8462adec /riscv/encoding.h
parente2e83c0604f8992a6a20e23c66574a8dca9171fc (diff)
downloadspike-8be5c086bdf17b1a6813bfa3bb8a8993a07675ca.zip
spike-8be5c086bdf17b1a6813bfa3bb8a8993a07675ca.tar.gz
spike-8be5c086bdf17b1a6813bfa3bb8a8993a07675ca.tar.bz2
Fix VSSTATUS bits updation (#568)
This patch fixes VSSTATUS bits updations as follows: 1. set_csr() should not allow writs to VSSTATUS.SD bit instead VSSTATUS.SD bit should be derived again after VSSTATUS is updated 2. set_virt() should copy FS, VS and XS bits when transitioning from virt=on (VS/VU-mode) to virt=off (HS/M-mode) Signed-off-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'riscv/encoding.h')
-rw-r--r--riscv/encoding.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/riscv/encoding.h b/riscv/encoding.h
index 8ede33b..784b6fe 100644
--- a/riscv/encoding.h
+++ b/riscv/encoding.h
@@ -50,7 +50,7 @@
#define SSTATUS64_SD 0x8000000000000000
#define SSTATUS_VS_MASK (SSTATUS_SIE | SSTATUS_SPIE | \
- SSTATUS_SPP | SSTATUS_SUM | \
+ SSTATUS_SPP | SSTATUS_FS | SSTATUS_SUM | \
SSTATUS_MXR | SSTATUS_UXL)
#define HSTATUS_VSXL 0x300000000