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>
This commit is contained in:
parent
918fd0839e
commit
314e2296dc
@ -1736,7 +1736,7 @@ static void do_interrupt_v7m(CPUARMState *env)
|
|||||||
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
|
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_USAGE);
|
||||||
return;
|
return;
|
||||||
case EXCP_SWI:
|
case EXCP_SWI:
|
||||||
env->regs[15] += 2;
|
/* The PC already points to the next instruction. */
|
||||||
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_SVC);
|
armv7m_nvic_set_pending(env->nvic, ARMV7M_EXCP_SVC);
|
||||||
return;
|
return;
|
||||||
case EXCP_PREFETCH_ABORT:
|
case EXCP_PREFETCH_ABORT:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user