[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 05/76] target/riscv: rvv-1.0: add sstatus VS field
From: |
frank . chang |
Subject: |
[PATCH v9 05/76] target/riscv: rvv-1.0: add sstatus VS field |
Date: |
Fri, 29 Oct 2021 16:58:10 +0800 |
From: LIU Zhiwei <zhiwei_liu@c-sky.com>
Signed-off-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
---
target/riscv/cpu_bits.h | 1 +
target/riscv/csr.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/riscv/cpu_bits.h b/target/riscv/cpu_bits.h
index 72a716c9990..bb62da7549d 100644
--- a/target/riscv/cpu_bits.h
+++ b/target/riscv/cpu_bits.h
@@ -409,6 +409,7 @@ typedef enum {
#define SSTATUS_UPIE 0x00000010
#define SSTATUS_SPIE 0x00000020
#define SSTATUS_SPP 0x00000100
+#define SSTATUS_VS 0x00000600
#define SSTATUS_FS 0x00006000
#define SSTATUS_XS 0x00018000
#define SSTATUS_SUM 0x00040000 /* since: priv-1.10 */
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index bb500afdeb5..83f4dbd8241 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -463,7 +463,7 @@ static const target_ulong vs_delegable_excps =
DELEGABLE_EXCPS &
(1ULL << (RISCV_EXCP_STORE_GUEST_AMO_ACCESS_FAULT)));
static const target_ulong sstatus_v1_10_mask = SSTATUS_SIE | SSTATUS_SPIE |
SSTATUS_UIE | SSTATUS_UPIE | SSTATUS_SPP | SSTATUS_FS | SSTATUS_XS |
- SSTATUS_SUM | SSTATUS_MXR;
+ SSTATUS_SUM | SSTATUS_MXR | SSTATUS_VS;
static const target_ulong sip_writable_mask = SIP_SSIP | MIP_USIP | MIP_UEIP;
static const target_ulong hip_writable_mask = MIP_VSSIP;
static const target_ulong hvip_writable_mask = MIP_VSSIP | MIP_VSTIP |
MIP_VSEIP;
--
2.25.1
- [PATCH v9 00/76] support vector extension v1.0, frank . chang, 2021/10/29
- [PATCH v9 01/76] target/riscv: drop vector 0.7.1 and add 1.0 support, frank . chang, 2021/10/29
- [PATCH v9 02/76] target/riscv: Use FIELD_EX32() to extract wd field, frank . chang, 2021/10/29
- [PATCH v9 03/76] target/riscv: rvv-1.0: add mstatus VS field, frank . chang, 2021/10/29
- [PATCH v9 04/76] target/riscv: rvv-1.0: set mstatus.SD bit if mstatus.VS is dirty, frank . chang, 2021/10/29
- [PATCH v9 05/76] target/riscv: rvv-1.0: add sstatus VS field,
frank . chang <=
- [PATCH v9 06/76] target/riscv: rvv-1.0: introduce writable misa.v field, frank . chang, 2021/10/29
- [PATCH v9 08/76] target/riscv: rvv-1.0: remove rvv related codes from fcsr registers, frank . chang, 2021/10/29
- [PATCH v9 07/76] target/riscv: rvv-1.0: add translation-time vector context status, frank . chang, 2021/10/29
- [PATCH v9 11/76] target/riscv: rvv-1.0: check MSTATUS_VS when accessing vector csr registers, frank . chang, 2021/10/29
- [PATCH v9 09/76] target/riscv: rvv-1.0: add vcsr register, frank . chang, 2021/10/29
- [PATCH v9 10/76] target/riscv: rvv-1.0: add vlenb register, frank . chang, 2021/10/29
- [PATCH v9 12/76] target/riscv: rvv-1.0: remove MLEN calculations, frank . chang, 2021/10/29
- [PATCH v9 13/76] target/riscv: rvv-1.0: add fractional LMUL, frank . chang, 2021/10/29
- [PATCH v9 14/76] target/riscv: rvv-1.0: add VMA and VTA, frank . chang, 2021/10/29
- [PATCH v9 15/76] target/riscv: rvv-1.0: update check functions, frank . chang, 2021/10/29