Commit 931ff2725866606d0c695576a9ec3b7808d82b24

Authored by aurel32
1 parent cf02a65c

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
target-ppc/op.c
... ... @@ -290,12 +290,6 @@ void OPPROTO op_check_reservation_64 (void)
290 290 }
291 291 #endif
292 292  
293   -void OPPROTO op_wait (void)
294   -{
295   - env->halted = 1;
296   - RETURN();
297   -}
298   -
299 293 /* Return from interrupt */
300 294 #if !defined(CONFIG_USER_ONLY)
301 295 void OPPROTO op_rfi (void)
... ...
target-ppc/op_helper.h
... ... @@ -85,11 +85,6 @@ void do_POWER_rfsvc (void);
85 85 void do_store_hid0_601 (void);
86 86 #endif
87 87  
88   -/* PowerPC 602 specific helper */
89   -#if !defined(CONFIG_USER_ONLY)
90   -void do_op_602_mfrom (void);
91   -#endif
92   -
93 88 /* PowerPC 440 specific helpers */
94 89 #if !defined(CONFIG_USER_ONLY)
95 90 void do_440_tlbre (int word);
... ...
target-ppc/translate.c
... ... @@ -3310,8 +3310,10 @@ GEN_HANDLER(sync, 0x1F, 0x16, 0x12, 0x039FF801, PPC_MEM_SYNC)
3310 3310 /* wait */
3311 3311 GEN_HANDLER(wait, 0x1F, 0x1E, 0x01, 0x03FFF801, PPC_WAIT)
3312 3312 {
  3313 + TCGv_i32 t0 = tcg_temp_new_i32();
  3314 + tcg_gen_st_i32(t0, cpu_env, offsetof(CPUState, halted));
  3315 + tcg_temp_free_i32(t0);
3313 3316 /* Stop translation, as the CPU is supposed to sleep from now */
3314   - gen_op_wait();
3315 3317 GEN_EXCP(ctx, EXCP_HLT, 1);
3316 3318 }
3317 3319  
... ...