qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 3/6] target/microblaze: Use hswap_i32() in SWAPH opcode


From: Philippe Mathieu-Daudé
Subject: [PATCH 3/6] target/microblaze: Use hswap_i32() in SWAPH opcode
Date: Tue, 22 Aug 2023 13:01:26 +0200

Commit 46be8425ff ("tcg: Implement tcg_gen_{h,w}swap_{i32,i64}")
introduced the generic hswap_i32(). Use it instead of open-coding
it as gen_swaph().

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/microblaze/translate.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/target/microblaze/translate.c b/target/microblaze/translate.c
index 7e7f837c63..83fd1161f0 100644
--- a/target/microblaze/translate.c
+++ b/target/microblaze/translate.c
@@ -608,13 +608,8 @@ DO_TYPEA0(sra, false, gen_sra)
 DO_TYPEA0(src, false, gen_src)
 DO_TYPEA0(srl, false, gen_srl)
 
-static void gen_swaph(TCGv_i32 out, TCGv_i32 ina)
-{
-    tcg_gen_rotri_i32(out, ina, 16);
-}
-
 DO_TYPEA0(swapb, false, tcg_gen_bswap32_i32)
-DO_TYPEA0(swaph, false, gen_swaph)
+DO_TYPEA0(swaph, false, tcg_gen_hswap_i32)
 
 static bool trans_wdic(DisasContext *dc, arg_wdic *a)
 {
-- 
2.41.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]