diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2013-03-05 00:31:17 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2013-03-05 00:31:17 +0000 |
commit | 00115976bb066d4b33dbb07a92f8bde5ec8b9518 (patch) | |
tree | 6d55864951f6248f487e9f44e68401c119d04cbc /target-arm/translate.c | |
parent | 81465888c5306cd94abb9847e560796fd13d3c2f (diff) |
target-arm: Don't decode RFE or SRS on M profile cores
M profile cores do not have the RFE or SRS instructions, so
correctly UNDEF these insn patterns on those cores.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target-arm/translate.c')
-rw-r--r-- | target-arm/translate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/target-arm/translate.c b/target-arm/translate.c index e16c113348..35a21be931 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -8180,9 +8180,10 @@ static int disas_thumb2_insn(CPUARMState *env, DisasContext *s, uint16_t insn_hw } else { /* Load/store multiple, RFE, SRS. */ if (((insn >> 23) & 1) == ((insn >> 24) & 1)) { - /* Not available in user mode. */ - if (IS_USER(s)) + /* RFE, SRS: not available in user mode or on M profile */ + if (IS_USER(s) || IS_M(env)) { goto illegal_op; + } if (insn & (1 << 20)) { /* rfe */ addr = load_reg(s, rn); |