qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 13/15] target/riscv: Only support a single VSXL length


From: Alistair Francis
Subject: [PATCH v1 13/15] target/riscv: Only support a single VSXL length
Date: Sun, 26 Apr 2020 09:19:48 -0700

Signed-off-by: Alistair Francis <address@hidden>
---
 target/riscv/csr.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index 6b6080592a..438d0a61ee 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -854,12 +854,21 @@ static int write_satp(CPURISCVState *env, int csrno, 
target_ulong val)
 static int read_hstatus(CPURISCVState *env, int csrno, target_ulong *val)
 {
     *val = env->hstatus;
+#ifdef TARGET_RISCV64
+    /* We only support 64-bit VSXL */
+    *val = set_field(*val, HSTATUS_VSXL, 2);
+#endif
     return 0;
 }
 
 static int write_hstatus(CPURISCVState *env, int csrno, target_ulong val)
 {
     env->hstatus = val;
+#ifdef TARGET_RISCV64
+    if (get_field(val, HSTATUS_VSXL) != 2) {
+        qemu_log_mask(LOG_UNIMP, "QEMU does not support mixed HSXLEN 
options.");
+    }
+#endif
     return 0;
 }
 
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]