qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 4/6] target/sh4: Use hswap_i32() in SWAP.W opcode


From: Philippe Mathieu-Daudé
Subject: [PATCH 4/6] target/sh4: Use hswap_i32() in SWAP.W opcode
Date: Tue, 22 Aug 2023 13:01:27 +0200

Commit 46be8425ff ("tcg: Implement tcg_gen_{h,w}swap_{i32,i64}")
introduced the generic hswap_i32(). Use it.

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

diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 49c87d7a01..0f96a099b3 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -678,7 +678,7 @@ static void _decode_opc(DisasContext * ctx)
        }
        return;
     case 0x6009:               /* swap.w Rm,Rn */
-        tcg_gen_rotli_i32(REG(B11_8), REG(B7_4), 16);
+        tcg_gen_hswap_i32(REG(B11_8), REG(B7_4));
        return;
     case 0x200d:               /* xtrct Rm,Rn */
        {
-- 
2.41.0




reply via email to

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