aboutsummaryrefslogtreecommitdiffstats
path: root/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
diff options
context:
space:
mode:
Diffstat (limited to 'os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s')
-rw-r--r--os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s12
1 files changed, 11 insertions, 1 deletions
diff --git a/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s b/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
index 1d23a99f3..69bfaa59c 100644
--- a/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
+++ b/os/rt/ports/ARMCMx/compilers/RVCT/chcoreasm_v7m.s
@@ -67,8 +67,18 @@ _port_switch PROC
#if CORTEX_USE_FPU
vpush {s16-s31}
#endif
- str sp, [r1, #CONTEXT_OFFSET]
+
+ str sp, [r1, #CONTEXT_OFFSET]
+#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
+ ((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
+ /* Workaround for ARM errata 752419, only applied if
+ condition exists for it to be triggered.*/
+ ldr r3, [r0, #CONTEXT_OFFSET]
+ mov sp, r3
+#else
ldr sp, [r0, #CONTEXT_OFFSET]
+#endif
+
#if CORTEX_USE_FPU
vpop {s16-s31}
#endif