diff options
author | Richard Henderson | 2015-08-31 23:34:41 +0200 |
---|---|---|
committer | Richard Henderson | 2015-10-07 11:36:50 +0200 |
commit | 190ce7fbc79fd0883a6170d7f30da59d366e6830 (patch) | |
tree | b51499526739d5ac8a550e72b4e3e94214f48fcc /target-sh4 | |
parent | target-*: Drop cpu_gen_code define (diff) | |
download | qemu-190ce7fbc79fd0883a6170d7f30da59d366e6830.tar.gz qemu-190ce7fbc79fd0883a6170d7f30da59d366e6830.tar.xz qemu-190ce7fbc79fd0883a6170d7f30da59d366e6830.zip |
tcg: Add TCG_MAX_INSNS
Adjust all translators to respect it.
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-sh4')
-rw-r--r-- | target-sh4/translate.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/target-sh4/translate.c b/target-sh4/translate.c index efaa6f6a87..b48b9bbb5e 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -1844,8 +1844,13 @@ gen_intermediate_code_internal(SuperHCPU *cpu, TranslationBlock *tb, ii = -1; num_insns = 0; max_insns = tb->cflags & CF_COUNT_MASK; - if (max_insns == 0) + if (max_insns == 0) { max_insns = CF_COUNT_MASK; + } + if (max_insns > TCG_MAX_INSNS) { + max_insns = TCG_MAX_INSNS; + } + gen_tb_start(tb); while (ctx.bstate == BS_NONE && !tcg_op_buf_full()) { if (search_pc) { |