target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 12 Nov 2022 06:11:22 +0000 (16:11 +1000)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 4 Feb 2023 16:19:42 +0000 (06:19 -1000)
commit894448ae7dce4269c4b3c152a7091520317ea397
tree1ea9c575710fab17e5e6a4c785501d47a25c9559
parent9c32396debee91a87867abc562bb8e2b458c958a
target/ppc: Use tcg_gen_atomic_cmpxchg_i128 for STQCX

Note that the previous direct reference to reserve_val,

-   tcg_gen_ld_i64(t1, cpu_env, (ctx->le_mode
-                                ? offsetof(CPUPPCState, reserve_val2)
-                                : offsetof(CPUPPCState, reserve_val)));

was incorrect because all references should have gone through
cpu_reserve_val.  Create a cpu_reserve_val2 tcg temp to fix this.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20221112061122.2720163-2-richard.henderson@linaro.org>
target/ppc/helper.h
target/ppc/mem_helper.c
target/ppc/translate.c