mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
target/mips: 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. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20240129164514.73104-19-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
da9536433f
commit
4c44a98051
9 changed files with 24 additions and 50 deletions
|
@ -90,8 +90,7 @@ static void debug_post_eret(CPUMIPSState *env)
|
|||
|
||||
bool mips_io_recompile_replay_branch(CPUState *cs, const TranslationBlock *tb)
|
||||
{
|
||||
MIPSCPU *cpu = MIPS_CPU(cs);
|
||||
CPUMIPSState *env = &cpu->env;
|
||||
CPUMIPSState *env = cpu_env(cs);
|
||||
|
||||
if ((env->hflags & MIPS_HFLAG_BMASK) != 0
|
||||
&& !(cs->tcg_cflags & CF_PCREL) && env->active_tc.PC != tb->pc) {
|
||||
|
|
|
@ -906,8 +906,7 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size,
|
|||
MMUAccessType access_type, int mmu_idx,
|
||||
bool probe, uintptr_t retaddr)
|
||||
{
|
||||
MIPSCPU *cpu = MIPS_CPU(cs);
|
||||
CPUMIPSState *env = &cpu->env;
|
||||
CPUMIPSState *env = cpu_env(cs);
|
||||
hwaddr physical;
|
||||
int prot;
|
||||
int ret = TLBRET_BADADDR;
|
||||
|
@ -1340,8 +1339,7 @@ void mips_cpu_do_interrupt(CPUState *cs)
|
|||
bool mips_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
||||
{
|
||||
if (interrupt_request & CPU_INTERRUPT_HARD) {
|
||||
MIPSCPU *cpu = MIPS_CPU(cs);
|
||||
CPUMIPSState *env = &cpu->env;
|
||||
CPUMIPSState *env = cpu_env(cs);
|
||||
|
||||
if (cpu_mips_hw_interrupts_enabled(env) &&
|
||||
cpu_mips_hw_interrupts_pending(env)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue