summaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2010-01-07 23:28:26 +0300
committerBlue Swirl <blauwirbel@gmail.com>2010-01-08 17:16:45 +0000
commit2df6c2d0de31461f18d97f8a4d122bdb003297db (patch)
tree3f7fb084757c0288da9b33644245be2322fbcf65 /target-sparc/cpu.h
parent709f2c1b23ceb88c78a116e9a9c22e2a4837f62a (diff)
downloadqemu-2df6c2d0de31461f18d97f8a4d122bdb003297db.tar.gz
qemu-2df6c2d0de31461f18d97f8a4d122bdb003297db.tar.bz2
qemu-2df6c2d0de31461f18d97f8a4d122bdb003297db.zip
sparc64: move cpu_interrupts_enabled to cpu.h
- to be used by cpu_check_irqs Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 0f0e38cf2c..e5b282d391 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -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)