[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 1/7] target/xtensa: fix missing tcg_temp_free in gen_window_ch
From: |
Max Filippov |
Subject: |
[PATCH v2 1/7] target/xtensa: fix missing tcg_temp_free in gen_window_check |
Date: |
Fri, 22 Apr 2022 04:43:26 -0700 |
pc and w are allocated with tcg_const_i32 but not freed in
gen_window_check. Use tcg_constant_i32 for them both.
Fixes: 2db59a76c421 ("target-xtensa: record available window in TB flags")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
---
Changes v1->v2:
- also use tcg_constant_* for PC
target/xtensa/translate.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index b1491ed625e5..9ecbbf172114 100644
--- a/target/xtensa/translate.c
+++ b/target/xtensa/translate.c
@@ -571,8 +571,8 @@ static bool gen_window_check(DisasContext *dc, uint32_t
mask)
unsigned r = 31 - clz32(mask);
if (r / 4 > dc->window) {
- TCGv_i32 pc = tcg_const_i32(dc->pc);
- TCGv_i32 w = tcg_const_i32(r / 4);
+ TCGv_i32 pc = tcg_constant_i32(dc->pc);
+ TCGv_i32 w = tcg_constant_i32(r / 4);
gen_helper_window_check(cpu_env, pc, w);
dc->base.is_jmp = DISAS_NORETURN;
--
2.30.2
- [PATCH v2 0/7] target/xtensa: use tcg_constant_* where possible, Max Filippov, 2022/04/22
- [PATCH v2 1/7] target/xtensa: fix missing tcg_temp_free in gen_window_check,
Max Filippov <=
- [PATCH v2 2/7] target/xtensa: use tcg_contatnt_* for numeric literals, Max Filippov, 2022/04/22
- [PATCH v2 3/7] target/xtensa: use tcg_constant_* for exceptions, Max Filippov, 2022/04/22
- [PATCH v2 4/7] target/xtensa: use tcg_constant_* for TLB opcodes, Max Filippov, 2022/04/22
- [PATCH v2 6/7] target/xtensa: use tcg_constant_* for FPU conversion opcodes, Max Filippov, 2022/04/22
- [PATCH v2 5/7] target/xtensa: use tcg_constant_* for numbered special registers, Max Filippov, 2022/04/22
- [PATCH v2 7/7] target/xtensa: use tcg_constant_* for remaining opcodes, Max Filippov, 2022/04/22