144
144
uint8_t *gen_code_buf;
145
145
int gen_code_size;
148
if (code_copy_enabled &&
149
cpu_gen_code_copy(env, tb, max_code_size, &gen_code_size) == 0) {
150
/* nothing more to do */
154
if (gen_intermediate_code(env, tb) < 0)
157
/* generate machine code */
158
tb->tb_next_offset[0] = 0xffff;
159
tb->tb_next_offset[1] = 0xffff;
160
gen_code_buf = tb->tc_ptr;
161
#ifdef USE_DIRECT_JUMP
162
/* the following two entries are optional (only used for string ops) */
163
tb->tb_jmp_offset[2] = 0xffff;
164
tb->tb_jmp_offset[3] = 0xffff;
166
dyngen_labels(gen_labels, nb_gen_labels, gen_code_buf, gen_opc_buf);
168
gen_code_size = dyngen_code(gen_code_buf, tb->tb_next_offset,
169
#ifdef USE_DIRECT_JUMP
147
if (gen_intermediate_code(env, tb) < 0)
150
/* generate machine code */
151
tb->tb_next_offset[0] = 0xffff;
152
tb->tb_next_offset[1] = 0xffff;
153
gen_code_buf = tb->tc_ptr;
154
#ifdef USE_DIRECT_JUMP
155
/* the following two entries are optional (only used for string ops) */
156
tb->tb_jmp_offset[2] = 0xffff;
157
tb->tb_jmp_offset[3] = 0xffff;
159
dyngen_labels(gen_labels, nb_gen_labels, gen_code_buf, gen_opc_buf);
161
gen_code_size = dyngen_code(gen_code_buf, tb->tb_next_offset,
162
#ifdef USE_DIRECT_JUMP
174
gen_opc_buf, gen_opparam_buf, gen_labels);
167
gen_opc_buf, gen_opparam_buf, gen_labels);
176
168
*gen_code_size_ptr = gen_code_size;
177
169
#ifdef DEBUG_DISAS
178
170
if (loglevel & CPU_LOG_TB_OUT_ASM) {
195
187
unsigned long tc_ptr;
196
188
uint16_t *opc_ptr;
199
if (tb->cflags & CF_CODE_COPY) {
200
return cpu_restore_state_copy(tb, env, searched_pc, puc);
203
190
if (gen_intermediate_code_pc(env, tb) < 0)