Rename the method to ppc_interrupt_pending_legacy and create a new ppc_interrupt_pending that will call the appropriate interrupt masking method based on env->excp_model.
Signed-off-by: Matheus Ferst <matheus.fe...@eldorado.org.br> --- target/ppc/excp_helper.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 8690017c70..59981efd16 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -1678,7 +1678,7 @@ void ppc_cpu_do_interrupt(CPUState *cs) powerpc_excp(cpu, cs->exception_index); } -static int ppc_pending_interrupt(CPUPPCState *env) +static int ppc_pending_interrupt_legacy(CPUPPCState *env) { bool async_deliver; @@ -1790,6 +1790,14 @@ static int ppc_pending_interrupt(CPUPPCState *env) return 0; } +static int ppc_pending_interrupt(CPUPPCState *env) +{ + switch (env->excp_model) { + default: + return ppc_pending_interrupt_legacy(env); + } +} + static void ppc_hw_interrupt(CPUPPCState *env, int pending_interrupt) { PowerPCCPU *cpu = env_archcpu(env); -- 2.25.1