From: Daniel Henrique Barboza Date: Fri, 10 Feb 2023 12:38:36 +0000 (-0300) Subject: target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state() X-Git-Tag: v8.0.0-rc0~45^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=718942aed69d42f0d982824b2469331ff77edcb2;p=thirdparty%2Fqemu.git target/riscv: avoid env_archcpu() in cpu_get_tb_cpu_state() We have a RISCVCPU *cpu pointer available at the start of the function. Signed-off-by: Daniel Henrique Barboza Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Weiwei Li Message-ID: <20230210123836.506286-1-dbarboza@ventanamicro.com> Signed-off-by: Palmer Dabbelt --- diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index ad8d82662c4..3a9472a2ff3 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -60,7 +60,7 @@ void cpu_get_tb_cpu_state(CPURISCVState *env, target_ulong *pc, * which is not supported by GVEC. So we set vl_eq_vlmax flag to true * only when maxsz >= 8 bytes. */ - uint32_t vlmax = vext_get_vlmax(env_archcpu(env), env->vtype); + uint32_t vlmax = vext_get_vlmax(cpu, env->vtype); uint32_t sew = FIELD_EX64(env->vtype, VTYPE, VSEW); uint32_t maxsz = vlmax << sew; bool vl_eq_vlmax = (env->vstart == 0) && (vlmax == env->vl) &&