Skip to content

Commit

Permalink
target-ppc: Bug in BookE wait instruction
Browse files Browse the repository at this point in the history
Fixed bug in code generation for the PowerPC "wait" instruction. It
doesn't make sense to store a non-initialized register.

Signed-off-by: Jakub Horak <[email protected]>
[dwg: revised commit message]
Signed-off-by: David Gibson <[email protected]>
  • Loading branch information
Jakub Horak authored and dgibson committed Jun 17, 2016
1 parent fcbf4a3 commit 35b5066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target-ppc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3499,7 +3499,7 @@ static void gen_sync(DisasContext *ctx)
/* wait */
static void gen_wait(DisasContext *ctx)
{
TCGv_i32 t0 = tcg_temp_new_i32();
TCGv_i32 t0 = tcg_const_i32(1);
tcg_gen_st_i32(t0, cpu_env,
-offsetof(PowerPCCPU, env) + offsetof(CPUState, halted));
tcg_temp_free_i32(t0);
Expand Down

0 comments on commit 35b5066

Please sign in to comment.