]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 4 Oct 2024 18:58:29 +0000 (15:58 -0300)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Tue, 15 Oct 2024 15:13:59 +0000 (12:13 -0300)
Directly use tcg_constant_tl() for constant integer,
this save a call to tcg_gen_movi_tl().

Inspired-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20241004202621.4321-3-philmd@linaro.org>

target/tricore/translate.c

index a46a03e1fd861cdf1d8d4cb7edaae8cd410d14c8..4a12d2ca191b2c5a02da1af15cd6c10a16308d06 100644 (file)
@@ -2732,8 +2732,7 @@ static inline void gen_insert(TCGv ret, TCGv r1, TCGv r2, TCGv width, TCGv pos)
     TCGv temp = tcg_temp_new();
     TCGv temp2 = tcg_temp_new();
 
-    tcg_gen_movi_tl(mask, 1);
-    tcg_gen_shl_tl(mask, mask, width);
+    tcg_gen_shl_tl(mask, tcg_constant_tl(1), width);
     tcg_gen_subi_tl(mask, mask, 1);
     tcg_gen_shl_tl(mask, mask, pos);