From 868866157762bc5ad7644fcaa45111ecf6ed1899 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 25 Jul 2008 19:34:12 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@358 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- ports/ARMCM3/chcore.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ports') diff --git a/ports/ARMCM3/chcore.c b/ports/ARMCM3/chcore.c index 16560842a..1a631e36b 100644 --- a/ports/ARMCM3/chcore.c +++ b/ports/ARMCM3/chcore.c @@ -129,7 +129,8 @@ void SVCallVector(Thread *otp, Thread *ntp) { #define POP_CONTEXT(sp) { \ asm volatile ("ldmia %0!, {r3-r6,r8-r11, lr} \n\t" \ "msr PSP, %0 \n\t" \ - "msr BASEPRI, r3" : "=r" (sp) : "r" (sp)); \ + "msr BASEPRI, r3 \n\t" \ + "bx lr" : "=r" (sp) : "r" (sp)); \ } #else #define PUSH_CONTEXT(sp) { \ @@ -142,7 +143,8 @@ void SVCallVector(Thread *otp, Thread *ntp) { #define POP_CONTEXT(sp) { \ asm volatile ("ldmia %0!, {r3-r11, lr} \n\t" \ "msr PSP, %0 \n\t" \ - "msr BASEPRI, r3" : "=r" (sp) : "r" (sp)); \ + "msr BASEPRI, r3 \n\t" \ + "bx lr" : "=r" (sp) : "r" (sp)); \ } #endif @@ -177,6 +179,4 @@ void PendSVVector(void) { sp_thd = currp->p_ctx.r13; POP_CONTEXT(sp_thd); - - asm volatile ("bx lr"); } -- cgit v1.2.3