Received: from eggs.gnu.org ([208.118.235.92]:54686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnlMT-00056F-Tm for qemu-devel@nongnu.org; Wed, 26 Dec 2012 02:25:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TnlMQ-0007YW-NC for qemu-devel@nongnu.org; Wed, 26 Dec 2012 02:25:09 -0500 Received: from relay1.mentorg.com ([192.94.38.131]:56739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TnlMQ-0007Ue-Hz for qemu-devel@nongnu.org; Wed, 26 Dec 2012 02:25:06 -0500 From: Alex Rozenman Date: Wed, 26 Dec 2012 09:24:46 +0200 Message-Id: <1356506686-31056-1-git-send-email-Alex_Rozenman@mentor.com> Subject: [Qemu-devel] [PATCH] target-arm: Fix SWI (SVC) instruction in M profile. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Anthony Liguori , Vladimir Pilko , Alex Rozenman , Paul Brook , Alex Rozenman 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 --- target-arm/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-arm/helper.c b/target-arm/helper.c index e343fac..39195b2 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1741,7 +1741,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: -- 1.7.9.6