mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-22 01:21:53 -06:00
tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally
By directly using TCGCPUOps::guest_default_memory_order, we don't need the TCG_GUEST_DEFAULT_MO definition anymore. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Anton Johansson <anjo@rev.ng> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
0eca13c29a
commit
8201f1a29c
40 changed files with 66 additions and 101 deletions
|
@ -28,8 +28,8 @@ vCPU Scheduling
|
||||||
We introduce a new running mode where each vCPU will run on its own
|
We introduce a new running mode where each vCPU will run on its own
|
||||||
user-space thread. This is enabled by default for all FE/BE
|
user-space thread. This is enabled by default for all FE/BE
|
||||||
combinations where the host memory model is able to accommodate the
|
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 (TCGCPUOps::guest_default_memory_order & ~TCG_TARGET_DEFAULT_MO is zero)
|
||||||
guest has had the required work done to support this safely
|
and the guest has had the required work done to support this safely
|
||||||
(TARGET_SUPPORTS_MTTCG).
|
(TARGET_SUPPORTS_MTTCG).
|
||||||
|
|
||||||
System emulation will fall back to the original round robin approach
|
System emulation will fall back to the original round robin approach
|
||||||
|
|
|
@ -26,7 +26,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
/* Alpha processors have a weak memory model */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -235,7 +235,8 @@ static const struct SysemuCPUOps alpha_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps alpha_tcg_ops = {
|
static const TCGCPUOps alpha_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* Alpha processors have a weak memory model */
|
||||||
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = alpha_translate_init,
|
.initialize = alpha_translate_init,
|
||||||
.translate_code = alpha_translate_code,
|
.translate_code = alpha_translate_code,
|
||||||
|
|
|
@ -44,7 +44,4 @@
|
||||||
*/
|
*/
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 2
|
#define TARGET_INSN_START_EXTRA_WORDS 2
|
||||||
|
|
||||||
/* ARM processors have a weak memory model */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2671,7 +2671,8 @@ static const struct SysemuCPUOps arm_sysemu_ops = {
|
||||||
|
|
||||||
#ifdef CONFIG_TCG
|
#ifdef CONFIG_TCG
|
||||||
static const TCGCPUOps arm_tcg_ops = {
|
static const TCGCPUOps arm_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* ARM processors have a weak memory model */
|
||||||
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = arm_translate_init,
|
.initialize = arm_translate_init,
|
||||||
.translate_code = arm_translate_code,
|
.translate_code = arm_translate_code,
|
||||||
|
|
|
@ -232,7 +232,8 @@ static void cortex_m55_initfn(Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TCGCPUOps arm_v7m_tcg_ops = {
|
static const TCGCPUOps arm_v7m_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* ARM processors have a weak memory model */
|
||||||
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = arm_translate_init,
|
.initialize = arm_translate_init,
|
||||||
.translate_code = arm_translate_code,
|
.translate_code = arm_translate_code,
|
||||||
|
|
|
@ -27,6 +27,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO 0
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -224,7 +224,7 @@ static const struct SysemuCPUOps avr_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps avr_tcg_ops = {
|
static const TCGCPUOps avr_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
.initialize = avr_cpu_tcg_init,
|
.initialize = avr_cpu_tcg_init,
|
||||||
.translate_code = avr_cpu_translate_code,
|
.translate_code = avr_cpu_translate_code,
|
||||||
.synchronize_from_tb = avr_cpu_synchronize_from_tb,
|
.synchronize_from_tb = avr_cpu_synchronize_from_tb,
|
||||||
|
|
|
@ -25,7 +25,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
/* MTTCG not yet supported: require strict ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -325,7 +325,8 @@ static void hexagon_cpu_init(Object *obj)
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps hexagon_tcg_ops = {
|
static const TCGCPUOps hexagon_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MTTCG not yet supported: require strict ordering */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
.initialize = hexagon_translate_init,
|
.initialize = hexagon_translate_init,
|
||||||
.translate_code = hexagon_translate_code,
|
.translate_code = hexagon_translate_code,
|
||||||
.synchronize_from_tb = hexagon_cpu_synchronize_from_tb,
|
.synchronize_from_tb = hexagon_cpu_synchronize_from_tb,
|
||||||
|
|
|
@ -21,12 +21,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 2
|
#define TARGET_INSN_START_EXTRA_WORDS 2
|
||||||
|
|
||||||
/* PA-RISC 1.x processors have a strong memory model. */
|
|
||||||
/*
|
|
||||||
* ??? While we do not yet implement PA-RISC 2.0, those processors have
|
|
||||||
* a weak memory model, but with TLB bits that force ordering on a per-page
|
|
||||||
* basis. It's probably easier to fall back to a strong memory model.
|
|
||||||
*/
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -253,7 +253,13 @@ static const struct SysemuCPUOps hppa_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps hppa_tcg_ops = {
|
static const TCGCPUOps hppa_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* PA-RISC 1.x processors have a strong memory model. */
|
||||||
|
/*
|
||||||
|
* ??? While we do not yet implement PA-RISC 2.0, those processors have
|
||||||
|
* a weak memory model, but with TLB bits that force ordering on a per-page
|
||||||
|
* basis. It's probably easier to fall back to a strong memory model.
|
||||||
|
*/
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
|
|
||||||
.initialize = hppa_translate_init,
|
.initialize = hppa_translate_init,
|
||||||
.translate_code = hppa_translate_code,
|
.translate_code = hppa_translate_code,
|
||||||
|
|
|
@ -24,7 +24,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
/* The x86 has a strong memory model with some store-after-load re-ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -125,7 +125,10 @@ static bool x86_debug_check_breakpoint(CPUState *cs)
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps x86_tcg_ops = {
|
static const TCGCPUOps x86_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/*
|
||||||
|
* The x86 has a strong memory model with some store-after-load re-ordering
|
||||||
|
*/
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL & ~TCG_MO_ST_LD,
|
||||||
.initialize = tcg_x86_init,
|
.initialize = tcg_x86_init,
|
||||||
.translate_code = x86_translate_code,
|
.translate_code = x86_translate_code,
|
||||||
.synchronize_from_tb = x86_cpu_synchronize_from_tb,
|
.synchronize_from_tb = x86_cpu_synchronize_from_tb,
|
||||||
|
|
|
@ -15,6 +15,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -864,7 +864,7 @@ static void loongarch_cpu_dump_state(CPUState *cs, FILE *f, int flags)
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps loongarch_tcg_ops = {
|
static const TCGCPUOps loongarch_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = loongarch_translate_init,
|
.initialize = loongarch_translate_init,
|
||||||
.translate_code = loongarch_translate_code,
|
.translate_code = loongarch_translate_code,
|
||||||
|
|
|
@ -19,7 +19,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
/* MTTCG not yet supported: require strict ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -589,7 +589,8 @@ static const struct SysemuCPUOps m68k_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps m68k_tcg_ops = {
|
static const TCGCPUOps m68k_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MTTCG not yet supported: require strict ordering */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
|
|
||||||
.initialize = m68k_tcg_init,
|
.initialize = m68k_tcg_init,
|
||||||
.translate_code = m68k_translate_code,
|
.translate_code = m68k_translate_code,
|
||||||
|
|
|
@ -29,7 +29,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
/* MicroBlaze is always in-order. */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -427,7 +427,8 @@ static const struct SysemuCPUOps mb_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps mb_tcg_ops = {
|
static const TCGCPUOps mb_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MicroBlaze is always in-order. */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
|
|
||||||
.initialize = mb_tcg_init,
|
.initialize = mb_tcg_init,
|
||||||
.translate_code = mb_translate_code,
|
.translate_code = mb_translate_code,
|
||||||
|
|
|
@ -22,6 +22,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 2
|
#define TARGET_INSN_START_EXTRA_WORDS 2
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -551,7 +551,7 @@ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TCGCPUOps mips_tcg_ops = {
|
static const TCGCPUOps mips_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = mips_tcg_init,
|
.initialize = mips_tcg_init,
|
||||||
.translate_code = mips_translate_code,
|
.translate_code = mips_translate_code,
|
||||||
|
|
|
@ -14,6 +14,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -243,7 +243,7 @@ static const struct SysemuCPUOps openrisc_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps openrisc_tcg_ops = {
|
static const TCGCPUOps openrisc_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = openrisc_translate_init,
|
.initialize = openrisc_translate_init,
|
||||||
.translate_code = openrisc_translate_code,
|
.translate_code = openrisc_translate_code,
|
||||||
|
|
|
@ -39,6 +39,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO 0
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -7479,7 +7479,7 @@ static const struct SysemuCPUOps ppc_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps ppc_tcg_ops = {
|
static const TCGCPUOps ppc_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
.initialize = ppc_translate_init,
|
.initialize = ppc_translate_init,
|
||||||
.translate_code = ppc_translate_code,
|
.translate_code = ppc_translate_code,
|
||||||
.restore_state_to_opc = ppc_restore_state_to_opc,
|
.restore_state_to_opc = ppc_restore_state_to_opc,
|
||||||
|
|
|
@ -34,6 +34,4 @@
|
||||||
* - M mode HLV/HLVX/HSV 0b111
|
* - M mode HLV/HLVX/HSV 0b111
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define TCG_GUEST_DEFAULT_MO 0
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -140,7 +140,7 @@ static void riscv_restore_state_to_opc(CPUState *cs,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TCGCPUOps riscv_tcg_ops = {
|
static const TCGCPUOps riscv_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = riscv_translate_init,
|
.initialize = riscv_translate_init,
|
||||||
.translate_code = riscv_translate_code,
|
.translate_code = riscv_translate_code,
|
||||||
|
|
|
@ -26,7 +26,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
/* MTTCG not yet supported: require strict ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -204,7 +204,8 @@ static const struct SysemuCPUOps rx_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps rx_tcg_ops = {
|
static const TCGCPUOps rx_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MTTCG not yet supported: require strict ordering */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
|
|
||||||
.initialize = rx_translate_init,
|
.initialize = rx_translate_init,
|
||||||
.translate_code = rx_translate_code,
|
.translate_code = rx_translate_code,
|
||||||
|
|
|
@ -14,10 +14,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 2
|
#define TARGET_INSN_START_EXTRA_WORDS 2
|
||||||
|
|
||||||
/*
|
|
||||||
* The z/Architecture has a strong memory model with some
|
|
||||||
* store-after-load re-ordering.
|
|
||||||
*/
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (TCG_MO_ALL & ~TCG_MO_ST_LD)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -345,7 +345,11 @@ void cpu_get_tb_cpu_state(CPUS390XState *env, vaddr *pc,
|
||||||
}
|
}
|
||||||
|
|
||||||
static const TCGCPUOps s390_tcg_ops = {
|
static const TCGCPUOps s390_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/*
|
||||||
|
* The z/Architecture has a strong memory model with some
|
||||||
|
* store-after-load re-ordering.
|
||||||
|
*/
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL & ~TCG_MO_ST_LD,
|
||||||
|
|
||||||
.initialize = s390x_translate_init,
|
.initialize = s390x_translate_init,
|
||||||
.translate_code = s390x_translate_code,
|
.translate_code = s390x_translate_code,
|
||||||
|
|
|
@ -18,7 +18,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
/* MTTCG not yet supported: require strict ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -262,7 +262,8 @@ static const struct SysemuCPUOps sh4_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps superh_tcg_ops = {
|
static const TCGCPUOps superh_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MTTCG not yet supported: require strict ordering */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
|
|
||||||
.initialize = sh4_translate_init,
|
.initialize = sh4_translate_init,
|
||||||
.translate_code = sh4_translate_code,
|
.translate_code = sh4_translate_code,
|
||||||
|
|
|
@ -23,27 +23,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 1
|
#define TARGET_INSN_START_EXTRA_WORDS 1
|
||||||
|
|
||||||
/*
|
|
||||||
* From Oracle SPARC Architecture 2015:
|
|
||||||
*
|
|
||||||
* Compatibility notes: The PSO memory model described in SPARC V8 and
|
|
||||||
* SPARC V9 compatibility architecture specifications was never implemented
|
|
||||||
* in a SPARC V9 implementation and is not included in the Oracle SPARC
|
|
||||||
* Architecture specification.
|
|
||||||
*
|
|
||||||
* The RMO memory model described in the SPARC V9 specification was
|
|
||||||
* implemented in some non-Sun SPARC V9 implementations, but is not
|
|
||||||
* directly supported in Oracle SPARC Architecture 2015 implementations.
|
|
||||||
*
|
|
||||||
* Therefore always use TSO in QEMU.
|
|
||||||
*
|
|
||||||
* D.5 Specification of Partial Store Order (PSO)
|
|
||||||
* ... [loads] are followed by an implied MEMBAR #LoadLoad | #LoadStore.
|
|
||||||
*
|
|
||||||
* D.6 Specification of Total Store Order (TSO)
|
|
||||||
* ... PSO with the additional requirement that all [stores] are followed
|
|
||||||
* by an implied MEMBAR #StoreStore.
|
|
||||||
*/
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1001,7 +1001,28 @@ static const struct SysemuCPUOps sparc_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps sparc_tcg_ops = {
|
static const TCGCPUOps sparc_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/*
|
||||||
|
* From Oracle SPARC Architecture 2015:
|
||||||
|
*
|
||||||
|
* Compatibility notes: The PSO memory model described in SPARC V8 and
|
||||||
|
* SPARC V9 compatibility architecture specifications was never
|
||||||
|
* implemented in a SPARC V9 implementation and is not included in the
|
||||||
|
* Oracle SPARC Architecture specification.
|
||||||
|
*
|
||||||
|
* The RMO memory model described in the SPARC V9 specification was
|
||||||
|
* implemented in some non-Sun SPARC V9 implementations, but is not
|
||||||
|
* directly supported in Oracle SPARC Architecture 2015 implementations.
|
||||||
|
*
|
||||||
|
* Therefore always use TSO in QEMU.
|
||||||
|
*
|
||||||
|
* D.5 Specification of Partial Store Order (PSO)
|
||||||
|
* ... [loads] are followed by an implied MEMBAR #LoadLoad | #LoadStore.
|
||||||
|
*
|
||||||
|
* D.6 Specification of Total Store Order (TSO)
|
||||||
|
* ... PSO with the additional requirement that all [stores] are followed
|
||||||
|
* by an implied MEMBAR #StoreStore.
|
||||||
|
*/
|
||||||
|
.guest_default_memory_order = TCG_MO_LD_LD | TCG_MO_LD_ST | TCG_MO_ST_ST,
|
||||||
|
|
||||||
.initialize = sparc_tcg_init,
|
.initialize = sparc_tcg_init,
|
||||||
.translate_code = sparc_translate_code,
|
.translate_code = sparc_translate_code,
|
||||||
|
|
|
@ -14,7 +14,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
/* MTTCG not yet supported: require strict ordering */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO TCG_MO_ALL
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -172,7 +172,8 @@ static const struct SysemuCPUOps tricore_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps tricore_tcg_ops = {
|
static const TCGCPUOps tricore_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* MTTCG not yet supported: require strict ordering */
|
||||||
|
.guest_default_memory_order = TCG_MO_ALL,
|
||||||
.initialize = tricore_tcg_init,
|
.initialize = tricore_tcg_init,
|
||||||
.translate_code = tricore_translate_code,
|
.translate_code = tricore_translate_code,
|
||||||
.synchronize_from_tb = tricore_cpu_synchronize_from_tb,
|
.synchronize_from_tb = tricore_cpu_synchronize_from_tb,
|
||||||
|
|
|
@ -18,7 +18,4 @@
|
||||||
|
|
||||||
#define TARGET_INSN_START_EXTRA_WORDS 0
|
#define TARGET_INSN_START_EXTRA_WORDS 0
|
||||||
|
|
||||||
/* Xtensa processors have a weak memory model */
|
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -232,7 +232,8 @@ static const struct SysemuCPUOps xtensa_sysemu_ops = {
|
||||||
#include "accel/tcg/cpu-ops.h"
|
#include "accel/tcg/cpu-ops.h"
|
||||||
|
|
||||||
static const TCGCPUOps xtensa_tcg_ops = {
|
static const TCGCPUOps xtensa_tcg_ops = {
|
||||||
.guest_default_memory_order = TCG_GUEST_DEFAULT_MO,
|
/* Xtensa processors have a weak memory model */
|
||||||
|
.guest_default_memory_order = 0,
|
||||||
|
|
||||||
.initialize = xtensa_translate_init,
|
.initialize = xtensa_translate_init,
|
||||||
.translate_code = xtensa_translate_code,
|
.translate_code = xtensa_translate_code,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue