tcg: Split out tcg/oversized-guest.h
Move a use of TARGET_LONG_BITS out of tcg/tcg.h. Include the new file only where required. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
d3ae5f5d4f
commit
70f168f88c
|
@ -40,6 +40,7 @@
|
||||||
#include "qemu/plugin-memory.h"
|
#include "qemu/plugin-memory.h"
|
||||||
#endif
|
#endif
|
||||||
#include "tcg/tcg-ldst.h"
|
#include "tcg/tcg-ldst.h"
|
||||||
|
#include "tcg/oversized-guest.h"
|
||||||
#include "exec/helper-proto.h"
|
#include "exec/helper-proto.h"
|
||||||
|
|
||||||
/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
|
/* DEBUG defines, enable DEBUG_TLB_LOG to log to the CPU_LOG_MMU target */
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
#include "exec/replay-core.h"
|
#include "exec/replay-core.h"
|
||||||
#include "sysemu/cpu-timers.h"
|
#include "sysemu/cpu-timers.h"
|
||||||
#include "tcg/tcg.h"
|
#include "tcg/tcg.h"
|
||||||
|
#include "tcg/oversized-guest.h"
|
||||||
#include "qapi/error.h"
|
#include "qapi/error.h"
|
||||||
#include "qemu/error-report.h"
|
#include "qemu/error-report.h"
|
||||||
#include "qemu/accel.h"
|
#include "qemu/accel.h"
|
||||||
|
|
|
@ -326,8 +326,7 @@ static inline void clear_helper_retaddr(void)
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
/* Needed for TCG_OVERSIZED_GUEST */
|
#include "tcg/oversized-guest.h"
|
||||||
#include "tcg/tcg.h"
|
|
||||||
|
|
||||||
static inline target_ulong tlb_read_idx(const CPUTLBEntry *entry,
|
static inline target_ulong tlb_read_idx(const CPUTLBEntry *entry,
|
||||||
MMUAccessType access_type)
|
MMUAccessType access_type)
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
/* SPDX-License-Identifier: MIT */
|
||||||
|
/*
|
||||||
|
* Define TCG_OVERSIZED_GUEST
|
||||||
|
* Copyright (c) 2008 Fabrice Bellard
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef EXEC_TCG_OVERSIZED_GUEST_H
|
||||||
|
#define EXEC_TCG_OVERSIZED_GUEST_H
|
||||||
|
|
||||||
|
#include "tcg-target-reg-bits.h"
|
||||||
|
#include "cpu-param.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Oversized TCG guests make things like MTTCG hard
|
||||||
|
* as we can't use atomics for cputlb updates.
|
||||||
|
*/
|
||||||
|
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
|
||||||
|
#define TCG_OVERSIZED_GUEST 1
|
||||||
|
#else
|
||||||
|
#define TCG_OVERSIZED_GUEST 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
|
@ -59,15 +59,6 @@ typedef uint64_t tcg_target_ulong;
|
||||||
#error unsupported
|
#error unsupported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Oversized TCG guests make things like MTTCG hard
|
|
||||||
* as we can't use atomics for cputlb updates.
|
|
||||||
*/
|
|
||||||
#if TARGET_LONG_BITS > TCG_TARGET_REG_BITS
|
|
||||||
#define TCG_OVERSIZED_GUEST 1
|
|
||||||
#else
|
|
||||||
#define TCG_OVERSIZED_GUEST 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if TCG_TARGET_NB_REGS <= 32
|
#if TCG_TARGET_NB_REGS <= 32
|
||||||
typedef uint32_t TCGRegSet;
|
typedef uint32_t TCGRegSet;
|
||||||
#elif TCG_TARGET_NB_REGS <= 64
|
#elif TCG_TARGET_NB_REGS <= 64
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include "cpu.h"
|
#include "cpu.h"
|
||||||
#include "internals.h"
|
#include "internals.h"
|
||||||
#include "idau.h"
|
#include "idau.h"
|
||||||
|
#include "tcg/oversized-guest.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct S1Translate {
|
typedef struct S1Translate {
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
#include "sysemu/cpu-timers.h"
|
#include "sysemu/cpu-timers.h"
|
||||||
#include "cpu_bits.h"
|
#include "cpu_bits.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "tcg/oversized-guest.h"
|
||||||
|
|
||||||
int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch)
|
int riscv_cpu_mmu_index(CPURISCVState *env, bool ifetch)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue