diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-02-28 12:08:19 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-02-28 12:08:19 +0000 |
commit | e13886e3a790b52f0b2e93cb5e84fdc2ada5471a (patch) | |
tree | 5f76ff9d870ab65b2706330424754bc0d8a60040 /linux-user/main.c | |
parent | aa488fe3bb5460c6675800ccd80f6dccbbd70159 (diff) |
armv7m: Raise correct kind of UsageFault for attempts to execute ARM code
M profile doesn't implement ARM, and the architecturally required
behaviour for attempts to execute with the Thumb bit clear is to
generate a UsageFault with the CFSR INVSTATE bit set. We were
incorrectly implementing this as generating an UNDEFINSTR UsageFault;
fix this.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'linux-user/main.c')
-rw-r--r-- | linux-user/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 9645122aa6..10a3bb3a12 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -574,6 +574,7 @@ void cpu_loop(CPUARMState *env) switch(trapnr) { case EXCP_UDEF: case EXCP_NOCP: + case EXCP_INVSTATE: { TaskState *ts = cs->opaque; uint32_t opcode; |