]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
target-arm/translate-a64.c: Use extract32 in disas_ldst_reg_imm9
authorEdgar E. Iglesias <edgar.iglesias@xilinx.com>
Thu, 12 May 2016 12:22:27 +0000 (13:22 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 12 May 2016 12:22:27 +0000 (13:22 +0100)
Use extract32 instead of open coding the bit masking when decoding
is_signed and is_extended. This streamlines the decoding with some
of the other ldst variants.

No functional change.

Reviewed-by: Sergey Fedorov <serge.fdrv@gmail.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1461931684-1867-6-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target-arm/translate-a64.c

index b13cff756ad14d10c85bb0d399b55ffb2c3d8831..5c8dddbf98fd5e7b059a6452944481269d3f8a25 100644 (file)
@@ -2128,8 +2128,8 @@ static void disas_ldst_reg_imm9(DisasContext *s, uint32_t insn)
             return;
         }
         is_store = (opc == 0);
-        is_signed = opc & (1<<1);
-        is_extended = (size < 3) && (opc & 1);
+        is_signed = extract32(opc, 1, 1);
+        is_extended = (size < 3) && extract32(opc, 0, 1);
     }
 
     switch (idx) {