From: Philippe Mathieu-Daudé Date: Mon, 9 Oct 2023 10:42:42 +0000 (+0200) Subject: target/s390x: Use env_archcpu() in handle_diag_308() X-Git-Tag: v8.2.0-rc0~19^2~54 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c6822cd59d5c016bb4e9e36143ad60215f9ff09;p=thirdparty%2Fqemu.git target/s390x: Use env_archcpu() in handle_diag_308() When CPUArchState* is available (here CPUS390XState*), we can use the fast env_archcpu() macro to get ArchCPU* (here S390CPU*). The QOM cast S390_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-Id: <20231009110239.66778-4-philmd@linaro.org> --- diff --git a/target/s390x/diag.c b/target/s390x/diag.c index 8ce18e08f34..27ffd48576d 100644 --- a/target/s390x/diag.c +++ b/target/s390x/diag.c @@ -77,7 +77,7 @@ void handle_diag_308(CPUS390XState *env, uint64_t r1, uint64_t r3, uintptr_t ra) { bool valid; CPUState *cs = env_cpu(env); - S390CPU *cpu = S390_CPU(cs); + S390CPU *cpu = env_archcpu(env); uint64_t addr = env->regs[r1]; uint64_t subcode = env->regs[r3]; IplParameterBlock *iplb;