arm: Don't implement BXJ on M-profile CPUs

For M-profile CPUs, the BXJ instruction does not exist at all, and
the encoding should always UNDEF. We were accidentally implementing
it to behave like A-profile BXJ; correct the error.

Backports commit 9d7c59c84d4530d05e8702b1c3a31e6da00a397e from qemu
This commit is contained in:
Peter Maydell 2018-03-02 14:42:03 -05:00 committed by Lioncash
parent e9d507a193
commit 9f938da9e1
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -10643,7 +10643,12 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw
}
break;
case 4: /* bxj */
/* Trivial implementation equivalent to bx. */
/* Trivial implementation equivalent to bx.
* This instruction doesn't exist at all for M-profile.
*/
if (arm_dc_feature(s, ARM_FEATURE_M)) {
goto illegal_op;
}
tmp = load_reg(s, rn);
gen_bx(s, tmp);
break;