[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 55/84] tcg: Add guest_mo to TCGContext
|
From: |
Richard Henderson |
|
Subject: |
[PATCH 55/84] tcg: Add guest_mo to TCGContext |
|
Date: |
Wed, 3 May 2023 08:23:02 +0100 |
This replaces of TCG_GUEST_DEFAULT_MO in tcg-op-ldst.c.
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 97f13d937d..24e8cd65ef 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 03ebe58099..181f276b18 100644
--- a/accel/tcg/translate-all.c
+++ b/accel/tcg/translate-all.c
@@ -367,6 +367,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 71cc559f67..9eef859c97 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
- [PATCH 43/84] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h, (continued)
- [PATCH 43/84] tcg: Move TCGv, dup_const_tl definitions to tcg-op.h, Richard Henderson, 2023/05/03
- [PATCH 45/84] target/arm: Include helper-gen.h in translator.h, Richard Henderson, 2023/05/03
- [PATCH 47/84] tcg: Remove outdated comments in helper-head.h, Richard Henderson, 2023/05/03
- [PATCH 44/84] tcg: Split tcg/tcg-op-common.h from tcg/tcg-op.h, Richard Henderson, 2023/05/03
- [PATCH 46/84] target/hexagon: Include helper-gen.h where needed, Richard Henderson, 2023/05/03
- [PATCH 51/84] tcg: Split tcg_gen_callN, Richard Henderson, 2023/05/03
- [PATCH 54/84] tcg: Add insn_start_words to TCGContext, Richard Henderson, 2023/05/03
- [PATCH 53/84] tcg: Split helper-proto.h, Richard Henderson, 2023/05/03
- [PATCH 50/84] tcg: Move temp_idx and tcgv_i32_temp debug out of line, Richard Henderson, 2023/05/03
- [PATCH 48/84] tcg: Move TCGHelperInfo and dependencies to tcg/helper-info.h, Richard Henderson, 2023/05/03
- [PATCH 55/84] tcg: Add guest_mo to TCGContext,
Richard Henderson <=
- [PATCH 62/84] tcg: Remove USE_TCG_OPTIMIZATIONS, Richard Henderson, 2023/05/03
- [PATCH 57/84] tcg: Split tcg/tcg-op-gvec.h, Richard Henderson, 2023/05/03
- [PATCH 68/84] target/arm: Tidy helpers for translation, Richard Henderson, 2023/05/03
- [PATCH 69/84] target/mips: Tidy helpers for translation, Richard Henderson, 2023/05/03
- [PATCH 63/84] tcg: Spit out exec/translation-block.h, Richard Henderson, 2023/05/03
- [PATCH 65/84] accel/tcg: Move most of gen-icount.h into translator.c, Richard Henderson, 2023/05/03
- [PATCH 52/84] tcg: Split helper-gen.h, Richard Henderson, 2023/05/03
- [PATCH 59/84] exec-all: Widen tb_page_addr_t for user-only, Richard Henderson, 2023/05/03
- [PATCH 67/84] accel/tcg: Move translator_fake_ldb out of line, Richard Henderson, 2023/05/03
- [PATCH 49/84] tcg: Pass TCGHelperInfo to tcg_gen_callN, Richard Henderson, 2023/05/03