Browse files

target-rl78: Add calls to gen_io_{start,end}()

Signed-off-by: Andreas Färber <andreas.faerber@web.de>
  • Loading branch information...
1 parent dfecf77 commit 2fe2d78825b22394e81766cc2ae60e52b521671d @afaerber committed Nov 17, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 target-78k0/translate.c
View
8 target-78k0/translate.c
@@ -139,6 +139,10 @@ static inline void gen_intermediate_code_internal(RL78CPU *cpu,
tcg_ctx.gen_opc_icount[lj] = num_insns;
}
+ if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) {
+ gen_io_start();
+ }
+
disas_rl78_insn(cpu, &dc);
num_insns++;
@@ -150,6 +154,10 @@ static inline void gen_intermediate_code_internal(RL78CPU *cpu,
&& dc.pc < next_page_start && num_insns < max_insns
&& !cs->singlestep_enabled && !singlestep);
+ if (tb->cflags & CF_LAST_IO) {
+ gen_io_end();
+ }
+
/* Generate the return instruction */
if (dc.is_jmp != DISAS_TB_JUMP) {
tcg_gen_exit_tb(0);

0 comments on commit 2fe2d78

Please sign in to comment.