268 |
tb->tc_ptr = tc_ptr; |
tb->tc_ptr = tc_ptr; |
269 |
tb->cs_base = (unsigned long)cs_base; |
tb->cs_base = (unsigned long)cs_base; |
270 |
tb->flags = flags; |
tb->flags = flags; |
271 |
ret = cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size); |
cpu_gen_code(env, tb, CODE_GEN_MAX_SIZE, &code_gen_size); |
|
#if defined(TARGET_I386) |
|
|
/* XXX: suppress that, this is incorrect */ |
|
|
/* if invalid instruction, signal it */ |
|
|
if (ret != 0) { |
|
|
/* NOTE: the tb is allocated but not linked, so we |
|
|
can leave it */ |
|
|
spin_unlock(&tb_lock); |
|
|
raise_exception(EXCP06_ILLOP); |
|
|
} |
|
|
#endif |
|
272 |
*ptb = tb; |
*ptb = tb; |
273 |
tb->hash_next = NULL; |
tb->hash_next = NULL; |
274 |
tb_link(tb); |
tb_link(tb); |
285 |
#ifdef __sparc__ |
#ifdef __sparc__ |
286 |
T0 = tmp_T0; |
T0 = tmp_T0; |
287 |
#endif |
#endif |
288 |
/* see if we can patch the calling TB. XXX: remove TF test */ |
/* see if we can patch the calling TB. */ |
289 |
if (T0 != 0 |
if (T0 != 0) { |
|
#if defined(TARGET_I386) |
|
|
&& !(env->eflags & TF_MASK) |
|
|
#endif |
|
|
) { |
|
290 |
spin_lock(&tb_lock); |
spin_lock(&tb_lock); |
291 |
tb_add_jump((TranslationBlock *)(T0 & ~3), T0 & 3, tb); |
tb_add_jump((TranslationBlock *)(T0 & ~3), T0 & 3, tb); |
292 |
spin_unlock(&tb_lock); |
spin_unlock(&tb_lock); |