mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 09:55:30 +00:00
tcg: Move emit of INDEX_op_end into gen_tb_end
Backports commit 0a7df5da986bd7ee0789f2d7b8611f2e8eee5046 from qemu
This commit is contained in:
parent
4d46959c3b
commit
78378289e3
|
@ -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);
|
tcg_gen_exit_tb((uintptr_t)tb + TB_EXIT_ICOUNT_EXPIRED);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -11306,7 +11306,6 @@ tb_end:
|
||||||
|
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
|
||||||
|
|
||||||
if (search_pc) {
|
if (search_pc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
|
|
|
@ -11626,7 +11626,6 @@ tb_end:
|
||||||
|
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
|
||||||
|
|
||||||
if (search_pc) {
|
if (search_pc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
|
|
|
@ -8770,7 +8770,7 @@ static inline void gen_intermediate_code_internal(uint8_t *gen_opc_cc_op,
|
||||||
// gen_io_end();
|
// gen_io_end();
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
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 */
|
/* we don't forget to fill the last values */
|
||||||
if (search_pc) {
|
if (search_pc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
|
|
|
@ -3187,7 +3187,6 @@ gen_intermediate_code_internal(M68kCPU *cpu, TranslationBlock *tb,
|
||||||
|
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
|
||||||
|
|
||||||
if (search_pc) {
|
if (search_pc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
|
|
|
@ -19369,7 +19369,7 @@ gen_intermediate_code_internal(MIPSCPU *cpu, TranslationBlock *tb,
|
||||||
}
|
}
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
|
||||||
if (search_pc) {
|
if (search_pc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
lj++;
|
lj++;
|
||||||
|
|
|
@ -5509,7 +5509,7 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
|
||||||
|
|
||||||
done_generating:
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
|
||||||
if (spc) {
|
if (spc) {
|
||||||
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
j = tcg_ctx->gen_opc_ptr - tcg_ctx->gen_opc_buf;
|
||||||
lj++;
|
lj++;
|
||||||
|
|
Loading…
Reference in a new issue