aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-10-04 15:58:29 -0300
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2024-10-15 12:13:59 -0300
commit96ce24da684454b2f8c86c9b47ee703ecf194cc0 (patch)
treef476887e126aa427c9331a1cc736a05dbf703523
parente01e1c7e2e25fa792ac99e1c790c718d5cbee376 (diff)
downloadqemu-96ce24da684454b2f8c86c9b47ee703ecf194cc0.zip
qemu-96ce24da684454b2f8c86c9b47ee703ecf194cc0.tar.gz
qemu-96ce24da684454b2f8c86c9b47ee703ecf194cc0.tar.bz2
target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl()
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>
-rw-r--r--target/tricore/translate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/target/tricore/translate.c b/target/tricore/translate.c
index a46a03e..4a12d2c 100644
--- a/target/tricore/translate.c
+++ b/target/tricore/translate.c
@@ -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);