target/sh4: Improve swap.b translation
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 13 Jun 2021 23:24:25 +0000 (16:24 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Tue, 29 Jun 2021 17:04:57 +0000 (10:04 -0700)
Remove TCG_BSWAP_IZ and the preceding zero-extension.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/sh4/translate.c

index 147219759bf8e593aadee6bb0ad33a16efbc0007..4dcfff81f689bfe510a538e8b860c5e44c91b1bd 100644 (file)
@@ -676,8 +676,7 @@ static void _decode_opc(DisasContext * ctx)
     case 0x6008:               /* swap.b Rm,Rn */
        {
             TCGv low = tcg_temp_new();
-           tcg_gen_ext16u_i32(low, REG(B7_4));
-           tcg_gen_bswap16_i32(low, low, TCG_BSWAP_IZ | TCG_BSWAP_OZ);
+            tcg_gen_bswap16_i32(low, REG(B7_4), 0);
             tcg_gen_deposit_i32(REG(B11_8), REG(B7_4), low, 0, 16);
            tcg_temp_free(low);
        }