aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports')
-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
/*