23 |
#define GEN_FLAG_SS32_SHIFT 2 |
#define GEN_FLAG_SS32_SHIFT 2 |
24 |
#define GEN_FLAG_VM_SHIFT 3 |
#define GEN_FLAG_VM_SHIFT 3 |
25 |
#define GEN_FLAG_ST_SHIFT 4 |
#define GEN_FLAG_ST_SHIFT 4 |
26 |
#define GEN_FLAG_CPL_SHIFT 7 |
#define GEN_FLAG_TF_SHIFT 8 /* same position as eflags */ |
27 |
#define GEN_FLAG_IOPL_SHIFT 9 |
#define GEN_FLAG_CPL_SHIFT 9 |
28 |
#define GEN_FLAG_TF_SHIFT 11 |
#define GEN_FLAG_IOPL_SHIFT 12 /* same position as eflags */ |
29 |
|
|
30 |
struct TranslationBlock; |
struct TranslationBlock; |
31 |
int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size, |
int cpu_x86_gen_code(uint8_t *gen_code_buf, int max_code_size, |
150 |
static inline void tb_add_jump(TranslationBlock *tb, int n, |
static inline void tb_add_jump(TranslationBlock *tb, int n, |
151 |
TranslationBlock *tb_next) |
TranslationBlock *tb_next) |
152 |
{ |
{ |
153 |
/* patch the native jump address */ |
/* NOTE: this test is only needed for thread safety */ |
154 |
tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr); |
if (!tb->jmp_next[n]) { |
155 |
|
/* patch the native jump address */ |
156 |
/* add in TB jmp circular list */ |
tb_set_jmp_target(tb, n, (unsigned long)tb_next->tc_ptr); |
157 |
tb->jmp_next[n] = tb_next->jmp_first; |
|
158 |
tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n)); |
/* add in TB jmp circular list */ |
159 |
|
tb->jmp_next[n] = tb_next->jmp_first; |
160 |
|
tb_next->jmp_first = (TranslationBlock *)((long)(tb) | (n)); |
161 |
|
} |
162 |
} |
} |
163 |
|
|
164 |
#ifndef offsetof |
#ifndef offsetof |