diff options
author | Alex_Rozenman@mentor.com | 2013-01-11 16:21:22 +0100 |
---|---|---|
committer | Peter Maydell | 2013-01-11 16:21:22 +0100 |
commit | 314e2296dc945e286b605563d7b6e6b269d29816 (patch) | |
tree | 04b83865b48e069e6aa1fd60c21c37362d8f4ea4 | |
parent | target-arm: use type_register() instead of type_register_static() (diff) | |
download | qemu-314e2296dc945e286b605563d7b6e6b269d29816.tar.gz qemu-314e2296dc945e286b605563d7b6e6b269d29816.tar.xz qemu-314e2296dc945e286b605563d7b6e6b269d29816.zip |
target-arm: Fix SWI (SVC) instruction in M profile.
When do_interrupt_v7m is called with EXCP_SWI, the PC already
points to the next instruction. Don't modify it here.
Signed-off-by: Alex Rozenman <Alex_Rozenman@mentor.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | target-arm/helper.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target-arm/helper.c b/target-arm/helper.c index 0525aec87a..66ab78e3f1 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1736,7 +1736,7 @@ static void do_interrupt_v7m(CPUARMState *env) armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE); return; case EXCP_SWI: - env->regs[15] += 2; + /* The PC already points to the next instruction. */ armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_SVC); return; case EXCP_PREFETCH_ABORT: |