* [PATCH] target/xtensa: add missing tcg_temp_free to gen_window_check
@ 2022-04-21 20:21 Max Filippov
2022-04-21 21:51 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Max Filippov @ 2022-04-21 20:21 UTC (permalink / raw)
To: qemu-devel; +Cc: Max Filippov
pc and w are allocated with tcg_const_i32 but not freed in
gen_window_check. Add missing tcg_temp_free for pc, use tcg_constant_i32
for w.
Fixes: 2db59a76c421 ("target-xtensa: record available window in TB flags")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
target/xtensa/translate.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index b1491ed625e5..f4dac27507fd 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -572,9 +572,10 @@ static bool gen_window_check(DisasContext *dc, uint32_t mask)
if (r / 4 > dc->window) {
TCGv_i32 pc = tcg_const_i32(dc->pc);
- TCGv_i32 w = tcg_const_i32(r / 4);
+ TCGv_i32 w = tcg_constant_i32(r / 4);
gen_helper_window_check(cpu_env, pc, w);
+ tcg_temp_free(pc);
dc->base.is_jmp = DISAS_NORETURN;
return false;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/xtensa: add missing tcg_temp_free to gen_window_check
2022-04-21 20:21 [PATCH] target/xtensa: add missing tcg_temp_free to gen_window_check Max Filippov
@ 2022-04-21 21:51 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2022-04-21 21:51 UTC (permalink / raw)
To: Max Filippov, qemu-devel
On 4/21/22 13:21, Max Filippov wrote:
> pc and w are allocated with tcg_const_i32 but not freed in
> gen_window_check. Add missing tcg_temp_free for pc, use tcg_constant_i32
> for w.
>
> Fixes: 2db59a76c421 ("target-xtensa: record available window in TB flags")
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> target/xtensa/translate.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
> index b1491ed625e5..f4dac27507fd 100644
> --- a/target/xtensa/translate.c
> +++ b/target/xtensa/translate.c
> @@ -572,9 +572,10 @@ static bool gen_window_check(DisasContext *dc, uint32_t mask)
>
> if (r / 4 > dc->window) {
> TCGv_i32 pc = tcg_const_i32(dc->pc);
> - TCGv_i32 w = tcg_const_i32(r / 4);
> + TCGv_i32 w = tcg_constant_i32(r / 4);
>
> gen_helper_window_check(cpu_env, pc, w);
> + tcg_temp_free(pc);
Should use tcg_constant_i32 for both of them, and not add the free for pc.
r~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-21 21:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-21 20:21 [PATCH] target/xtensa: add missing tcg_temp_free to gen_window_check Max Filippov
2022-04-21 21:51 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).