diff --git a/qemu/target/arm/translate.c b/qemu/target/arm/translate.c index 9ad39fc8..0550390b 100644 --- a/qemu/target/arm/translate.c +++ b/qemu/target/arm/translate.c @@ -8171,6 +8171,14 @@ static bool trans_BLX_i(DisasContext *s, arg_BLX_i *a) TCGContext *tcg_ctx = s->uc->tcg_ctx; TCGv_i32 tmp; + /* + * BLX would be useless on M-profile; the encoding space + * is used for other insns from v8.1M onward, and UNDEFs before that. + */ + if (arm_dc_feature(s, ARM_FEATURE_M)) { + return false; + } + /* For A32, ARM_FEATURE_V5 is checked near the start of the uncond block. */ if (s->thumb && (a->imm & 2)) { return false;