107 |
'*gen_code_size_ptr' contains the size of the generated code (host |
'*gen_code_size_ptr' contains the size of the generated code (host |
108 |
code). |
code). |
109 |
*/ |
*/ |
110 |
int cpu_gen_code(TranslationBlock *tb, |
int cpu_gen_code(CPUState *env, TranslationBlock *tb, |
111 |
int max_code_size, int *gen_code_size_ptr) |
int max_code_size, int *gen_code_size_ptr) |
112 |
{ |
{ |
113 |
uint8_t *gen_code_buf; |
uint8_t *gen_code_buf; |
114 |
int gen_code_size; |
int gen_code_size; |
115 |
|
|
116 |
if (gen_intermediate_code(tb) < 0) |
if (gen_intermediate_code(env, tb) < 0) |
117 |
return -1; |
return -1; |
118 |
|
|
119 |
/* generate machine code */ |
/* generate machine code */ |
154 |
unsigned long tc_ptr; |
unsigned long tc_ptr; |
155 |
uint16_t *opc_ptr; |
uint16_t *opc_ptr; |
156 |
|
|
157 |
if (gen_intermediate_code_pc(tb) < 0) |
if (gen_intermediate_code_pc(env, tb) < 0) |
158 |
return -1; |
return -1; |
159 |
|
|
160 |
/* find opc index corresponding to search_pc */ |
/* find opc index corresponding to search_pc */ |