mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
target/ppc: Prefer fast cpu_env() over slower CPU QOM cast macro
Mechanical patch produced running the command documented in scripts/coccinelle/cpu_env.cocci_template header. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20240129164514.73104-22-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
074bd799e7
commit
794511bc51
12 changed files with 21 additions and 47 deletions
|
@ -7196,12 +7196,9 @@ static void ppc_cpu_reset_hold(Object *obj)
|
|||
|
||||
static bool ppc_cpu_is_big_endian(CPUState *cs)
|
||||
{
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
CPUPPCState *env = &cpu->env;
|
||||
|
||||
cpu_synchronize_state(cs);
|
||||
|
||||
return !FIELD_EX64(env->msr, MSR, LE);
|
||||
return !FIELD_EX64(cpu_env(cs)->msr, MSR, LE);
|
||||
}
|
||||
|
||||
static bool ppc_get_irq_stats(InterruptStatsProvider *obj,
|
||||
|
@ -7288,8 +7285,7 @@ static bool ppc_pvr_match_default(PowerPCCPUClass *pcc, uint32_t pvr, bool best)
|
|||
|
||||
static void ppc_disas_set_info(CPUState *cs, disassemble_info *info)
|
||||
{
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
CPUPPCState *env = &cpu->env;
|
||||
CPUPPCState *env = cpu_env(cs);
|
||||
|
||||
if ((env->hflags >> MSR_LE) & 1) {
|
||||
info->endian = BFD_ENDIAN_LITTLE;
|
||||
|
@ -7445,8 +7441,7 @@ void ppc_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
|||
#define RGPL 4
|
||||
#define RFPL 4
|
||||
|
||||
PowerPCCPU *cpu = POWERPC_CPU(cs);
|
||||
CPUPPCState *env = &cpu->env;
|
||||
CPUPPCState *env = cpu_env(cs);
|
||||
int i;
|
||||
|
||||
qemu_fprintf(f, "NIP " TARGET_FMT_lx " LR " TARGET_FMT_lx " CTR "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue