diff options
Diffstat (limited to 'target-ppc/exec.h')
-rw-r--r-- | target-ppc/exec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/target-ppc/exec.h b/target-ppc/exec.h index 4f5abe9..ee5183e 100644 --- a/target-ppc/exec.h +++ b/target-ppc/exec.h @@ -122,4 +122,14 @@ static inline void regs_to_env(void) int cpu_ppc_handle_mmu_fault (CPUState *env, target_ulong address, int rw, int is_user, int is_softmmu); +static inline int cpu_halted(CPUState *env) { + if (!env->halted) + return 0; + if (env->msr[MSR_EE] && (env->interrupt_request & CPU_INTERRUPT_HARD)) { + env->halted = 0; + return 0; + } + return EXCP_HALTED; +} + #endif /* !defined (__PPC_H__) */ |