22 |
#define TRUE 1 |
#define TRUE 1 |
23 |
#endif |
#endif |
24 |
|
|
25 |
|
/* Host CPU Types */ |
26 |
|
#define CPU_x86 0 |
27 |
|
#define CPU_amd64 1 |
28 |
|
#define CPU_nojit 2 |
29 |
|
|
30 |
|
/* Number of host registers available for JIT */ |
31 |
|
#if JIT_CPU == CPU_x86 |
32 |
|
#define JIT_HOST_NREG 8 |
33 |
|
#elif JIT_CPU == CPU_amd64 |
34 |
|
#define JIT_HOST_NREG 16 |
35 |
|
#else |
36 |
|
#define JIT_HOST_NREG 0 |
37 |
|
#endif |
38 |
|
|
39 |
/* Endianness */ |
/* Endianness */ |
40 |
#define ARCH_BIG_ENDIAN 0x4321 |
#define ARCH_BIG_ENDIAN 0x4321 |
41 |
#define ARCH_LITTLE_ENDIAN 0x1234 |
#define ARCH_LITTLE_ENDIAN 0x1234 |
113 |
typedef m_uint64_t m_tmcnt_t; |
typedef m_uint64_t m_tmcnt_t; |
114 |
|
|
115 |
/* Forward declarations */ |
/* Forward declarations */ |
116 |
|
typedef struct cpu_gen cpu_gen_t; |
117 |
typedef struct vm_instance vm_instance_t; |
typedef struct vm_instance vm_instance_t; |
118 |
typedef struct mips64_jit_tcb mips64_jit_tcb_t; |
typedef struct mips64_jit_tcb mips64_jit_tcb_t; |
119 |
typedef struct ppc32_jit_tcb ppc32_jit_tcb_t; |
typedef struct ppc32_jit_tcb ppc32_jit_tcb_t; |
120 |
|
typedef struct jit_op jit_op_t; |
121 |
|
|
122 |
/* Translated block function pointer */ |
/* Translated block function pointer */ |
123 |
typedef void (*insn_tblock_fptr)(void); |
typedef void (*insn_tblock_fptr)(void); |
195 |
m_uint32_t flags; /* Flags */ |
m_uint32_t flags; /* Flags */ |
196 |
}__attribute__ ((aligned(16))); |
}__attribute__ ((aligned(16))); |
197 |
|
|
198 |
|
/* Host register allocation */ |
199 |
|
#define HREG_FLAG_ALLOC_LOCKED 1 |
200 |
|
#define HREG_FLAG_ALLOC_FORCED 2 |
201 |
|
|
202 |
|
struct hreg_map { |
203 |
|
int hreg,vreg; |
204 |
|
int flags; |
205 |
|
struct hreg_map *prev,*next; |
206 |
|
}; |
207 |
|
|
208 |
/* Global logfile */ |
/* Global logfile */ |
209 |
extern FILE *log_file; |
extern FILE *log_file; |
210 |
|
|