mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-24 22:35:16 +00:00
tcg: add CONFIG_TCG guards in headers
Add CONFIG_TCG around TLB-related functions and structure declarations. Some of these functions are defined in ./accel/tcg/cputlb.c, which will not be linked in if TCG is disabled, and have no stubs; therefore, their callers will also be compiled out for --disable-tcg. Backports commit b11ec7f2e44b285a3967d629b55d1a6970b06787 from qemu
This commit is contained in:
parent
0f4ebf07d8
commit
1135db176f
|
@ -27,7 +27,9 @@
|
||||||
#include "unicorn/platform.h"
|
#include "unicorn/platform.h"
|
||||||
#include "qemu/osdep.h"
|
#include "qemu/osdep.h"
|
||||||
#include "qemu/queue.h"
|
#include "qemu/queue.h"
|
||||||
|
#ifdef CONFIG_TCG
|
||||||
#include "tcg-target.h"
|
#include "tcg-target.h"
|
||||||
|
#endif
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
#include "exec/hwaddr.h"
|
#include "exec/hwaddr.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,7 +58,7 @@ typedef uint64_t target_ulong;
|
||||||
#error TARGET_LONG_SIZE undefined
|
#error TARGET_LONG_SIZE undefined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CONFIG_USER_ONLY)
|
#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
|
||||||
/* use a fully associative victim tlb of 8 entries */
|
/* use a fully associative victim tlb of 8 entries */
|
||||||
#define CPU_VTLB_SIZE 8
|
#define CPU_VTLB_SIZE 8
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,9 @@ void QEMU_NORETURN cpu_loop_exit_atomic(CPUState *cpu, uintptr_t pc);
|
||||||
* Note that with KVM only one address space is supported.
|
* Note that with KVM only one address space is supported.
|
||||||
*/
|
*/
|
||||||
void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
|
void cpu_address_space_init(CPUState *cpu, AddressSpace *as, int asidx);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG)
|
||||||
/* cputlb.c */
|
/* cputlb.c */
|
||||||
/**
|
/**
|
||||||
* tlb_flush_page:
|
* tlb_flush_page:
|
||||||
|
|
Loading…
Reference in a new issue