Richard Henderson
f838a7e365
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: fb04ab7ddd
("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 04e006ab36
)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru >
2024-12-13 15:51:03 +03:00
Richard Henderson
58b797130c
tcg: Move tcg_temp_free_* out of line
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20231029210848.78234-12-richard.henderson@linaro.org >
2023-11-06 08:27:21 -08:00
Richard Henderson
4643f3e07e
tcg: Move tcg_temp_new_*, tcg_global_mem_new_* out of line
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
Message-Id: <20231029210848.78234-11-richard.henderson@linaro.org >
2023-11-06 08:27:21 -08:00
Richard Henderson
47f7313d81
tcg: Create tcg/tcg-temp-internal.h
...
Move the tcg_temp_free_* and tcg_temp_ebb_new_* declarations
and inlines to the new header. These are private to the
implementation, and will prevent tcg_temp_free_* from creeping
back into the guest front ends.
Reviewed-by: Alex Bennée <alex.bennee@linaro.org >
Reviewed-by: Peter Maydell <peter.maydell@linaro.org >
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org >
Signed-off-by: Richard Henderson <richard.henderson@linaro.org >
2023-03-13 06:42:05 -07:00