aboutsummaryrefslogtreecommitdiff
path: root/target-sparc/cpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'target-sparc/cpu.h')
-rw-r--r--target-sparc/cpu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index e5b282d..50859c7 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -577,6 +577,16 @@ static inline int cpu_interrupts_enabled(CPUState *env1)
return 0;
}
+static inline int cpu_pil_allowed(CPUState *env1, int pil)
+{
+#if !defined(TARGET_SPARC64)
+ /* level 15 is non-maskable on sparc v8 */
+ return pil == 15 || pil > env1->psrpil;
+#else
+ return pil > env1->psrpil;
+#endif
+}
+
static inline int cpu_fpu_enabled(CPUState *env1)
{
#if defined(CONFIG_USER_ONLY)