[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp()
From: |
Alistair Francis |
Subject: |
Re: [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp() |
Date: |
Wed, 11 Oct 2023 11:20:15 +1000 |
On Mon, Oct 9, 2023 at 9:03 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> 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>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Alistair
> ---
> target/ppc/excp_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c
> index 7926114d5c..a42743a3e0 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);
> --
> 2.41.0
>
>
- [PATCH 0/6] target: Use env_archcpu() instead of ARCH_CPU(env_cpu(env)), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 1/6] target/ppc: Use env_archcpu() in helper_book3s_msgsndp(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 2/6] target/riscv: Use env_archcpu() in [check_]nanbox(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 4/6] target/xtensa: Use env_archcpu() in update_c[compare|count](), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 3/6] target/s390x: Use env_archcpu() in handle_diag_308(), Philippe Mathieu-Daudé, 2023/10/09
- [PATCH 5/6] target/i386/hvf: Use x86_cpu in simulate_[rdmsr|wrmsr](), Philippe Mathieu-Daudé, 2023/10/09