diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-10-19 20:16:57 -0700 |
---|---|---|
committer | Alistair Francis <alistair@alistair23.me> | 2021-10-22 07:47:51 +1000 |
commit | e91a7227cb802ea62ffa14707ebc2f588b01213d (patch) | |
tree | 83e6aa01014f64717ecdcf2b0b7ee2b42ef44b72 /target/riscv/gdbstub.c | |
parent | 99bc874fb3a0709c36ae4e594a1262ce1660e698 (diff) | |
download | qemu-e91a7227cb802ea62ffa14707ebc2f588b01213d.zip qemu-e91a7227cb802ea62ffa14707ebc2f588b01213d.tar.gz qemu-e91a7227cb802ea62ffa14707ebc2f588b01213d.tar.bz2 |
target/riscv: Split misa.mxl and misa.ext
The hw representation of misa.mxl is at the high bits of the
misa csr. Representing this in the same way inside QEMU
results in overly complex code trying to check that field.
Reviewed-by: LIU Zhiwei <zhiwei_liu@c-sky.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20211020031709.359469-4-richard.henderson@linaro.org
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'target/riscv/gdbstub.c')
-rw-r--r-- | target/riscv/gdbstub.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/target/riscv/gdbstub.c b/target/riscv/gdbstub.c index a7a9c0b..5257df0 100644 --- a/target/riscv/gdbstub.c +++ b/target/riscv/gdbstub.c @@ -54,10 +54,10 @@ int riscv_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) static int riscv_gdb_get_fpu(CPURISCVState *env, GByteArray *buf, int n) { if (n < 32) { - if (env->misa & RVD) { + if (env->misa_ext & RVD) { return gdb_get_reg64(buf, env->fpr[n]); } - if (env->misa & RVF) { + if (env->misa_ext & RVF) { return gdb_get_reg32(buf, env->fpr[n]); } /* there is hole between ft11 and fflags in fpu.xml */ @@ -191,10 +191,10 @@ void riscv_cpu_register_gdb_regs_for_features(CPUState *cs) { RISCVCPU *cpu = RISCV_CPU(cs); CPURISCVState *env = &cpu->env; - if (env->misa & RVD) { + if (env->misa_ext & RVD) { gdb_register_coprocessor(cs, riscv_gdb_get_fpu, riscv_gdb_set_fpu, 36, "riscv-64bit-fpu.xml", 0); - } else if (env->misa & RVF) { + } else if (env->misa_ext & RVF) { gdb_register_coprocessor(cs, riscv_gdb_get_fpu, riscv_gdb_set_fpu, 36, "riscv-32bit-fpu.xml", 0); } |