mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-05-31 05:27:05 +00:00
cpu: Move ENV_OFFSET to exec/gen-icount.h
Now that we have ArchCPU, we can define this generically, in the one place that needs it. Backports commit 677c4d69ac21961e76a386f9bfc892a44923acc0 from qemu
This commit is contained in:
parent
a11dd94ce7
commit
ac176ccb38
|
@ -5,6 +5,8 @@
|
|||
|
||||
/* Helpers for instruction counting code generation. */
|
||||
|
||||
#define ENV_OFFSET offsetof(ArchCPU, env)
|
||||
|
||||
//static TCGOp *icount_start_insn;
|
||||
|
||||
static inline void gen_tb_start(TCGContext *tcg_ctx, TranslationBlock *tb)
|
||||
|
|
|
@ -887,8 +887,6 @@ struct ARMCPU {
|
|||
uint32_t sve_max_vq;
|
||||
};
|
||||
|
||||
#define ENV_OFFSET offsetof(ARMCPU, env)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern const struct VMStateDescription vmstate_arm_cpu;
|
||||
#endif
|
||||
|
|
|
@ -1398,8 +1398,6 @@ struct X86CPU {
|
|||
bool cpu_globals_initialized;
|
||||
};
|
||||
|
||||
#define ENV_OFFSET offsetof(X86CPU, env)
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
extern struct VMStateDescription vmstate_x86_cpu;
|
||||
#endif
|
||||
|
|
|
@ -167,8 +167,6 @@ struct M68kCPU {
|
|||
CPUM68KState env;
|
||||
};
|
||||
|
||||
#define ENV_OFFSET offsetof(M68kCPU, env)
|
||||
|
||||
void m68k_cpu_do_interrupt(CPUState *cpu);
|
||||
bool m68k_cpu_exec_interrupt(CPUState *cpu, int int_req);
|
||||
void m68k_cpu_dump_state(CPUState *cpu, FILE *f, fprintf_function cpu_fprintf,
|
||||
|
|
|
@ -1069,8 +1069,6 @@ struct MIPSCPU {
|
|||
CPUMIPSState env;
|
||||
};
|
||||
|
||||
#define ENV_OFFSET offsetof(MIPSCPU, env)
|
||||
|
||||
void mips_cpu_list (FILE *f, fprintf_function cpu_fprintf);
|
||||
|
||||
#define cpu_signal_handler cpu_mips_signal_handler
|
||||
|
|
|
@ -236,8 +236,6 @@ extern const char * const riscv_fpr_regnames[];
|
|||
extern const char * const riscv_excp_names[];
|
||||
extern const char * const riscv_intr_names[];
|
||||
|
||||
#define ENV_OFFSET offsetof(RISCVCPU, env)
|
||||
|
||||
void riscv_cpu_do_interrupt(CPUState *cpu);
|
||||
int riscv_cpu_gdb_read_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
int riscv_cpu_gdb_write_register(CPUState *cpu, uint8_t *buf, int reg);
|
||||
|
|
|
@ -528,8 +528,6 @@ struct SPARCCPU {
|
|||
CPUSPARCState env;
|
||||
};
|
||||
|
||||
#define ENV_OFFSET offsetof(SPARCCPU, env)
|
||||
|
||||
void sparc_cpu_do_interrupt(CPUState *cpu);
|
||||
void sparc_cpu_dump_state(CPUState *cpu, FILE *f,
|
||||
fprintf_function cpu_fprintf, int flags);
|
||||
|
|
|
@ -30,6 +30,9 @@
|
|||
#include "tcg-op.h"
|
||||
#include "tcg-mo.h"
|
||||
|
||||
/* Unicorn: Necessary for check_exit_request */
|
||||
#include "exec/gen-icount.h"
|
||||
|
||||
/* Reduce the number of ifdefs below. This assumes that all uses of
|
||||
TCGV_HIGH and TCGV_LOW are properly protected by a conditional that
|
||||
the compiler can eliminate. */
|
||||
|
|
Loading…
Reference in a new issue