mirror of https://github.com/xemu-project/xemu.git
tcg: Add guest_mo to TCGContext
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>
This commit is contained in:
parent
747bd69d0f
commit
28ea568a03
|
@ -364,6 +364,11 @@ TranslationBlock *tb_gen_code(CPUState *cpu,
|
||||||
(int)offsetof(ArchCPU, neg.tlb.f) - (int)offsetof(ArchCPU, env);
|
(int)offsetof(ArchCPU, neg.tlb.f) - (int)offsetof(ArchCPU, env);
|
||||||
#endif
|
#endif
|
||||||
tcg_ctx->insn_start_words = TARGET_INSN_START_WORDS;
|
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:
|
tb_overflow:
|
||||||
|
|
||||||
|
|
|
@ -521,6 +521,7 @@ struct TCGContext {
|
||||||
uint8_t tlb_dyn_max_bits;
|
uint8_t tlb_dyn_max_bits;
|
||||||
#endif
|
#endif
|
||||||
uint8_t insn_start_words;
|
uint8_t insn_start_words;
|
||||||
|
TCGBar guest_mo;
|
||||||
|
|
||||||
TCGRegSet reserved_regs;
|
TCGRegSet reserved_regs;
|
||||||
intptr_t current_frame_offset;
|
intptr_t current_frame_offset;
|
||||||
|
|
|
@ -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)
|
static void tcg_gen_req_mo(TCGBar type)
|
||||||
{
|
{
|
||||||
#ifdef TCG_GUEST_DEFAULT_MO
|
type &= tcg_ctx->guest_mo;
|
||||||
type &= TCG_GUEST_DEFAULT_MO;
|
|
||||||
#endif
|
|
||||||
type &= ~TCG_TARGET_DEFAULT_MO;
|
type &= ~TCG_TARGET_DEFAULT_MO;
|
||||||
if (type) {
|
if (type) {
|
||||||
tcg_gen_mb(type | TCG_BAR_SC);
|
tcg_gen_mb(type | TCG_BAR_SC);
|
||||||
|
|
Loading…
Reference in New Issue