[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 27/52] tcg: Add guest_mo to TCGContext
From: |
Richard Henderson |
Subject: |
[PULL 27/52] tcg: Add guest_mo to TCGContext |
Date: |
Mon, 5 Jun 2023 13:15:23 -0700 |
This replaces of TCG_GUEST_DEFAULT_MO in tcg-op-ldst.c.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/tcg.h | 1 +
accel/tcg/translate-all.c | 5 +++++
tcg/tcg-op-ldst.c | 4 +---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index 813c733910..9f607e2664 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -521,6 +521,7 @@ struct TCGContext {
uint8_t tlb_dyn_max_bits;
#endif
uint8_t insn_start_words;
+ TCGBar guest_mo;
TCGRegSet reserved_regs;
intptr_t current_frame_offset;
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c
index 67b838e16b..200de2793c 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -364,6 +364,11 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
(int)offsetof(ArchCPU, neg.tlb.f) - (int)offsetof(ArchCPU, env);
#endif
tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS;
+#ifdef TCG_GUEST_DEFAULT_MO
+ tcg_ctx->guest_mo = TCG_GUEST_DEFAULT_MO;
+#else
+ tcg_ctx->guest_mo = TCG_MO_ALL;
+#endif
tb_overflow:
diff --git a/tcg/tcg-op-ldst.c b/tcg/tcg-op-ldst.c
index 3c00bf0c95..9bcf63b041 100644
--- a/tcg/tcg-op-ldst.c
+++ b/tcg/tcg-op-ldst.c
@@ -104,9 +104,7 @@ static void gen_ldst_i64(TCGOpcode opc, TCGv_i64 v, TCGTemp
*addr, MemOpIdx oi)
static void tcg_gen_req_mo(TCGBar type)
{
-#ifdef TCG_GUEST_DEFAULT_MO
- type &= TCG_GUEST_DEFAULT_MO;
-#endif
+ type &= tcg_ctx->guest_mo;
type &= ~TCG_TARGET_DEFAULT_MO;
if (type) {
tcg_gen_mb(type | TCG_BAR_SC);
--
2.34.1
- [PULL 10/52] *: Add missing includes of tcg/tcg.h, (continued)
- [PULL 10/52] *: Add missing includes of tcg/tcg.h, Richard Henderson, 2023/06/05
- [PULL 12/52] target/arm: Fix test of TCG_OVERSIZED_GUEST, Richard Henderson, 2023/06/05
- [PULL 14/52] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h, Richard Henderson, 2023/06/05
- [PULL 18/52] tcg: Remove outdated comments in helper-head.h, Richard Henderson, 2023/06/05
- [PULL 17/52] target/hexagon: Include helper-gen.h where needed, Richard Henderson, 2023/06/05
- [PULL 16/52] target/arm: Include helper-gen.h in translator.h, Richard Henderson, 2023/06/05
- [PULL 19/52] tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h, Richard Henderson, 2023/06/05
- [PULL 21/52] tcg: Move temp_idx and tcgv_i32_temp debug out of line, Richard Henderson, 2023/06/05
- [PULL 25/52] target/sh4: Emit insn_start for each insn in gUSA region, Richard Henderson, 2023/06/05
- [PULL 26/52] tcg: Add insn_start_words to TCGContext, Richard Henderson, 2023/06/05
- [PULL 27/52] tcg: Add guest_mo to TCGContext,
Richard Henderson <=
- [PULL 32/52] exec-all: Widen TranslationBlock pc and cs_base to 64-bits, Richard Henderson, 2023/06/05
- [PULL 24/52] tcg: Split helper-proto.h, Richard Henderson, 2023/06/05
- [PULL 28/52] tcg: Move TLB_FLAGS_MASK check out of get_alignment_bits, Richard Henderson, 2023/06/05
- [PULL 29/52] tcg: Split tcg/tcg-op-gvec.h, Richard Henderson, 2023/06/05
- [PULL 35/52] accel/tcg: Move most of gen-icount.h into translator.c, Richard Henderson, 2023/06/05
- [PULL 33/52] tcg: Spit out exec/translation-block.h, Richard Henderson, 2023/06/05
- [PULL 31/52] exec-all: Widen tb_page_addr_t for user-only, Richard Henderson, 2023/06/05
- [PULL 30/52] tcg: Remove NO_CPU_IO_DEFS, Richard Henderson, 2023/06/05
- [PULL 23/52] tcg: Split helper-gen.h, Richard Henderson, 2023/06/05
- [PULL 15/52] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h, Richard Henderson, 2023/06/05