From: Nicholas Piggin Date: Mon, 5 Jun 2023 02:54:44 +0000 (+1000) Subject: target/ppc: Remove larx/stcx. memory barrier semantics X-Git-Tag: v8.1.0-rc0~59^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2c901dca1863515bd71c3f351610f0698cb8f0b4;p=thirdparty%2Fqemu.git target/ppc: Remove larx/stcx. memory barrier semantics larx and stcx. are not defined to order any memory operations. Remove the barriers. Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin Message-Id: <20230605025445.161932-3-npiggin@gmail.com> Signed-off-by: Daniel Henrique Barboza --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index cf0bd79b8cb..cb4764476d4 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -3476,7 +3476,6 @@ static void gen_load_locked(DisasContext *ctx, MemOp memop) tcg_gen_mov_tl(cpu_reserve, t0); tcg_gen_movi_tl(cpu_reserve_length, memop_size(memop)); tcg_gen_mov_tl(cpu_reserve_val, gpr); - tcg_gen_mb(TCG_MO_ALL | TCG_BAR_LDAQ); } #define LARX(name, memop) \ @@ -3720,11 +3719,6 @@ static void gen_conditional_store(DisasContext *ctx, MemOp memop) gen_set_label(l1); - /* - * Address mismatch implies failure. But we still need to provide - * the memory barrier semantics of the instruction. - */ - tcg_gen_mb(TCG_MO_ALL | TCG_BAR_STRL); tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); gen_set_label(l2); @@ -3828,11 +3822,6 @@ static void gen_stqcx_(DisasContext *ctx) tcg_gen_br(lab_over); gen_set_label(lab_fail); - /* - * Address mismatch implies failure. But we still need to provide - * the memory barrier semantics of the instruction. - */ - tcg_gen_mb(TCG_MO_ALL | TCG_BAR_STRL); tcg_gen_trunc_tl_i32(cpu_crf[0], cpu_so); gen_set_label(lab_over);