aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-19 21:23:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-02-19 21:23:12 +0000
commit11af394fec5d2723827819ce43c7205bc20fa6dc (patch)
tree29595c758ccd9016ba37de0db5604641d9b424c5 /os
parent690d08a1f93848ee8b467299b5d672d1f69f23c5 (diff)
downloadChibiOS-11af394fec5d2723827819ce43c7205bc20fa6dc.tar.gz
ChibiOS-11af394fec5d2723827819ce43c7205bc20fa6dc.tar.bz2
ChibiOS-11af394fec5d2723827819ce43c7205bc20fa6dc.zip
Fixed bug 3187105.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2744 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/ports/GCC/ARMCMx/chcore_v6m.c5
-rw-r--r--os/ports/IAR/ARMCMx/chcoreasm_v6m.s3
-rw-r--r--os/ports/RVCT/ARMCMx/chcoreasm_v6m.s3
3 files changed, 7 insertions, 4 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore_v6m.c b/os/ports/GCC/ARMCMx/chcore_v6m.c
index dbff1d07c..790761876 100644
--- a/os/ports/GCC/ARMCMx/chcore_v6m.c
+++ b/os/ports/GCC/ARMCMx/chcore_v6m.c
@@ -75,7 +75,7 @@ void _port_switch_from_isr(void) {
chSchDoRescheduleI();
- /* Note, the last registers are restored alone after re-enabling the
+ /* Note, the last register is restored alone after re-enabling the
interrupts in order to minimize the (very remote and unlikely)
possibility that the stack is filled by continuous and saturating
interrupts that would not allow that last words to be pulled out of
@@ -84,8 +84,9 @@ void _port_switch_from_isr(void) {
"mov r12, r1 \n\t"
"msr APSR, r0 \n\t"
"mov lr, r2 \n\t"
+ "pop {r0, r1, r2, r3} \n\t"
"cpsie i \n\t"
- "pop {r0, r1, r2, r3, pc}" : : : "memory");
+ "pop {pc}" : : : "memory");
}
#define PUSH_CONTEXT(sp) { \
diff --git a/os/ports/IAR/ARMCMx/chcoreasm_v6m.s b/os/ports/IAR/ARMCMx/chcoreasm_v6m.s
index 07d89e6b5..1b8a5583c 100644
--- a/os/ports/IAR/ARMCMx/chcoreasm_v6m.s
+++ b/os/ports/IAR/ARMCMx/chcoreasm_v6m.s
@@ -96,8 +96,9 @@ _port_switch_from_isr:
mov r12, r1
msr APSR, r0
mov lr, r2
+ pop {r0, r1, r2, r3}
cpsie i
- pop {r0, r1, r2, r3, pc}
+ pop {pc}
/*
* Reschedule verification and setup after an IRQ.
diff --git a/os/ports/RVCT/ARMCMx/chcoreasm_v6m.s b/os/ports/RVCT/ARMCMx/chcoreasm_v6m.s
index 8f348f099..2424de03f 100644
--- a/os/ports/RVCT/ARMCMx/chcoreasm_v6m.s
+++ b/os/ports/RVCT/ARMCMx/chcoreasm_v6m.s
@@ -93,8 +93,9 @@ _port_switch_from_isr PROC
mov r12, r1
msr APSR, r0
mov lr, r2
+ pop {r0, r1, r2, r3}
cpsie i
- pop {r0, r1, r2, r3, pc}
+ pop {pc}
ENDP
/*