diff mbox series

[v2,2/3] target/alpha: Replace TCGv by TCGv_i64 in gen_cpy_mask()

Message ID 20230223180405.31836-3-philmd@linaro.org
State New
Headers show
Series target/tcg: Use TCGv_i64 with tcg_temp_new_i64() | expand

Commit Message

Philippe Mathieu-Daudé Feb. 23, 2023, 6:04 p.m. UTC
Although TCGv is defined as TCGv_i64 on alpha,
make it clear tcg_temp_new_i64() returns a TCGv_i64.
Free calling tcg_temp_free_i64().

Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/alpha/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Xingtao Yao (Fujitsu)" via Feb. 23, 2023, 6:52 p.m. UTC | #1
On 2/23/23 19:04, Philippe Mathieu-Daudé wrote:
> Although TCGv is defined as TCGv_i64 on alpha,
> make it clear tcg_temp_new_i64() returns a TCGv_i64.
> Free calling tcg_temp_free_i64().
>
> Suggested-by: Ilya Leoshkevich <iii@linux.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   target/alpha/translate.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Anton Johansson <anjo@rev.ng>
diff mbox series

Patch

diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index f9bcdeb717..06894094b7 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -798,7 +798,7 @@  IEEE_INTCVT(cvtqt)
 static void gen_cpy_mask(TCGv vc, TCGv va, TCGv vb, bool inv_a, uint64_t mask)
 {
     TCGv vmask = tcg_constant_i64(mask);
-    TCGv tmp = tcg_temp_new_i64();
+    TCGv_i64 tmp = tcg_temp_new_i64();
 
     if (inv_a) {
         tcg_gen_andc_i64(tmp, vmask, va);
@@ -809,7 +809,7 @@  static void gen_cpy_mask(TCGv vc, TCGv va, TCGv vb, bool inv_a, uint64_t mask)
     tcg_gen_andc_i64(vc, vb, vmask);
     tcg_gen_or_i64(vc, vc, tmp);
 
-    tcg_temp_free(tmp);
+    tcg_temp_free_i64(tmp);
 }
 
 static void gen_ieee_arith3(DisasContext *ctx,