]> git.proxmox.com Git - mirror_qemu.git/commitdiff
target-arm: Fix SWI (SVC) instruction in M profile.
authorAlex_Rozenman@mentor.com <Alex_Rozenman@mentor.com>
Fri, 11 Jan 2013 15:21:22 +0000 (15:21 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 11 Jan 2013 15:21:22 +0000 (15:21 +0000)
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>
target-arm/helper.c

index 0525aec87accb095c75ee6e7f58dcde4cdb9f474..66ab78e3f1e59dd778c8a9b1fd10c8190a488828 100644 (file)
@@ -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: