diff options
author | Matheus Ferst <matheus.ferst@eldorado.org.br> | 2022-10-11 17:48:04 -0300 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2022-10-28 13:15:22 -0300 |
commit | ba2898f79f9d36320abfa7c0589c796810c7186b (patch) | |
tree | 000acc6519e5bc4c93f5410b62740ba55e2c429e /target/ppc/excp_helper.c | |
parent | de76b85c961378795a9e3044881554b25a4db333 (diff) | |
download | qemu-ba2898f79f9d36320abfa7c0589c796810c7186b.zip qemu-ba2898f79f9d36320abfa7c0589c796810c7186b.tar.gz qemu-ba2898f79f9d36320abfa7c0589c796810c7186b.tar.bz2 |
target/ppc: prepare to split interrupt masking and delivery by excp_model
Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20221011204829.1641124-5-matheus.ferst@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'target/ppc/excp_helper.c')
-rw-r--r-- | target/ppc/excp_helper.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index 759bad5..0e89d2e 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -1684,7 +1684,7 @@ void ppc_cpu_do_interrupt(CPUState *cs) powerpc_excp(cpu, cs->exception_index); } -static int ppc_next_unmasked_interrupt(CPUPPCState *env) +static int ppc_next_unmasked_interrupt_generic(CPUPPCState *env) { bool async_deliver; @@ -1796,7 +1796,15 @@ static int ppc_next_unmasked_interrupt(CPUPPCState *env) return 0; } -static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt) +static int ppc_next_unmasked_interrupt(CPUPPCState *env) +{ + switch (env->excp_model) { + default: + return ppc_next_unmasked_interrupt_generic(env); + } +} + +static void ppc_deliver_interrupt_generic(CPUPPCState *env, int interrupt) { PowerPCCPU *cpu = env_archcpu(env); CPUState *cs = env_cpu(env); @@ -1900,6 +1908,14 @@ static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt) } } +static void ppc_deliver_interrupt(CPUPPCState *env, int interrupt) +{ + switch (env->excp_model) { + default: + ppc_deliver_interrupt_generic(env, interrupt); + } +} + void ppc_cpu_do_system_reset(CPUState *cs) { PowerPCCPU *cpu = POWERPC_CPU(cs); |