summaryrefslogtreecommitdiffstats
path: root/include/tcg/tcg.h
diff options
context:
space:
mode:
authorRichard Henderson2021-01-23 23:11:17 +0100
committerRichard Henderson2021-01-24 19:03:27 +0100
commitae30e86661b0f48562cd95918d37cbeec5d02262 (patch)
treebd84c59f604bae6c128f02b06b4607433a13d2df /include/tcg/tcg.h
parenttcg: Toggle page execution for Apple Silicon (diff)
downloadqemu-ae30e86661b0f48562cd95918d37cbeec5d02262.tar.gz
qemu-ae30e86661b0f48562cd95918d37cbeec5d02262.tar.xz
qemu-ae30e86661b0f48562cd95918d37cbeec5d02262.zip
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/tcg.h')
-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 c5a9d65d5f..0f0695e90d 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)