mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-24 19:20:58 +00:00
cpu: Define CPUArchState with typedef
For all targets, do this just before including exec/cpu-all.h. Backports commit 4f7c64b3819d559417615ed2b1d028ebc1a49580 from qemu
This commit is contained in:
parent
5e5197b136
commit
e3f1f25996
|
@ -31,8 +31,6 @@
|
||||||
/* ARM processors have a weak memory model */
|
/* ARM processors have a weak memory model */
|
||||||
#define TCG_GUEST_DEFAULT_MO (0)
|
#define TCG_GUEST_DEFAULT_MO (0)
|
||||||
|
|
||||||
#define CPUArchState struct CPUARMState
|
|
||||||
|
|
||||||
#define EXCP_UDEF 1 /* undefined instruction */
|
#define EXCP_UDEF 1 /* undefined instruction */
|
||||||
#define EXCP_SWI 2 /* software interrupt */
|
#define EXCP_SWI 2 /* software interrupt */
|
||||||
#define EXCP_PREFETCH_ABORT 3
|
#define EXCP_PREFETCH_ABORT 3
|
||||||
|
@ -3081,6 +3079,8 @@ static inline bool arm_cpu_data_is_big_endian(CPUARMState *env)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef CPUARMState CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
|
|
||||||
/* Bit usage in the TB flags field: bit 31 indicates whether we are
|
/* Bit usage in the TB flags field: bit 31 indicates whether we are
|
||||||
|
|
|
@ -42,8 +42,6 @@
|
||||||
#define ELF_MACHINE_UNAME "i686"
|
#define ELF_MACHINE_UNAME "i686"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CPUArchState struct CPUX86State
|
|
||||||
|
|
||||||
#include "exec/cpu-defs.h"
|
#include "exec/cpu-defs.h"
|
||||||
|
|
||||||
#define R_EAX 0
|
#define R_EAX 0
|
||||||
|
@ -1672,6 +1670,8 @@ static inline target_long lshift(target_long x, int n)
|
||||||
/* translate.c */
|
/* translate.c */
|
||||||
void tcg_x86_init(struct uc_struct *);
|
void tcg_x86_init(struct uc_struct *);
|
||||||
|
|
||||||
|
typedef CPUX86State CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
#include "svm.h"
|
#include "svm.h"
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
#include "cpu-qom.h"
|
#include "cpu-qom.h"
|
||||||
#include "exec/cpu-defs.h"
|
#include "exec/cpu-defs.h"
|
||||||
|
|
||||||
#define CPUArchState struct CPUM68KState
|
|
||||||
|
|
||||||
#define OS_BYTE 0
|
#define OS_BYTE 0
|
||||||
#define OS_WORD 1
|
#define OS_WORD 1
|
||||||
#define OS_LONG 2
|
#define OS_LONG 2
|
||||||
|
@ -533,6 +531,8 @@ void m68k_cpu_transaction_failed(CPUState *cs, hwaddr physaddr, vaddr addr,
|
||||||
int mmu_idx, MemTxAttrs attrs,
|
int mmu_idx, MemTxAttrs attrs,
|
||||||
MemTxResult response, uintptr_t retaddr);
|
MemTxResult response, uintptr_t retaddr);
|
||||||
|
|
||||||
|
typedef CPUM68KState CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
|
|
||||||
/* TB flags */
|
/* TB flags */
|
||||||
|
|
|
@ -3,8 +3,6 @@
|
||||||
|
|
||||||
#define ALIGNED_ONLY
|
#define ALIGNED_ONLY
|
||||||
|
|
||||||
#define CPUArchState struct CPUMIPSState
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "qemu-common.h"
|
#include "qemu-common.h"
|
||||||
#include "cpu-qom.h"
|
#include "cpu-qom.h"
|
||||||
|
@ -12,8 +10,6 @@
|
||||||
#include "fpu/softfloat.h"
|
#include "fpu/softfloat.h"
|
||||||
#include "mips-defs.h"
|
#include "mips-defs.h"
|
||||||
|
|
||||||
struct CPUMIPSState;
|
|
||||||
|
|
||||||
typedef struct CPUMIPSTLBContext CPUMIPSTLBContext;
|
typedef struct CPUMIPSTLBContext CPUMIPSTLBContext;
|
||||||
|
|
||||||
/* MSA Context */
|
/* MSA Context */
|
||||||
|
@ -1116,6 +1112,8 @@ static inline int cpu_mmu_index(CPUMIPSState *env, bool ifetch)
|
||||||
return hflags_mmu_index(env->hflags);
|
return hflags_mmu_index(env->hflags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef CPUMIPSState CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -92,8 +92,6 @@ enum {
|
||||||
|
|
||||||
#define MAX_RISCV_PMPS (16)
|
#define MAX_RISCV_PMPS (16)
|
||||||
|
|
||||||
typedef struct CPURISCVState CPURISCVState;
|
|
||||||
|
|
||||||
#include "pmp.h"
|
#include "pmp.h"
|
||||||
|
|
||||||
struct CPURISCVState {
|
struct CPURISCVState {
|
||||||
|
@ -331,6 +329,8 @@ typedef struct {
|
||||||
void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops);
|
void riscv_get_csr_ops(int csrno, riscv_csr_operations *ops);
|
||||||
void riscv_set_csr_ops(int csrno, riscv_csr_operations *ops);
|
void riscv_set_csr_ops(int csrno, riscv_csr_operations *ops);
|
||||||
|
|
||||||
|
typedef CPURISCVState CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
|
|
||||||
// Unicorn-specific
|
// Unicorn-specific
|
||||||
|
|
|
@ -14,8 +14,6 @@
|
||||||
#define TARGET_DPREGS 32
|
#define TARGET_DPREGS 32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define CPUArchState struct CPUSPARCState
|
|
||||||
|
|
||||||
/*#define EXCP_INTERRUPT 0x100*/
|
/*#define EXCP_INTERRUPT 0x100*/
|
||||||
|
|
||||||
/* trap definitions */
|
/* trap definitions */
|
||||||
|
@ -720,6 +718,8 @@ static inline int cpu_pil_allowed(CPUSPARCState *env1, int pil)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef CPUSPARCState CPUArchState;
|
||||||
|
|
||||||
#include "exec/cpu-all.h"
|
#include "exec/cpu-all.h"
|
||||||
|
|
||||||
#ifdef TARGET_SPARC64
|
#ifdef TARGET_SPARC64
|
||||||
|
|
Loading…
Reference in a new issue