Generate check_exit_request for the first tb
Consider this case: t:inc ecx, inc edx, jmp t It would generate exactly one block and TB chain will generate an inline jump. If we don't check exit at the entry of the block, we will never be terminated. This test case is recorded in the commit message since it's a bit painful to write multithread related code that builds on all platforms.
This commit is contained in:
parent
b7bc13650c
commit
12fa73f2b6
|
@ -36,13 +36,6 @@ static inline void gen_tb_start(TCGContext *tcg_ctx, TranslationBlock *tb)
|
|||
|
||||
tcg_ctx->exitreq_label = gen_new_label(tcg_ctx);
|
||||
|
||||
// first TB ever does not need to check exit request
|
||||
if (tcg_ctx->uc->first_tb) {
|
||||
// next TB is not the first anymore
|
||||
tcg_ctx->uc->first_tb = false;
|
||||
return;
|
||||
}
|
||||
|
||||
count = tcg_temp_new_i32(tcg_ctx);
|
||||
|
||||
tcg_gen_ld_i32(tcg_ctx, count, tcg_ctx->cpu_env,
|
||||
|
|
Loading…
Reference in New Issue