]> git.ipfire.org Git - thirdparty/qemu.git/commit
tcg: Reset free_temps before tcg_optimize
authorRichard Henderson <richard.henderson@linaro.org>
Sat, 7 Dec 2024 18:14:45 +0000 (18:14 +0000)
committerMichael Tokarev <mjt@tls.msk.ru>
Fri, 13 Dec 2024 12:51:03 +0000 (15:51 +0300)
commitf838a7e3659b1066e5b39be09b499d637d084758
tree0426f694417377b5b34083a616974daf3c7a2221
parent361f29fe1bc6c847b108442d573fcd2690d6db4b
tcg: Reset free_temps before tcg_optimize

When allocating new temps during tcg_optmize, do not re-use
any EBB temps that were used within the TB.  We do not have
any idea what span of the TB in which the temp was live.

Introduce tcg_temp_ebb_reset_freed and use before tcg_optimize,
as well as replacing the equivalent in plugin_gen_inject and
tcg_func_start.

Cc: qemu-stable@nongnu.org
Fixes: fb04ab7ddd8 ("tcg/optimize: Lower TCG_COND_TST{EQ,NE} if unsupported")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2711
Reported-by: wannacu <wannacu2049@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
(cherry picked from commit 04e006ab36a8565b92d4e21dd346367fbade7d74)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
accel/tcg/plugin-gen.c
include/tcg/tcg-temp-internal.h
tcg/tcg.c