Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/ppc: Fix lqarx to set cpu_reserve
lqarx does not set cpu_reserve, which causes stqcx. to never succeed.

Cc: qemu-stable@nongnu.org
Fixes: 94bf265 ("target/ppc: Use atomic load for LQ and LQARX")
Fixes: 57b38ff ("target/ppc: Use tcg_gen_qemu_{ld,st}_i128 for LQARX, LQ, STQ")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230605025445.161932-1-npiggin@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
(cherry picked from commit e025e8f)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
npiggin authored and Michael Tokarev committed Jun 11, 2023
1 parent 9b55660 commit d31e0a3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions target/ppc/translate.c
Expand Up @@ -3972,6 +3972,7 @@ static void gen_lqarx(DisasContext *ctx)
}
tcg_temp_free(EA);

tcg_gen_mov_tl(cpu_reserve, EA);
tcg_gen_st_tl(hi, cpu_env, offsetof(CPUPPCState, reserve_val));
tcg_gen_st_tl(lo, cpu_env, offsetof(CPUPPCState, reserve_val2));
}
Expand Down

0 comments on commit d31e0a3

Please sign in to comment.