diff options
Diffstat (limited to 'os/nil')
-rw-r--r-- | os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s index 298110f09..a98802798 100644 --- a/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s +++ b/os/nil/ports/ARMCMx/compilers/GCC/nilcoreasm_v7m.s @@ -64,8 +64,18 @@ _port_switch: #if CORTEX_USE_FPU
vpush {s16-s31}
#endif
+
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
|