diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2023-06-05 12:54:42 +1000 |
---|---|---|
committer | Michael Tokarev <mjt@tls.msk.ru> | 2023-06-11 11:07:26 +0300 |
commit | d31e0a384391c072bb121816ce9b7582a65cad9d (patch) | |
tree | 4f5ca8317716e87849be157a95254d63ec551cd6 | |
parent | 9b55660e4a4f6bfea0965b2567641492a1feac57 (diff) | |
download | qemu-d31e0a384391c072bb121816ce9b7582a65cad9d.zip qemu-d31e0a384391c072bb121816ce9b7582a65cad9d.tar.gz qemu-d31e0a384391c072bb121816ce9b7582a65cad9d.tar.bz2 |
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>
(cherry picked from commit e025e8f5a8a7e32409bb4c7c509d752486113188)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
-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 19c1d17..1de7eca 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -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)); } |