Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L6p5K-0006BS-5j for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:23:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L6p5J-0006AI-Au for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:23:49 -0500 Received: from [199.232.76.173] (port=39013 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L6p5J-0006A3-72 for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:23:49 -0500 Received: from savannah.gnu.org ([199.232.41.3]:48781 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L6p5I-0006sp-To for qemu-devel@nongnu.org; Sun, 30 Nov 2008 11:23:49 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1L6p5I-0005vr-3U for qemu-devel@nongnu.org; Sun, 30 Nov 2008 16:23:48 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1L6p5H-0005vk-6u for qemu-devel@nongnu.org; Sun, 30 Nov 2008 16:23:47 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 30 Nov 2008 16:23:47 +0000 Subject: [Qemu-devel] [5824] target-ppc: convert wait instruction to TCG 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 Revision: 5824 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5824 Author: aurel32 Date: 2008-11-30 16:23:46 +0000 (Sun, 30 Nov 2008) Log Message: ----------- target-ppc: convert wait instruction to TCG Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/op.c trunk/target-ppc/op_helper.h trunk/target-ppc/translate.c Modified: trunk/target-ppc/op.c =================================================================== --- trunk/target-ppc/op.c 2008-11-30 16:23:35 UTC (rev 5823) +++ trunk/target-ppc/op.c 2008-11-30 16:23:46 UTC (rev 5824) @@ -290,12 +290,6 @@ } #endif -void OPPROTO op_wait (void) -{ - env->halted = 1; - RETURN(); -} - /* Return from interrupt */ #if !defined(CONFIG_USER_ONLY) void OPPROTO op_rfi (void) Modified: trunk/target-ppc/op_helper.h =================================================================== --- trunk/target-ppc/op_helper.h 2008-11-30 16:23:35 UTC (rev 5823) +++ trunk/target-ppc/op_helper.h 2008-11-30 16:23:46 UTC (rev 5824) @@ -85,11 +85,6 @@ void do_store_hid0_601 (void); #endif -/* PowerPC 602 specific helper */ -#if !defined(CONFIG_USER_ONLY) -void do_op_602_mfrom (void); -#endif - /* PowerPC 440 specific helpers */ #if !defined(CONFIG_USER_ONLY) void do_440_tlbre (int word); Modified: trunk/target-ppc/translate.c =================================================================== --- trunk/target-ppc/translate.c 2008-11-30 16:23:35 UTC (rev 5823) +++ trunk/target-ppc/translate.c 2008-11-30 16:23:46 UTC (rev 5824) @@ -3310,8 +3310,10 @@ /* wait */ GEN_HANDLER(wait, 0x1F, 0x1E, 0x01, 0x03FFF801, PPC_WAIT) { + TCGv_i32 t0 = tcg_temp_new_i32(); + tcg_gen_st_i32(t0, cpu_env, offsetof(CPUState, halted)); + tcg_temp_free_i32(t0); /* Stop translation, as the CPU is supposed to sleep from now */ - gen_op_wait(); GEN_EXCP(ctx, EXCP_HLT, 1); }