From 931ff2725866606d0c695576a9ec3b7808d82b24 Mon Sep 17 00:00:00 2001 From: aurel32 Date: Sun, 30 Nov 2008 16:23:46 +0000 Subject: [PATCH] target-ppc: convert wait instruction to TCG Signed-off-by: Aurelien Jarno git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5824 c046a42c-6fe2-441c-8c8c-71466251a162 --- target-ppc/op.c | 6 ------ target-ppc/op_helper.h | 5 ----- target-ppc/translate.c | 4 +++- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/target-ppc/op.c b/target-ppc/op.c index ee67546178..16ab58988e 100644 --- a/target-ppc/op.c +++ b/target-ppc/op.c @@ -290,12 +290,6 @@ void OPPROTO op_check_reservation_64 (void) } #endif -void OPPROTO op_wait (void) -{ - env->halted = 1; - RETURN(); -} - /* Return from interrupt */ #if !defined(CONFIG_USER_ONLY) void OPPROTO op_rfi (void) diff --git a/target-ppc/op_helper.h b/target-ppc/op_helper.h index 5e36f573a4..44f02d640c 100644 --- a/target-ppc/op_helper.h +++ b/target-ppc/op_helper.h @@ -85,11 +85,6 @@ void do_POWER_rfsvc (void); 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); diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 63e17deba8..c831ea7819 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -3310,8 +3310,10 @@ GEN_HANDLER(sync, 0x1F, 0x16, 0x12, 0x039FF801, PPC_MEM_SYNC) /* 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); } -- 2.11.0