Patchwork sparc32 remove an unnecessary cpu irq set

login
register
mail settings
Submitter Artyom Tarasenko
Date Aug. 12, 2009, 4:28 p.m.
Message ID <fb8d4f70908120928t7bf7bb46i68b40662fcb02b44@mail.gmail.com>
Download mbox | patch
Permalink /patch/31211/
State Superseded
Headers show

Comments

Artyom Tarasenko - Aug. 12, 2009, 4:28 p.m.
Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com>
---
         env->psret = (_tmp & PSR_ET)? 1 : 0;                            \

Patch

--- a/cpu-exec.c
+++ b/cpu-exec.c
@@ -485,9 +485,6 @@  int cpu_exec(CPUState *env1)
                             env->exception_index = env->interrupt_index;
                             do_interrupt(env);
                            env->interrupt_index = 0;
-#if !defined(CONFIG_USER_ONLY)
-                            cpu_check_irqs(env);
-#endif
                         next_tb = 0;
                        }
                    } else if (interrupt_request & CPU_INTERRUPT_TIMER) {
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h
index 2428bb2..b69ebf5 100644
--- a/target-sparc/cpu.h
+++ b/target-sparc/cpu.h
@@ -480,9 +480,11 @@  static inline int cpu_cwp_dec(CPUSPARCState *env1, int cwp)

 #if !defined (TARGET_SPARC64)
 #define PUT_PSR(env, val) do { int _tmp = val;                          \
+       int _newpsrpil=(_tmp & PSR_PIL) >> 8;                           \
         env->psr = _tmp & PSR_ICC;                                      \
         env->psref = (_tmp & PSR_EF)? 1 : 0;                            \
-        env->psrpil = (_tmp & PSR_PIL) >> 8;                            \
+        if((_newpsrpil>env->psrpil)&& ((env->pil_in&15)>_newpsrpil))
cpu_check_irqs(env); \
+        env->psrpil = _newpsrpil;                                       \
         env->psrs = (_tmp & PSR_S)? 1 : 0;                              \
         env->psrps = (_tmp & PSR_PS)? 1 : 0;                            \