[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 09/13] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax()
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH 09/13] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax() |
Date: |
Fri, 12 Jan 2024 18:38:08 -0300 |
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
---
target/riscv/cpu.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 11df226a00..628ef67d5f 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -692,7 +692,8 @@ static inline uint32_t vext_get_vlmax(RISCVCPU *cpu,
target_ulong vtype)
{
uint8_t sew = FIELD_EX64(vtype, VTYPE, VSEW);
int8_t lmul = sextract32(FIELD_EX64(vtype, VTYPE, VLMUL), 0, 3);
- return cpu->cfg.vlen >> (sew + 3 - lmul);
+ /* vlen = vlenb << 3 */
+ return (cpu->cfg.vlenb << 3) >> (sew + 3 - lmul);
}
void cpu_get_tb_cpu_state(CPURISCVState *env, vaddr *pc,
--
2.43.0
- [PATCH 00/13] target/riscv: add 'cpu->cfg.vlenb', remove 'cpu->cfg.vlen', Daniel Henrique Barboza, 2024/01/12
- [PATCH 01/13] target/riscv: add 'vlenb' field in cpu->cfg, Daniel Henrique Barboza, 2024/01/12
- [PATCH 02/13] target/riscv/csr.c: use 'vlenb' instead of 'vlen', Daniel Henrique Barboza, 2024/01/12
- [PATCH 03/13] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen', Daniel Henrique Barboza, 2024/01/12
- [PATCH 04/13] target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb, Daniel Henrique Barboza, 2024/01/12
- [PATCH 05/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb', Daniel Henrique Barboza, 2024/01/12
- [PATCH 06/13] target/riscv/insn_trans/trans_rvvk.c.inc: use 'vlenb', Daniel Henrique Barboza, 2024/01/12
- [PATCH 07/13] target/riscv/vector_helper.c: use 'vlenb', Daniel Henrique Barboza, 2024/01/12
- [PATCH 08/13] target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl), Daniel Henrique Barboza, 2024/01/12
- [PATCH 09/13] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax(),
Daniel Henrique Barboza <=
- [PATCH 11/13] trans_rvv.c.inc: remove vlmax arg from vec_element_loadx(), Daniel Henrique Barboza, 2024/01/12
- [PATCH 10/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ(), Daniel Henrique Barboza, 2024/01/12
- [PATCH 12/13] trans_rvv.c.inc: use cpu_vl in trans_vrgather_vi(), Daniel Henrique Barboza, 2024/01/12
- [PATCH 13/13] target/riscv/cpu.c: remove cpu->cfg.vlen, Daniel Henrique Barboza, 2024/01/12