diff options
author | Richard Henderson <rth@twiddle.net> | 2015-09-17 14:25:46 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2015-10-07 20:36:27 +1100 |
commit | 959082fc4a93a016a6b697e1e0c2b373d8a3a373 (patch) | |
tree | dda759b30da56f02813c9328372a4af3b23c0cb0 /target-tilegx | |
parent | 667b8e29c5b1d8c5b4e6ad5f780ca60914eb6e96 (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-tilegx')
-rw-r--r-- | target-tilegx/translate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/target-tilegx/translate.c b/target-tilegx/translate.c index 6babc3c733..c23b761979 100644 --- a/target-tilegx/translate.c +++ b/target-tilegx/translate.c @@ -2097,6 +2097,7 @@ static inline void gen_intermediate_code_internal(TileGXCPU *cpu, tcg_ctx.gen_opc_icount[lj] = num_insns; } tcg_gen_insn_start(dc->pc); + num_insns++; translate_one_bundle(dc, cpu_ldq_data(env, dc->pc)); @@ -2105,7 +2106,7 @@ static inline void gen_intermediate_code_internal(TileGXCPU *cpu, break; } dc->pc += TILEGX_BUNDLE_SIZE_IN_BYTES; - if (++num_insns >= max_insns + if (num_insns >= max_insns || dc->pc >= next_page_start || tcg_op_buf_full()) { /* Ending the TB due to TB size or page boundary. Set PC. */ |