Skip to content
Snippets Groups Projects
Commit 2df6c2d0 authored by Igor V. Kovalenko's avatar Igor V. Kovalenko Committed by Blue Swirl
Browse files

sparc64: move cpu_interrupts_enabled to cpu.h


- to be used by cpu_check_irqs

Signed-off-by: default avatarIgor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: default avatarBlue Swirl <blauwirbel@gmail.com>
parent 709f2c1b
No related branches found
No related tags found
No related merge requests found
......@@ -564,6 +564,19 @@ static inline int cpu_mmu_index(CPUState *env1)
#endif
}
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_fpu_enabled(CPUState *env1)
{
#if defined(CONFIG_USER_ONLY)
......
......@@ -24,19 +24,6 @@ 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) &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment