From: Philippe Mathieu-Daudé Date: Mon, 9 Oct 2023 10:42:36 +0000 (+0200) Subject: target/ppc: Use env_archcpu() in helper_book3s_msgsndp() X-Git-Tag: v8.2.0-rc0~19^2~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b0a1333331abcf38b6d18a6b97f8f561afc4f48f;p=thirdparty%2Fqemu.git target/ppc: Use env_archcpu() in helper_book3s_msgsndp() When CPUArchState* is available (here CPUPPCState*), we can use the fast env_archcpu() macro to get ArchCPU* (here PowerPCCPU*). The QOM cast POWERPC_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza Reviewed-by: Richard Henderson Acked-by: Alistair Francis Message-Id: <20231009110239.66778-2-philmd@linaro.org> --- diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 7926114d5cc..a42743a3e07 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -3136,7 +3136,7 @@ void helper_book3s_msgclrp(CPUPPCState *env, target_ulong rb) void helper_book3s_msgsndp(CPUPPCState *env, target_ulong rb) { CPUState *cs = env_cpu(env); - PowerPCCPU *cpu = POWERPC_CPU(cs); + PowerPCCPU *cpu = env_archcpu(env); CPUState *ccs; uint32_t nr_threads = cs->nr_threads; int ttir = rb & PPC_BITMASK(57, 63);