Skip to content

Commit

Permalink
target/ppc: Use env_archcpu() in helper_book3s_msgsndp()
Browse files Browse the repository at this point in the history
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é <philmd@linaro.org>
Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20231009110239.66778-2-philmd@linaro.org>
  • Loading branch information
philmd committed Nov 6, 2023
1 parent a5502e5 commit 9f94754
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/ppc/excp_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9f94754

Please sign in to comment.