diff --git a/qemu/target-arm/translate-a64.c b/qemu/target-arm/translate-a64.c index 30ad5b4c..24ba7320 100644 --- a/qemu/target-arm/translate-a64.c +++ b/qemu/target-arm/translate-a64.c @@ -3009,7 +3009,12 @@ static void disas_bitfield(DisasContext *s, uint32_t insn) } tcg_rd = cpu_reg(s, rd); - tcg_tmp = read_cpu_reg(s, rn, sf); + + /* Suppress the zero-extend for !sf. Since RI and SI are constrained + to be smaller than bitsize, we'll never reference data outside the + low 32-bits anyway. */ + tcg_tmp = read_cpu_reg(s, rn, 1); + /* Recognize the common aliases. */ if (opc == 0) { /* SBFM */