aboutsummaryrefslogtreecommitdiff
path: root/target-tricore
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-tricore
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-tricore')
-rw-r--r--target-tricore/translate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target-tricore/translate.c b/target-tricore/translate.c
index 27564d330f..fa10d5c23e 100644
--- a/target-tricore/translate.c
+++ b/target-tricore/translate.c
@@ -8293,12 +8293,11 @@ gen_intermediate_code_internal(TriCoreCPU *cpu, struct TranslationBlock *tb,
gen_tb_start(tb);
while (ctx.bstate == BS_NONE) {
tcg_gen_insn_start(ctx.pc);
+ num_insns++;
ctx.opcode = cpu_ldl_code(env, ctx.pc);
decode_opc(env, &ctx, 0);
- num_insns++;
-
if (tcg_op_buf_full()) {
gen_save_pc(ctx.next_pc);
tcg_gen_exit_tb(0);