From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NSyyA-000531-Bx for qemu-devel@nongnu.org; Thu, 07 Jan 2010 15:28:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NSyy5-0004wO-IC for qemu-devel@nongnu.org; Thu, 07 Jan 2010 15:28:33 -0500 Received: from [199.232.76.173] (port=38281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NSyy5-0004w9-BW for qemu-devel@nongnu.org; Thu, 07 Jan 2010 15:28:29 -0500 Received: from mail-fx0-f222.google.com ([209.85.220.222]:33820) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NSyy5-0000ti-1c for qemu-devel@nongnu.org; Thu, 07 Jan 2010 15:28:29 -0500 Received: by mail-fx0-f222.google.com with SMTP id 22so21243905fxm.2 for ; Thu, 07 Jan 2010 12:28:28 -0800 (PST) Received: from localhost ([127.0.0.1] helo=[192.168.1.2]) by skyserv with esmtp (Exim 4.71) (envelope-from ) id 1NSyy2-0004Qs-8I for qemu-devel@nongnu.org; Thu, 07 Jan 2010 23:28:26 +0300 From: "Igor V. Kovalenko" Date: Thu, 07 Jan 2010 23:28:26 +0300 Message-ID: <20100107202826.16653.73812.stgit@skyserv> In-Reply-To: <20100107201810.16653.85771.stgit@skyserv> References: <20100107201810.16653.85771.stgit@skyserv> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PATCH 7/9] sparc64: move cpu_interrupts_enabled to cpu.h List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org From: Igor V. Kovalenko - to be used by cpu_check_irqs Signed-off-by: Igor V. Kovalenko --- target-sparc/cpu.h | 13 +++++++++++++ target-sparc/exec.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 0f0e38c..e5b282d 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) diff --git a/target-sparc/exec.h b/target-sparc/exec.h index e120d6f..3e021e9 100644 --- a/target-sparc/exec.h +++ b/target-sparc/exec.h @@ -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) &&