diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2019-04-15 20:54:54 -1000 |
---|---|---|
committer | Richard Henderson <richard.henderson@linaro.org> | 2019-04-24 13:04:33 -0700 |
commit | 8b86d6d25807e13a63ab6ea879f976b9f18cc45a (patch) | |
tree | f29fd7599e756b459c2fca9af822a6c151fe4ea5 /target/tilegx/translate.c | |
parent | 464c2969d5d7a0a5d38d2aa5d930986df876d3fb (diff) | |
download | qemu-8b86d6d25807e13a63ab6ea879f976b9f18cc45a.zip qemu-8b86d6d25807e13a63ab6ea879f976b9f18cc45a.tar.gz qemu-8b86d6d25807e13a63ab6ea879f976b9f18cc45a.tar.bz2 |
tcg: Hoist max_insns computation to tb_gen_code
In order to handle TB's that translate to too much code, we
need to place the control of the length of the translation
in the hands of the code gen master loop.
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'target/tilegx/translate.c')
-rw-r--r-- | target/tilegx/translate.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/target/tilegx/translate.c b/target/tilegx/translate.c index df1e4d0..c46a4ab 100644 --- a/target/tilegx/translate.c +++ b/target/tilegx/translate.c @@ -2369,7 +2369,7 @@ static void translate_one_bundle(DisasContext *dc, uint64_t bundle) } } -void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) +void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns) { CPUTLGState *env = cs->env_ptr; DisasContext ctx; @@ -2377,7 +2377,6 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) uint64_t pc_start = tb->pc; uint64_t page_start = pc_start & TARGET_PAGE_MASK; int num_insns = 0; - int max_insns = tb_cflags(tb) & CF_COUNT_MASK; dc->pc = pc_start; dc->mmuidx = 0; @@ -2392,15 +2391,6 @@ void gen_intermediate_code(CPUState *cs, struct TranslationBlock *tb) qemu_log_lock(); qemu_log("IN: %s\n", lookup_symbol(pc_start)); } - if (!max_insns) { - max_insns = CF_COUNT_MASK; - } - if (cs->singlestep_enabled || singlestep) { - max_insns = 1; - } - if (max_insns > TCG_MAX_INSNS) { - max_insns = TCG_MAX_INSNS; - } gen_tb_start(tb); while (1) { |