[PATCH-for-6.2 1/2] target/mips/tx79: Use tcg_constant_tl()

Philippe Mathieu-Daudé posted 2 patches 4 years, 6 months ago
Maintainers: Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
[PATCH-for-6.2 1/2] target/mips/tx79: Use tcg_constant_tl()
Posted by Philippe Mathieu-Daudé 4 years, 6 months ago
Replace uses of tcg_const_tl() with the allocate and free close together.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tcg/tx79_translate.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/target/mips/tcg/tx79_translate.c b/target/mips/tcg/tx79_translate.c
index 6d51fe17c1a..0dacdf2a619 100644
--- a/target/mips/tcg/tx79_translate.c
+++ b/target/mips/tcg/tx79_translate.c
@@ -247,8 +247,8 @@ static bool trans_parallel_compare(DisasContext *ctx, arg_r *a,
         return true;
     }
 
-    c0 = tcg_const_tl(0);
-    c1 = tcg_const_tl(0xffffffff);
+    c0 = tcg_constant_tl(0);
+    c1 = tcg_constant_tl(0xffffffff);
     ax = tcg_temp_new_i64();
     bx = tcg_temp_new_i64();
     t0 = tcg_temp_new_i64();
@@ -279,8 +279,6 @@ static bool trans_parallel_compare(DisasContext *ctx, arg_r *a,
     tcg_temp_free(t0);
     tcg_temp_free(bx);
     tcg_temp_free(ax);
-    tcg_temp_free(c1);
-    tcg_temp_free(c0);
 
     return true;
 }
-- 
2.31.1

Re: [PATCH-for-6.2 1/2] target/mips/tx79: Use tcg_constant_tl()
Posted by Richard Henderson 4 years, 6 months ago
On 8/8/21 6:08 AM, Philippe Mathieu-Daudé wrote:
> Replace uses of tcg_const_tl() with the allocate and free close together.
> 
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   target/mips/tcg/tx79_translate.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~