]> Git Repo - qemu.git/commitdiff
target-arm: Fix SWI (SVC) instruction in M profile.
author[email protected] <[email protected]>
Fri, 11 Jan 2013 15:21:22 +0000 (15:21 +0000)
committerPeter Maydell <[email protected]>
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 <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
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:
This page took 0.028929 seconds and 4 git commands to generate.