From: Roman Artemev Date: Wed, 11 Dec 2024 07:40:04 +0000 (+0000) Subject: tcg/riscv: Fix StoreStore barrier generation X-Git-Tag: v10.0.0-rc0~121^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b438362a142527b97b638b7f0f35ebe11911a8d5;p=thirdparty%2Fqemu.git tcg/riscv: Fix StoreStore barrier generation On RISC-V to StoreStore barrier corresponds `fence w, w` not `fence r, r` Cc: qemu-stable@nongnu.org Fixes: efbea94c76b ("tcg/riscv: Add slowpath load and store instructions") Reviewed-by: Richard Henderson Signed-off-by: Denis Tomashev Signed-off-by: Roman Artemev Message-ID: Signed-off-by: Richard Henderson --- diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index f8331e46883..96f9a7e3488 100644 --- a/tcg/riscv/tcg-target.c.inc +++ b/tcg/riscv/tcg-target.c.inc @@ -1624,7 +1624,7 @@ static void tcg_out_mb(TCGContext *s, TCGArg a0) insn |= 0x02100000; } if (a0 & TCG_MO_ST_ST) { - insn |= 0x02200000; + insn |= 0x01100000; } tcg_out32(s, insn); }