[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 08/76] target/riscv: rvv-1.0: remove rvv related codes from fc
From: |
frank . chang |
Subject: |
[PATCH v9 08/76] target/riscv: rvv-1.0: remove rvv related codes from fcsr registers |
Date: |
Fri, 29 Oct 2021 16:58:13 +0800 |
From: Frank Chang <frank.chang@sifive.com>
* Remove VXRM and VXSAT fields from FCSR register as they are only
presented in VCSR register.
* Remove RVV loose check in fs() predicate function.
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/csr.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/target/riscv/csr.c b/target/riscv/csr.c
index bc149add6ce..c522260986c 100644
--- a/target/riscv/csr.c
+++ b/target/riscv/csr.c
@@ -38,10 +38,6 @@ void riscv_set_csr_ops(int csrno, riscv_csr_operations *ops)
static RISCVException fs(CPURISCVState *env, int csrno)
{
#if !defined(CONFIG_USER_ONLY)
- /* loose check condition for fcsr in vector extension */
- if ((csrno == CSR_FCSR) && (env->misa_ext & RVV)) {
- return RISCV_EXCP_NONE;
- }
if (!env->debugger && !riscv_cpu_fp_enabled(env)) {
return RISCV_EXCP_ILLEGAL_INST;
}
@@ -261,10 +257,6 @@ static RISCVException read_fcsr(CPURISCVState *env, int
csrno,
{
*val = (riscv_cpu_get_fflags(env) << FSR_AEXC_SHIFT)
| (env->frm << FSR_RD_SHIFT);
- if (vs(env, csrno) >= 0) {
- *val |= (env->vxrm << FSR_VXRM_SHIFT)
- | (env->vxsat << FSR_VXSAT_SHIFT);
- }
return RISCV_EXCP_NONE;
}
@@ -273,13 +265,8 @@ static RISCVException write_fcsr(CPURISCVState *env, int
csrno,
{
#if !defined(CONFIG_USER_ONLY)
env->mstatus |= MSTATUS_FS;
- env->mstatus |= MSTATUS_VS;
#endif
env->frm = (val & FSR_RD) >> FSR_RD_SHIFT;
- if (vs(env, csrno) >= 0) {
- env->vxrm = (val & FSR_VXRM) >> FSR_VXRM_SHIFT;
- env->vxsat = (val & FSR_VXSAT) >> FSR_VXSAT_SHIFT;
- }
riscv_cpu_set_fflags(env, (val & FSR_AEXC) >> FSR_AEXC_SHIFT);
return RISCV_EXCP_NONE;
}
--
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, 2021/10/29
- [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 <=
- [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
- [PATCH v9 17/76] target/riscv: rvv:1.0: add translation-time nan-box helper function, frank . chang, 2021/10/29
- [PATCH v9 16/76] target/riscv: introduce more imm value modes in translator functions, frank . chang, 2021/10/29