From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbGhU-0003uL-S8 for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:29:20 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbGhP-0003lm-KR for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:29:20 -0400 Received: from [199.232.76.173] (port=58858 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbGhP-0003lU-GB for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:29:15 -0400 Received: from mail-gx0-f220.google.com ([209.85.217.220]:57673) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MbGhO-0003ly-UD for qemu-devel@nongnu.org; Wed, 12 Aug 2009 12:29:15 -0400 Received: by gxk20 with SMTP id 20so329440gxk.10 for ; Wed, 12 Aug 2009 09:29:13 -0700 (PDT) MIME-Version: 1.0 From: Artyom Tarasenko Date: Wed, 12 Aug 2009 18:28:53 +0200 Message-ID: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [Patch] sparc32 remove an unnecessary cpu irq set List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: qemu-devel Signed-off-by: Artyom Tarasenko --- --- 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; \ env->psret = (_tmp & PSR_ET)? 1 : 0; \