aboutsummaryrefslogtreecommitdiff
path: root/include/exec/translator.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2019-04-15 20:54:54 -1000
committerRichard Henderson <richard.henderson@linaro.org>2019-04-24 13:04:33 -0700
commit8b86d6d25807e13a63ab6ea879f976b9f18cc45a (patch)
treef29fd7599e756b459c2fca9af822a6c151fe4ea5 /include/exec/translator.h
parent464c2969d5d7a0a5d38d2aa5d930986df876d3fb (diff)
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 'include/exec/translator.h')
-rw-r--r--include/exec/translator.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/exec/translator.h b/include/exec/translator.h
index 71e7b2c347..66dfe906c4 100644
--- a/include/exec/translator.h
+++ b/include/exec/translator.h
@@ -123,6 +123,7 @@ typedef struct TranslatorOps {
* @db: Disassembly context.
* @cpu: Target vCPU.
* @tb: Translation block.
+ * @max_insns: Maximum number of insns to translate.
*
* Generic translator loop.
*
@@ -137,7 +138,7 @@ typedef struct TranslatorOps {
* - When too many instructions have been translated.
*/
void translator_loop(const TranslatorOps *ops, DisasContextBase *db,
- CPUState *cpu, TranslationBlock *tb);
+ CPUState *cpu, TranslationBlock *tb, int max_insns);
void translator_loop_temp_check(DisasContextBase *db);