mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-28 21:03:54 -06:00
target/riscv: Avoid env_archcpu() when reading RISCVCPUConfig
Use riscv_cpu_cfg(env) instead of env_archcpu().cfg. Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn> Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com> Message-Id: <20230309071329.45932-2-liweiwei@iscas.ac.cn> Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
This commit is contained in:
parent
f6b761bdbd
commit
9c33e08b2b
3 changed files with 18 additions and 35 deletions
|
@ -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 = env_archcpu(env)->cfg.vlen >> 3;
|
||||
uint16_t vlenb = riscv_cpu_cfg(env)->vlen >> 3;
|
||||
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 = env_archcpu(env)->cfg.vlen >> 3;
|
||||
uint16_t vlenb = riscv_cpu_cfg(env)->vlen >> 3;
|
||||
if (n < 32) {
|
||||
int i;
|
||||
for (i = 0; i < vlenb; i += 8) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue