aboutsummaryrefslogtreecommitdiff
path: root/include/tcg
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-01-23 12:11:17 -1000
committerRichard Henderson <richard.henderson@linaro.org>2021-01-24 08:03:27 -1000
commitae30e86661b0f48562cd95918d37cbeec5d02262 (patch)
treebd84c59f604bae6c128f02b06b4607433a13d2df /include/tcg
parent653b87eb36045b506b79f0bb433016ef1c54bc9a (diff)
downloadqemu-ae30e86661b0f48562cd95918d37cbeec5d02262.zip
qemu-ae30e86661b0f48562cd95918d37cbeec5d02262.tar.gz
qemu-ae30e86661b0f48562cd95918d37cbeec5d02262.tar.bz2
tcg: Restart code generation when we run out of temps
Some large translation blocks can generate so many unique constants that we run out of temps to hold them. In this case, longjmp back to the start of code generation and restart with a smaller translation block. Buglink: https://bugs.launchpad.net/bugs/1912065 Tested-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/tcg')
-rw-r--r--include/tcg/tcg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index c5a9d65..0f0695e 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -680,6 +680,9 @@ struct TCGContext {
uint16_t gen_insn_end_off[TCG_MAX_INSNS];
target_ulong gen_insn_data[TCG_MAX_INSNS][TARGET_INSN_START_WORDS];
+
+ /* Exit to translator on overflow. */
+ sigjmp_buf jmp_trans;
};
static inline bool temp_readonly(TCGTemp *ts)