aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-07 11:54:32 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-04-07 11:54:32 +0000
commitec36599e62379bb43d164a039e1e5a5b17bc131c (patch)
treee4d78a195376128bee7bca9fc1237a27c97cc9ce /os/ports/GCC
parent3076655c398c84a8a8ab79e9364693233df7e006 (diff)
downloadChibiOS-ec36599e62379bb43d164a039e1e5a5b17bc131c.tar.gz
ChibiOS-ec36599e62379bb43d164a039e1e5a5b17bc131c.tar.bz2
ChibiOS-ec36599e62379bb43d164a039e1e5a5b17bc131c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1857 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/ports/GCC')
-rw-r--r--os/ports/GCC/ARMCMx/chcore_v7m.c38
-rw-r--r--os/ports/GCC/ARMCMx/chcore_v7m.h3
2 files changed, 1 insertions, 40 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.c b/os/ports/GCC/ARMCMx/chcore_v7m.c
index d199afdad..c8b2f3af6 100644
--- a/os/ports/GCC/ARMCMx/chcore_v7m.c
+++ b/os/ports/GCC/ARMCMx/chcore_v7m.c
@@ -53,43 +53,6 @@ void SysTickVector(void) {
chSysUnlockFromIsr();
}
-#if CORTEX_MODEL == CORTEX_M0
-#define PUSH_CONTEXT(sp, prio) { \
- asm volatile ("mrs %0, PSP \n\t" \
- "sub %0, %0, #40 \n\t" \
- "stmia %0!, {r3-r7} \n\t" \
- "sub %0, %0, #20 \n\t" \
- "mov r3, r8 \n\t" \
- "str r3, [%0, #20] \n\t" \
- "mov r3, r9 \n\t" \
- "str r3, [%0, #24] \n\t" \
- "mov r3, r10 \n\t" \
- "str r3, [%0, #28] \n\t" \
- "mov r3, r11 \n\t" \
- "str r3, [%0, #32] \n\t" \
- "mov r3, lr \n\t" \
- "str r3, [%0, #36] \n\t" \
- : "=r" (sp) : "r" (sp), "r" (prio)); \
-}
-
-#define POP_CONTEXT(sp) { \
- asm volatile ("ldr r3, [%0, #20] \n\t" \
- "mov r8, r3 \n\t" \
- "ldr r3, [%0, #24] \n\t" \
- "mov r9, r3 \n\t" \
- "ldr r3, [%0, #28] \n\t" \
- "mov r10, r3 \n\t" \
- "ldr r3, [%0, #32] \n\t" \
- "mov r11, r3 \n\t" \
- "ldr r3, [%0, #36] \n\t" \
- "mov lr, r3 \n\t" \
- "ldmia %0!, {r3-r7} \n\t" \
- "add %0, %0, #20 \n\t" \
- "msr PSP, %0 \n\t" \
- "msr BASEPRI, r3 \n\t" \
- "bx lr" : "=r" (sp) : "r" (sp)); \
-}
-#else /* CORTEX_MODEL != CORTEX_M0 */
#if !defined(CH_CURRP_REGISTER_CACHE)
#define PUSH_CONTEXT(sp, prio) { \
asm volatile ("mrs %0, PSP \n\t" \
@@ -117,7 +80,6 @@ void SysTickVector(void) {
"bx lr" : "=r" (sp) : "r" (sp)); \
}
#endif /* defined(CH_CURRP_REGISTER_CACHE) */
-#endif /* CORTEX_MODEL != CORTEX_M0 */
/**
* @brief SVC vector.
diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.h b/os/ports/GCC/ARMCMx/chcore_v7m.h
index b575376ea..150fa41fa 100644
--- a/os/ports/GCC/ARMCMx/chcore_v7m.h
+++ b/os/ports/GCC/ARMCMx/chcore_v7m.h
@@ -263,7 +263,7 @@ struct intctx {
* @param[in] ntp the thread to be switched in
* @param[in] otp the thread to be switched out
*/
-static INLINE Thread *port_switch(Thread *ntp, Thread *otp) {
+static INLINE void port_switch(Thread *ntp, Thread *otp) {
register Thread *_ntp asm ("r0") = (ntp);
register Thread *_otp asm ("r1") = (otp);
#if CH_DBG_ENABLE_STACK_CHECK
@@ -273,7 +273,6 @@ static INLINE Thread *port_switch(Thread *ntp, Thread *otp) {
"b chDbgPanic");
#endif /* CH_DBG_ENABLE_STACK_CHECK */
asm volatile ("svc #0" : : "r" (_otp), "r" (_ntp) : "memory");
- return _otp;
}
#ifdef __cplusplus