diff options
author | Richard Henderson | 2015-09-17 23:25:46 +0200 |
---|---|---|
committer | Richard Henderson | 2015-10-07 11:36:27 +0200 |
commit | 959082fc4a93a016a6b697e1e0c2b373d8a3a373 (patch) | |
tree | dda759b30da56f02813c9328372a4af3b23c0cb0 /target-unicore32/translate.c | |
parent | target-*: Unconditionally emit tcg_gen_insn_start (diff) | |
download | qemu-959082fc4a93a016a6b697e1e0c2b373d8a3a373.tar.gz qemu-959082fc4a93a016a6b697e1e0c2b373d8a3a373.tar.xz qemu-959082fc4a93a016a6b697e1e0c2b373d8a3a373.zip |
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-unicore32/translate.c')
-rw-r--r-- | target-unicore32/translate.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c index 28db34a41a..7aad61f76f 100644 --- a/target-unicore32/translate.c +++ b/target-unicore32/translate.c @@ -1938,8 +1938,9 @@ static inline void gen_intermediate_code_internal(UniCore32CPU *cpu, tcg_ctx.gen_opc_icount[lj] = num_insns; } tcg_gen_insn_start(dc->pc); + num_insns++; - if (num_insns + 1 == max_insns && (tb->cflags & CF_LAST_IO)) { + if (num_insns == max_insns && (tb->cflags & CF_LAST_IO)) { gen_io_start(); } @@ -1958,7 +1959,6 @@ static inline void gen_intermediate_code_internal(UniCore32CPU *cpu, * Otherwise the subsequent code could get translated several times. * Also stop translation when a page boundary is reached. This * ensures prefetch aborts occur at the right place. */ - num_insns++; } while (!dc->is_jmp && !tcg_op_buf_full() && !cs->singlestep_enabled && !singlestep && |