summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 16:23:46 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-11-30 16:23:46 +0000
commit931ff2725866606d0c695576a9ec3b7808d82b24 (patch)
tree28740883936e8b3b2e119508b88f765c24a90d43
parentcf02a65c77772245bc7611f90a7393a038241e35 (diff)
downloadqemu-931ff2725866606d0c695576a9ec3b7808d82b24.tar.gz
qemu-931ff2725866606d0c695576a9ec3b7808d82b24.tar.bz2
qemu-931ff2725866606d0c695576a9ec3b7808d82b24.zip
target-ppc: convert wait instruction to TCG
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5824 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--target-ppc/op.c6
-rw-r--r--target-ppc/op_helper.h5
-rw-r--r--target-ppc/translate.c4
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);
}