diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-16 19:56:47 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-06-16 19:56:47 +0000 |
commit | 51875dac89e323d1a0eebc301a2122903bbb58ba (patch) | |
tree | 15400c71298bc5a48d2c4719cff2a5b3043ff6f2 /os/ports/RVCT/ARMCMx/chcoreasm_v7m.s | |
parent | 527c75dbcde62e2a0bb5739f8d4eed8389ca96bf (diff) | |
download | ChibiOS-51875dac89e323d1a0eebc301a2122903bbb58ba.tar.gz ChibiOS-51875dac89e323d1a0eebc301a2122903bbb58ba.tar.bz2 ChibiOS-51875dac89e323d1a0eebc301a2122903bbb58ba.zip |
Fixed bug 3317500, retested impacted ports.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3047 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/RVCT/ARMCMx/chcoreasm_v7m.s')
-rw-r--r-- | os/ports/RVCT/ARMCMx/chcoreasm_v7m.s | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/os/ports/RVCT/ARMCMx/chcoreasm_v7m.s b/os/ports/RVCT/ARMCMx/chcoreasm_v7m.s index 6c7efeb3c..f6acf2968 100644 --- a/os/ports/RVCT/ARMCMx/chcoreasm_v7m.s +++ b/os/ports/RVCT/ARMCMx/chcoreasm_v7m.s @@ -73,7 +73,10 @@ _port_thread_start PROC */
EXPORT _port_switch_from_isr
_port_switch_from_isr PROC
+ bl chSchIsRescRequiredExI
+ cbz r0, noreschedule
bl chSchDoRescheduleI
+noreschedule
#if CORTEX_SIMPLIFIED_PRIORITY
mov r3, #SCB_ICSR :AND: 0xFFFF
movt r3, #SCB_ICSR :SHR: 16
@@ -100,20 +103,16 @@ _port_irq_epilogue PROC mov r3, #SCB_ICSR :AND: 0xFFFF
movt r3, #SCB_ICSR :SHR: 16
ldr r3, [r3, #0]
- tst r3, #ICSR_RETTOBASE
+ ands r3, r3, #ICSR_RETTOBASE
bne skipexit
#if CORTEX_SIMPLIFIED_PRIORITY
cpsie i
#else
- movs r3, #CORTEX_BASEPRI_DISABLED
+ /* Note, R3 is already zero.*/
msr BASEPRI, r3
#endif
bx lr
skipexit
- push {r3, lr}
- bl chSchIsRescRequiredExI
- cmp r0, #0
- beq noreschedule
mrs r3, PSP
subs r3, r3, #EXTCTX_SIZE
msr PSP, r3
@@ -121,15 +120,7 @@ skipexit str r2, [r3, #24]
mov r2, #0x01000000
str r2, [r3, #28]
- pop {r3, pc}
-noreschedule
-#if CORTEX_SIMPLIFIED_PRIORITY
- cpsie i
-#else
- movs r3, #CORTEX_BASEPRI_DISABLED
- msr BASEPRI, r3
-#endif
- pop {r3, pc}
+ bx lr
ENDP
/*
@@ -146,6 +137,7 @@ SVCallVector PROC movs r3, #CORTEX_BASEPRI_DISABLED
msr BASEPRI, r3
bx lr
+ nop
ENDP
#endif
|