aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/GCC')
-rw-r--r--os/ports/GCC/ARM/chcore.h14
-rw-r--r--os/ports/GCC/ARMCMx/old/chcore_v7m.c15
-rw-r--r--os/ports/GCC/ARMCMx/old/chcore_v7m.h10
-rw-r--r--os/ports/GCC/AVR/chcore.c4
-rw-r--r--os/ports/GCC/AVR/chcore.h14
-rw-r--r--os/ports/GCC/MSP430/chcore.h12
-rw-r--r--os/ports/GCC/PPC/chcore.h12
-rw-r--r--os/ports/GCC/SIMIA32/chcore.h10
8 files changed, 34 insertions, 57 deletions
diff --git a/os/ports/GCC/ARM/chcore.h b/os/ports/GCC/ARM/chcore.h
index b67fb9c1b..5a36d82c8 100644
--- a/os/ports/GCC/ARM/chcore.h
+++ b/os/ports/GCC/ARM/chcore.h
@@ -155,9 +155,7 @@ struct intctx {
regarm_t r4;
regarm_t r5;
regarm_t r6;
-#ifndef CH_CURRP_REGISTER_CACHE
regarm_t r7;
-#endif
regarm_t r8;
regarm_t r9;
regarm_t r10;
@@ -192,12 +190,12 @@ struct context {
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
* @note In this port it is set to 4 because the idle thread does have
* a stack frame when compiling without optimizations.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 4
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 4
#endif
/**
@@ -210,8 +208,8 @@ struct context {
* @note In this port 0x10 is a safe value, it can be reduced after careful
* analysis of the generated code.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 0x10
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 0x10
#endif
/**
@@ -225,7 +223,7 @@ struct context {
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* @brief Static working area allocation.
diff --git a/os/ports/GCC/ARMCMx/old/chcore_v7m.c b/os/ports/GCC/ARMCMx/old/chcore_v7m.c
index bd888cd01..244ff396e 100644
--- a/os/ports/GCC/ARMCMx/old/chcore_v7m.c
+++ b/os/ports/GCC/ARMCMx/old/chcore_v7m.c
@@ -54,7 +54,6 @@ void SysTickVector(void) {
chSysUnlockFromIsr();
}
-#if !defined(CH_CURRP_REGISTER_CACHE)
#define PUSH_CONTEXT(sp, prio) { \
asm volatile ("mrs %0, PSP \n\t" \
"stmdb %0!, {r3-r11,lr}" : \
@@ -67,20 +66,6 @@ void SysTickVector(void) {
"msr BASEPRI, r3 \n\t" \
"bx lr" : "=r" (sp) : "r" (sp)); \
}
-#else /* defined(CH_CURRP_REGISTER_CACHE) */
-#define PUSH_CONTEXT(sp, prio) { \
- asm volatile ("mrs %0, PSP \n\t" \
- "stmdb %0!, {r3-r6,r8-r11, lr}" : \
- "=r" (sp) : "r" (sp), "r" (prio)); \
-}
-
-#define POP_CONTEXT(sp) { \
- asm volatile ("ldmia %0!, {r3-r6,r8-r11, lr} \n\t" \
- "msr PSP, %0 \n\t" \
- "msr BASEPRI, r3 \n\t" \
- "bx lr" : "=r" (sp) : "r" (sp)); \
-}
-#endif /* defined(CH_CURRP_REGISTER_CACHE) */
/**
* @brief SVC vector.
diff --git a/os/ports/GCC/ARMCMx/old/chcore_v7m.h b/os/ports/GCC/ARMCMx/old/chcore_v7m.h
index 93e701202..b94afdca3 100644
--- a/os/ports/GCC/ARMCMx/old/chcore_v7m.h
+++ b/os/ports/GCC/ARMCMx/old/chcore_v7m.h
@@ -96,12 +96,12 @@ struct intctx {
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
* @note In this port it is set to 4 because the idle thread does have
* a stack frame when compiling without optimizations.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 4
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 4
#endif
/**
@@ -113,8 +113,8 @@ struct intctx {
* @p extctx is known to be zero.
* @note This port requires no extra stack space for interrupt handling.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 0
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 0
#endif
/**
diff --git a/os/ports/GCC/AVR/chcore.c b/os/ports/GCC/AVR/chcore.c
index 166c0d1b1..7cb0dda07 100644
--- a/os/ports/GCC/AVR/chcore.c
+++ b/os/ports/GCC/AVR/chcore.c
@@ -51,10 +51,8 @@ void port_switch(Thread *ntp, Thread *otp) {
asm volatile ("push r5");
asm volatile ("push r6");
asm volatile ("push r7");
-#ifndef CH_CURRP_REGISTER_CACHE
asm volatile ("push r8");
asm volatile ("push r9");
-#endif
asm volatile ("push r10");
asm volatile ("push r11");
asm volatile ("push r12");
@@ -88,10 +86,8 @@ void port_switch(Thread *ntp, Thread *otp) {
asm volatile ("pop r12");
asm volatile ("pop r11");
asm volatile ("pop r10");
-#ifndef CH_CURRP_REGISTER_CACHE
asm volatile ("pop r9");
asm volatile ("pop r8");
-#endif
asm volatile ("pop r7");
asm volatile ("pop r6");
asm volatile ("pop r5");
diff --git a/os/ports/GCC/AVR/chcore.h b/os/ports/GCC/AVR/chcore.h
index 4377c5047..5e1c4d954 100644
--- a/os/ports/GCC/AVR/chcore.h
+++ b/os/ports/GCC/AVR/chcore.h
@@ -105,10 +105,8 @@ struct intctx {
uint8_t r12;
uint8_t r11;
uint8_t r10;
-#ifndef CH_CURRP_REGISTER_CACHE
uint8_t r9;
uint8_t r8;
-#endif
uint8_t r7;
uint8_t r6;
uint8_t r5;
@@ -149,11 +147,11 @@ struct context {
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
* @note In this port it is set to 8.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 8
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 8
#endif
/**
@@ -165,8 +163,8 @@ struct context {
* @p extctx is known to be zero.
* @note In this port the default is 32 bytes per thread.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 32
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 32
#endif
/**
@@ -180,7 +178,7 @@ struct context {
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
(sizeof(struct intctx) - 1) + \
(sizeof(struct extctx) - 1) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* @brief Static working area allocation.
diff --git a/os/ports/GCC/MSP430/chcore.h b/os/ports/GCC/MSP430/chcore.h
index 5cb88ab3d..f70a34438 100644
--- a/os/ports/GCC/MSP430/chcore.h
+++ b/os/ports/GCC/MSP430/chcore.h
@@ -122,10 +122,10 @@ struct context {
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 0
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 0
#endif
/**
@@ -137,8 +137,8 @@ struct context {
* @p extctx is known to be zero.
* @note In this port the default is 32 bytes per thread.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 32
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 32
#endif
/**
@@ -152,7 +152,7 @@ struct context {
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* @brief Static working area allocation.
diff --git a/os/ports/GCC/PPC/chcore.h b/os/ports/GCC/PPC/chcore.h
index 058379923..30e5f717c 100644
--- a/os/ports/GCC/PPC/chcore.h
+++ b/os/ports/GCC/PPC/chcore.h
@@ -185,10 +185,10 @@ struct context {
* @brief Stack size for the system idle thread.
* @details This size depends on the idle thread implementation, usually
* the idle thread should take no more space than those reserved
- * by @p INT_REQUIRED_STACK.
+ * by @p PORT_INT_REQUIRED_STACK.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 0
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 0
#endif
/**
@@ -199,8 +199,8 @@ struct context {
* separate interrupt stack and the stack space between @p intctx and
* @p extctx is known to be zero.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 128
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 128
#endif
/**
@@ -214,7 +214,7 @@ struct context {
#define THD_WA_SIZE(n) STACK_ALIGN(sizeof(Thread) + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* @brief Static working area allocation.
diff --git a/os/ports/GCC/SIMIA32/chcore.h b/os/ports/GCC/SIMIA32/chcore.h
index 266cfd955..05dc05db4 100644
--- a/os/ports/GCC/SIMIA32/chcore.h
+++ b/os/ports/GCC/SIMIA32/chcore.h
@@ -108,8 +108,8 @@ struct context {
/**
* Stack size for the system idle thread.
*/
-#ifndef IDLE_THREAD_STACK_SIZE
-#define IDLE_THREAD_STACK_SIZE 256
+#ifndef PORT_IDLE_THREAD_STACK_SIZE
+#define PORT_IDLE_THREAD_STACK_SIZE 256
#endif
/**
@@ -118,8 +118,8 @@ struct context {
* It requires stack space because the simulated "interrupt handlers" can
* invoke host library functions inside so it better have a lot of space.
*/
-#ifndef INT_REQUIRED_STACK
-#define INT_REQUIRED_STACK 16384
+#ifndef PORT_INT_REQUIRED_STACK
+#define PORT_INT_REQUIRED_STACK 16384
#endif
/**
@@ -134,7 +134,7 @@ struct context {
sizeof(void *) * 4 + \
sizeof(struct intctx) + \
sizeof(struct extctx) + \
- (n) + (INT_REQUIRED_STACK))
+ (n) + (PORT_INT_REQUIRED_STACK))
/**
* Macro used to allocate a thread working area aligned as both position and