diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-06-05 12:54:42 +1000 |
---|---|---|
committer | Daniel Henrique Barboza <danielhb413@gmail.com> | 2023-06-10 10:19:24 -0300 |
commit | e025e8f5a8a7e32409bb4c7c509d752486113188 (patch) | |
tree | e7ae281b6dad21c49f1d0ec29c7d2396bbbc361b | |
parent | a5436bc6ed4d385690546783f1799ea927f5ebd2 (diff) |
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: 94bf2658676 ("target/ppc: Use atomic load for LQ and LQARX")
Fixes: 57b38ffd0c6 ("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>
-rw-r--r-- | target/ppc/translate.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 37fd431870..452439b729 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -3765,6 +3765,7 @@ static void gen_lqarx(DisasContext *ctx) tcg_gen_qemu_ld_i128(t16, EA, ctx->mem_idx, DEF_MEMOP(MO_128 | MO_ALIGN)); tcg_gen_extr_i128_i64(lo, hi, t16); + 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)); } |