[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 03/13] target/riscv/gdbstub.c: use 'vlenb' instead of shifting
From: |
Daniel Henrique Barboza |
Subject: |
[PATCH v4 03/13] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen' |
Date: |
Mon, 22 Jan 2024 13:10:57 -0300 |
Signed-off-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
---
target/riscv/gdbstub.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c
index 58b3ace0fe..5ab0abda19 100644
--- a/target/riscv/gdbstub.c
+++ b/target/riscv/gdbstub.c
@@ -130,7 +130,7 @@ static int riscv_gdb_set_fpu(CPURISCVState *env, uint8_t
*mem_buf, int n)
static int riscv_gdb_get_vector(CPURISCVState *env, GByteArray *buf, int n)
{
- uint16_t vlenb = riscv_cpu_cfg(env)->vlen >> 3;
+ uint16_t vlenb = riscv_cpu_cfg(env)->vlenb;
if (n < 32) {
int i;
int cnt = 0;
@@ -146,7 +146,7 @@ static int riscv_gdb_get_vector(CPURISCVState *env,
GByteArray *buf, int n)
static int riscv_gdb_set_vector(CPURISCVState *env, uint8_t *mem_buf, int n)
{
- uint16_t vlenb = riscv_cpu_cfg(env)->vlen >> 3;
+ uint16_t vlenb = riscv_cpu_cfg(env)->vlenb;
if (n < 32) {
int i;
for (i = 0; i < vlenb; i += 8) {
@@ -266,7 +266,7 @@ static int ricsv_gen_dynamic_vector_xml(CPUState *cs, int
base_reg)
RISCVCPU *cpu = RISCV_CPU(cs);
GString *s = g_string_new(NULL);
g_autoptr(GString) ts = g_string_new("");
- int reg_width = cpu->cfg.vlen;
+ int reg_width = cpu->cfg.vlenb << 3;
int num_regs = 0;
int i;
--
2.43.0
- [PATCH v4 00/13] target/riscv: add 'cpu->cfg.vlenb', remove, Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 01/13] target/riscv: add 'vlenb' field in cpu->cfg, Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 02/13] target/riscv/csr.c: use 'vlenb' instead of 'vlen', Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 03/13] target/riscv/gdbstub.c: use 'vlenb' instead of shifting 'vlen',
Daniel Henrique Barboza <=
- [PATCH v4 04/13] target/riscv/insn_trans/trans_rvbf16.c.inc: use cpu->cfg.vlenb, Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 05/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb', Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 06/13] target/riscv/insn_trans/trans_rvvk.c.inc: use 'vlenb', Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 07/13] target/riscv/vector_helper.c: use 'vlenb', Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 08/13] target/riscv/vector_helper.c: use vlenb in HELPER(vsetvl), Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 09/13] target/riscv/insn_trans/trans_rvv.c.inc: use 'vlenb' in MAXSZ(), Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 10/13] target/riscv/cpu.h: use 'vlenb' in vext_get_vlmax(), Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 11/13] target/riscv: change vext_get_vlmax() arguments, Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 12/13] trans_rvv.c.inc: use vext_get_vlmax() in trans_vrgather_v*(), Daniel Henrique Barboza, 2024/01/22
- [PATCH v4 13/13] target/riscv/cpu.c: remove cpu->cfg.vlen, Daniel Henrique Barboza, 2024/01/22