From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F9m3J-0003xp-FU for qemu-devel@nongnu.org; Thu, 16 Feb 2006 11:32:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F9m2o-0003TP-Tv for qemu-devel@nongnu.org; Thu, 16 Feb 2006 11:31:56 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F9m2m-0003Qe-7X for qemu-devel@nongnu.org; Thu, 16 Feb 2006 11:31:48 -0500 Received: from [193.7.176.20] (helo=bender.bawue.de) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_3DES_EDE_CBC_SHA:24) (Exim 4.52) id 1F9m7w-0003Ii-7K for qemu-devel@nongnu.org; Thu, 16 Feb 2006 11:37:08 -0500 Received: from lagash (unknown [194.74.144.146]) (using TLSv1 with cipher DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by bender.bawue.de (Postfix) with ESMTP id 80A2244F1E for ; Thu, 16 Feb 2006 17:31:45 +0100 (MET) Received: from ths by lagash with local (Exim 4.60) (envelope-from ) id 1F9m32-0000OE-D7 for qemu-devel@nongnu.org; Thu, 16 Feb 2006 16:32:04 +0000 Date: Thu, 16 Feb 2006 16:32:04 +0000 Message-ID: <20060216163204.GB23684@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline From: Thiemo Seufer Subject: [Qemu-devel] [PATCH] Trivial code improvement Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hello All, this patch contains some fallout from my qemu mips development. It uses the cached interrupt_request variable instead of querying env and deletes some dead code in target-mips/helper.c. Thiemo Index: cpu-exec.c =================================================================== RCS file: /sources/qemu/qemu/cpu-exec.c,v retrieving revision 1.73 diff -u -p -r1.73 cpu-exec.c --- cpu-exec.c 8 Feb 2006 22:43:39 -0000 1.73 +++ cpu-exec.c 16 Feb 2006 15:21:03 -0000 @@ -549,7 +549,7 @@ int cpu_exec(CPUState *env1) do_interrupt(env); } #endif - if (env->interrupt_request & CPU_INTERRUPT_EXITTB) { + if (interrupt_request & CPU_INTERRUPT_EXITTB) { env->interrupt_request &= ~CPU_INTERRUPT_EXITTB; /* ensure that no TB jump will be modified as the program flow was changed */ Index: target-mips/helper.c =================================================================== RCS file: /sources/qemu/qemu/target-mips/helper.c,v retrieving revision 1.8 diff -u -p -r1.8 helper.c --- target-mips/helper.c 5 Dec 2005 19:59:36 -0000 1.8 +++ target-mips/helper.c 16 Feb 2006 15:21:04 -0000 @@ -220,7 +219,6 @@ int cpu_mips_handle_mmu_fault (CPUState exception = EXCP_TLBS; else exception = EXCP_TLBL; - error_code = 0; break; case -4: /* TLB match but 'D' bit is cleared */ @@ -350,7 +349,6 @@ void do_interrupt (CPUState *env) cause = 4; goto set_EPC; case EXCP_TLBL: - case EXCP_TLBF: cause = 2; if (env->error_code == 1 && !(env->hflags & MIPS_HFLAG_EXL)) offset = 0x000;