提交 314e2296 编写于 作者: A Alex_Rozenman@mentor.com 提交者: Peter Maydell

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: NAlex Rozenman <Alex_Rozenman@mentor.com>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 918fd083
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册