|
@@ -89,7 +89,7 @@ static TCGOp *gen_tb_start(DisasContextBase *db, uint32_t cflags)
|
|
* each translation block. The cost is minimal, plus it would be
|
|
* each translation block. The cost is minimal, plus it would be
|
|
* very easy to forget doing it in the translator.
|
|
* very easy to forget doing it in the translator.
|
|
*/
|
|
*/
|
|
- set_can_do_io(db, db->max_insns == 1 && (cflags & CF_LAST_IO));
|
|
|
|
|
|
+ set_can_do_io(db, db->max_insns == 1);
|
|
|
|
|
|
return icount_start_insn;
|
|
return icount_start_insn;
|
|
}
|
|
}
|
|
@@ -151,13 +151,7 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
|
|
ops->tb_start(db, cpu);
|
|
ops->tb_start(db, cpu);
|
|
tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */
|
|
tcg_debug_assert(db->is_jmp == DISAS_NEXT); /* no early exit */
|
|
|
|
|
|
- if (cflags & CF_MEMI_ONLY) {
|
|
|
|
- /* We should only see CF_MEMI_ONLY for io_recompile. */
|
|
|
|
- assert(cflags & CF_LAST_IO);
|
|
|
|
- plugin_enabled = plugin_gen_tb_start(cpu, db, true);
|
|
|
|
- } else {
|
|
|
|
- plugin_enabled = plugin_gen_tb_start(cpu, db, false);
|
|
|
|
- }
|
|
|
|
|
|
+ plugin_enabled = plugin_gen_tb_start(cpu, db, cflags & CF_MEMI_ONLY);
|
|
db->plugin_enabled = plugin_enabled;
|
|
db->plugin_enabled = plugin_enabled;
|
|
|
|
|
|
while (true) {
|
|
while (true) {
|
|
@@ -169,11 +163,13 @@ void translator_loop(CPUState *cpu, TranslationBlock *tb, int *max_insns,
|
|
plugin_gen_insn_start(cpu, db);
|
|
plugin_gen_insn_start(cpu, db);
|
|
}
|
|
}
|
|
|
|
|
|
- /* Disassemble one instruction. The translate_insn hook should
|
|
|
|
- update db->pc_next and db->is_jmp to indicate what should be
|
|
|
|
- done next -- either exiting this loop or locate the start of
|
|
|
|
- the next instruction. */
|
|
|
|
- if (db->num_insns == db->max_insns && (cflags & CF_LAST_IO)) {
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Disassemble one instruction. The translate_insn hook should
|
|
|
|
+ * update db->pc_next and db->is_jmp to indicate what should be
|
|
|
|
+ * done next -- either exiting this loop or locate the start of
|
|
|
|
+ * the next instruction.
|
|
|
|
+ */
|
|
|
|
+ if (db->num_insns == db->max_insns) {
|
|
/* Accept I/O on the last instruction. */
|
|
/* Accept I/O on the last instruction. */
|
|
set_can_do_io(db, true);
|
|
set_can_do_io(db, true);
|
|
}
|
|
}
|