aboutsummaryrefslogtreecommitdiff
path: root/target-cris
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2015-09-17 14:25:46 -0700
committerRichard Henderson <rth@twiddle.net>2015-10-07 20:36:27 +1100
commit959082fc4a93a016a6b697e1e0c2b373d8a3a373 (patch)
treedda759b30da56f02813c9328372a4af3b23c0cb0 /target-cris
parent667b8e29c5b1d8c5b4e6ad5f780ca60914eb6e96 (diff)
target-*: Increment num_insns immediately after tcg_gen_insn_start
This does tidy the icount test common to all targets. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'target-cris')
-rw-r--r--target-cris/translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/target-cris/translate.c b/target-cris/translate.c
index 0a4b363dec..bba7217dd8 100644
--- a/target-cris/translate.c
+++ b/target-cris/translate.c
@@ -3194,11 +3194,12 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
tcg_ctx.gen_opc_icount[lj] = num_insns;
}
tcg_gen_insn_start(dc->pc);
+ num_insns++;
/* Pretty disas. */
LOG_DIS("%8.8x:\t", dc->pc);
- if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) {
+ if (num_insns == max_insns && (tb->cflags & CF_LAST_IO)) {
gen_io_start();
}
dc->clear_x = 1;
@@ -3210,7 +3211,6 @@ gen_intermediate_code_internal(CRISCPU *cpu, TranslationBlock *tb,
cris_clear_x_flag(dc);
}
- num_insns++;
/* Check for delayed branches here. If we do it before
actually generating any host code, the simulator will just
loop doing nothing for on this program location. */