target/arm: Use dup_const() instead of bitfield_replicate()
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 28 Jun 2021 13:58:22 +0000 (14:58 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 2 Jul 2021 10:48:36 +0000 (11:48 +0100)
Use dup_const() instead of bitfield_replicate() in
disas_simd_mod_imm().

(We can't replace the other use of bitfield_replicate() in this file,
in logic_imm_decode_wmask(), because that location needs to handle 2
and 4 bit elements, which dup_const() cannot.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210628135835.6690-6-peter.maydell@linaro.org

target/arm/translate-a64.c

index 66781f71cb2c6778cf50e0793f91040505595ddf..e81cc20d04ab0bf2d8a14e5d9587fc2531c2eb30 100644 (file)
@@ -8212,7 +8212,7 @@ static void disas_simd_mod_imm(DisasContext *s, uint32_t insn)
         /* FMOV (vector, immediate) - half-precision */
         imm = vfp_expand_imm(MO_16, abcdefgh);
         /* now duplicate across the lanes */
-        imm = bitfield_replicate(imm, 16);
+        imm = dup_const(MO_16, imm);
     } else {
         imm = asimd_imm_const(abcdefgh, cmode, is_neg);
     }