[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 25/34] tcg/ppc: Optimize memory ordering generation with lwsync
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 25/34] tcg/ppc: Optimize memory ordering generation with lwsync |
Date: |
Thu, 26 May 2022 18:38:06 -0300 |
From: Nicholas Piggin <npiggin@gmail.com>
lwsync orders more than just LD_LD, importantly it matches x86 and
s390 default memory ordering.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20220519135908.21282-4-npiggin@gmail.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
tcg/ppc/tcg-target.c.inc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc
index 4750091c9c..de4483e43b 100644
--- a/tcg/ppc/tcg-target.c.inc
+++ b/tcg/ppc/tcg-target.c.inc
@@ -1832,11 +1832,14 @@ static void tcg_out_brcond2 (TCGContext *s, const
TCGArg *args,
static void tcg_out_mb(TCGContext *s, TCGArg a0)
{
- uint32_t insn = HWSYNC;
- a0 &= TCG_MO_ALL;
- if (a0 == TCG_MO_LD_LD) {
+ uint32_t insn;
+
+ if (a0 & TCG_MO_ST_LD) {
+ insn = HWSYNC;
+ } else {
insn = LWSYNC;
}
+
tcg_out32(s, insn);
}
--
2.36.1
- [PULL 10/34] pnv/xive2: Don't overwrite PC registers when writing TCTXT registers, (continued)
- [PULL 10/34] pnv/xive2: Don't overwrite PC registers when writing TCTXT registers, Daniel Henrique Barboza, 2022/05/26
- [PULL 08/34] target/ppc: Fix FPSCR.FI changing in float_overflow_excp(), Daniel Henrique Barboza, 2022/05/26
- [PULL 11/34] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG, Daniel Henrique Barboza, 2022/05/26
- [PULL 13/34] target/ppc: use TCG_CALL_NO_RWG in BCD helpers, Daniel Henrique Barboza, 2022/05/26
- [PULL 15/34] target/ppc: Use TCG_CALL_NO_RWG_SE in fsel helper, Daniel Henrique Barboza, 2022/05/26
- [PULL 19/34] target/ppc: introduce do_va_helper, Daniel Henrique Barboza, 2022/05/26
- [PULL 20/34] target/ppc: declare vmsum[um]bm helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 12/34] target/ppc: use TCG_CALL_NO_RWG in vector helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 14/34] target/ppc: use TCG_CALL_NO_RWG in VSX helpers without env, Daniel Henrique Barboza, 2022/05/26
- [PULL 16/34] target/ppc: declare xscvspdpn helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 25/34] tcg/ppc: Optimize memory ordering generation with lwsync,
Daniel Henrique Barboza <=
- [PULL 17/34] target/ppc: declare xvxsigsp helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 18/34] target/ppc: declare xxextractuw and xxinsertw helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 21/34] target/ppc: declare vmsumuh[ms] helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 26/34] target/ppc: Implement lwsync with weaker memory ordering, Daniel Henrique Barboza, 2022/05/26
- [PULL 24/34] tcg/ppc: ST_ST memory ordering is not provided with eieio, Daniel Henrique Barboza, 2022/05/26
- [PULL 22/34] target/ppc: declare vmsumsh[ms] helper with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 23/34] target/ppc: Fix eieio memory ordering semantics, Daniel Henrique Barboza, 2022/05/26
- [PULL 27/34] target/ppc: Implement xxm[tf]acc and xxsetaccz, Daniel Henrique Barboza, 2022/05/26
- [PULL 28/34] target/ppc: Implemented xvi*ger* instructions, Daniel Henrique Barboza, 2022/05/26
- [PULL 29/34] target/ppc: Implemented pmxvi*ger* instructions, Daniel Henrique Barboza, 2022/05/26