diff options
Diffstat (limited to 'target-sparc/exec.h')
-rw-r--r-- | target-sparc/exec.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/target-sparc/exec.h b/target-sparc/exec.h index f37c8ad994..e120d6fed4 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -24,10 +24,23 @@ static inline void regs_to_env(void) /* op_helper.c */ void do_interrupt(CPUState *env); +static inline int cpu_interrupts_enabled(CPUState *env1) +{ +#if !defined (TARGET_SPARC64) + if (env1->psret != 0) + return 1; +#else + if (env1->pstate & PS_IE) + return 1; +#endif + + return 0; +} + static inline int cpu_has_work(CPUState *env1) { return (env1->interrupt_request & CPU_INTERRUPT_HARD) && - (env1->psret != 0); + cpu_interrupts_enabled(env1); } |