diff options
author | Claudio Fontana <cfontana@suse.de> | 2021-02-04 17:39:11 +0100 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2021-02-05 10:24:14 -1000 |
commit | 7df5e3d6ad569f004d6aa943e8b60ab25875b577 (patch) | |
tree | 7ddda87219c97c13327e793503099ced166922a3 /include | |
parent | 6a3d2e7c0654c3fb2d3368d05363d0635e8bb8ff (diff) |
accel/tcg: split TCG-only code from cpu_exec_realizefn
move away TCG-only code, make it compile only on TCG.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
[claudio: moved the prototypes from hw/core/cpu.h to exec/cpu-all.h]
Signed-off-by: Claudio Fontana <cfontana@suse.de>
Message-Id: <20210204163931.7358-4-cfontana@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/exec/cpu-all.h | 11 | ||||
-rw-r--r-- | include/hw/core/cpu.h | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h index 4b5408c341..cfb1d79331 100644 --- a/include/exec/cpu-all.h +++ b/include/exec/cpu-all.h @@ -410,19 +410,26 @@ static inline bool tlb_hit(target_ulong tlb_addr, target_ulong addr) } #ifdef CONFIG_TCG +/* accel/tcg/cpu-exec.c */ void dump_drift_info(void); +/* accel/tcg/translate-all.c */ void dump_exec_info(void); void dump_opcount_info(void); #endif /* CONFIG_TCG */ #endif /* !CONFIG_USER_ONLY */ +#ifdef CONFIG_TCG +/* accel/tcg/cpu-exec.c */ +int cpu_exec(CPUState *cpu); +void tcg_exec_realizefn(CPUState *cpu, Error **errp); +void tcg_exec_unrealizefn(CPUState *cpu); +#endif /* CONFIG_TCG */ + /* Returns: 0 on success, -1 on error */ int cpu_memory_rw_debug(CPUState *cpu, target_ulong addr, void *ptr, target_ulong len, bool is_write); -int cpu_exec(CPUState *cpu); - /** * cpu_set_cpustate_pointers(cpu) * @cpu: The cpu object diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index 26b89fd7a4..d0b17dcc4c 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1126,6 +1126,8 @@ AddressSpace *cpu_get_address_space(CPUState *cpu, int asidx); void QEMU_NORETURN cpu_abort(CPUState *cpu, const char *fmt, ...) GCC_FMT_ATTR(2, 3); + +/* $(top_srcdir)/cpu.c */ void cpu_exec_initfn(CPUState *cpu); void cpu_exec_realizefn(CPUState *cpu, Error **errp); void cpu_exec_unrealizefn(CPUState *cpu); |