tcg: Move emit of INDEX_op_end into gen_tb_end

Backports commit 0a7df5da986bd7ee0789f2d7b8611f2e8eee5046 from qemu
This commit is contained in:
Richard Henderson 2018-02-09 08:50:47 -05:00 committed by Lioncash
parent 4d46959c3b
commit 78378289e3
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
7 changed files with 5 additions and 6 deletions

View file

@ -51,6 +51,8 @@ static inline void gen_tb_end(TCGContext *tcg_ctx, TranslationBlock *tb, int num
tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_ICOUNT_EXPIRED);
}
#endif
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
}
#if 0

View file

@ -11306,7 +11306,6 @@ tb_end:
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
if (search_pc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;

View file

@ -11626,7 +11626,6 @@ tb_end:
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
if (search_pc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;

View file

@ -8770,7 +8770,7 @@ static inline void gen_intermediate_code_internal(uint8_t *gen_opc_cc_op,
// gen_io_end();
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
/* we don't forget to fill the last values */
if (search_pc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;

View file

@ -3187,7 +3187,6 @@ gen_intermediate_code_internal(M68kCPU *cpu, TranslationBlock *tb,
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
if (search_pc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;

View file

@ -19369,7 +19369,7 @@ gen_intermediate_code_internal(MIPSCPU *cpu, TranslationBlock *tb,
}
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
if (search_pc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
lj++;

View file

@ -5509,7 +5509,7 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
done_generating:
gen_tb_end(tcg_ctx, tb, num_insns);
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
if (spc) {
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
lj++;