On 21/3/25 13:57, Philippe Mathieu-Daudé wrote:
Add the TCGCPUOps::guest_default_memory_order field and have
each target initialize it.
Use it to set TCGContext::guest_mo in tb_gen_code(), removing
the need for the TCG_GUEST_DEFAULT_MO definition.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
include/accel/tcg/cpu-ops.h | 8 ++++++++
target/alpha/cpu-param.h | 3 ---
target/arm/cpu-param.h | 3 ---
target/avr/cpu-param.h | 2 --
target/hexagon/cpu-param.h | 3 ---
target/hppa/cpu-param.h | 8 --------
target/i386/cpu-param.h | 3 ---
target/loongarch/cpu-param.h | 2 --
target/m68k/cpu-param.h | 3 ---
target/microblaze/cpu-param.h | 3 ---
target/mips/cpu-param.h | 2 --
target/openrisc/cpu-param.h | 2 --
target/ppc/cpu-param.h | 2 --
target/riscv/cpu-param.h | 2 --
target/rx/cpu-param.h | 3 ---
target/s390x/cpu-param.h | 6 ------
target/sh4/cpu-param.h | 3 ---
target/sparc/cpu-param.h | 23 -----------------------
target/tricore/cpu-param.h | 3 ---
target/xtensa/cpu-param.h | 3 ---
accel/tcg/translate-all.c | 2 +-
target/alpha/cpu.c | 3 +++
target/arm/cpu.c | 3 +++
target/arm/tcg/cpu-v7m.c | 3 +++
target/avr/cpu.c | 1 +
target/hexagon/cpu.c | 2 ++
target/hppa/cpu.c | 8 ++++++++
target/i386/tcg/tcg-cpu.c | 5 +++++
target/loongarch/cpu.c | 2 ++
target/m68k/cpu.c | 3 +++
target/microblaze/cpu.c | 3 +++
target/mips/cpu.c | 2 ++
target/openrisc/cpu.c | 2 ++
target/ppc/cpu_init.c | 2 ++
target/riscv/tcg/tcg-cpu.c | 2 ++
target/rx/cpu.c | 3 +++
target/s390x/cpu.c | 6 ++++++
target/sh4/cpu.c | 3 +++
target/sparc/cpu.c | 23 +++++++++++++++++++++++
target/tricore/cpu.c | 2 ++
target/xtensa/cpu.c | 3 +++
41 files changed, 90 insertions(+), 80 deletions(-)
Missing one TCG_GUEST_DEFAULT_MO mention in docs:
-- >8 --
diff --git a/docs/devel/multi-thread-tcg.rst
b/docs/devel/multi-thread-tcg.rst
index b0f473961dd..14a2a9dc7b5 100644
--- a/docs/devel/multi-thread-tcg.rst
+++ b/docs/devel/multi-thread-tcg.rst
@@ -31,2 +31,2 @@ combinations where the host memory model is able to
accommodate the
-guest (TCG_GUEST_DEFAULT_MO & ~TCG_TARGET_DEFAULT_MO is zero) and the
-guest has had the required work done to support this safely
+guest (TCGCPUOps::guest_default_memory_order & ~TCG_TARGET_DEFAULT_MO
is zero)
+and the guest has had the required work done to support this safely
---