summaryrefslogtreecommitdiffstats
path: root/cpukit/score/cpu/nios2/rtems/score/cpu.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2011-08-09 10:28:09 +0000
committerSebastian Huber <sebastian.huber@embedded-brains.de>2011-08-09 10:28:09 +0000
commit40ae1fd5e64e3e37d422dd204813a1295b3ffc9c (patch)
treed605db2a0f43d7ba125beae42b0a292b77d6f409 /cpukit/score/cpu/nios2/rtems/score/cpu.h
parent2011-08-08 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-40ae1fd5e64e3e37d422dd204813a1295b3ffc9c.tar.bz2
2011-08-09 Sebastian Huber <sebastian.huber@embedded-brains.de>
* cpu_asm.S, rtems/score/cpu.h: There is no need to save the global pointer (gp) in the thread register context since it is a system wide constant and set-up with the C runtime environment.
Diffstat (limited to 'cpukit/score/cpu/nios2/rtems/score/cpu.h')
-rw-r--r--cpukit/score/cpu/nios2/rtems/score/cpu.h40
1 files changed, 19 insertions, 21 deletions
diff --git a/cpukit/score/cpu/nios2/rtems/score/cpu.h b/cpukit/score/cpu/nios2/rtems/score/cpu.h
index 810671bb73..1d54aaa896 100644
--- a/cpukit/score/cpu/nios2/rtems/score/cpu.h
+++ b/cpukit/score/cpu/nios2/rtems/score/cpu.h
@@ -453,27 +453,27 @@ extern "C" {
*/
/**
- * @ingroup CPUContext Management
- * This defines the minimal set of integer and processor state registers
- * that must be saved during a voluntary context switch from one thread
- * to another.
+ * @brief Thread register context.
+ *
+ * The thread register context covers the non-volatile registers, the thread
+ * stack pointer, the return address, and the processor status.
+ *
+ * There is no need to save the global pointer (gp) since it is a system wide
+ * constant and set-up with the C runtime environment.
*/
typedef struct {
- uint32_t r16;
- uint32_t r17;
- uint32_t r18;
- uint32_t r19;
- uint32_t r20;
- uint32_t r21;
- uint32_t r22;
- uint32_t r23;
- uint32_t gp;
- uint32_t fp;
- uint32_t sp;
- uint32_t ra;
- uint32_t status;
- /* ienable? */
- /* ipending? */
+ uint32_t r16;
+ uint32_t r17;
+ uint32_t r18;
+ uint32_t r19;
+ uint32_t r20;
+ uint32_t r21;
+ uint32_t r22;
+ uint32_t r23;
+ uint32_t fp;
+ uint32_t sp;
+ uint32_t ra;
+ uint32_t status;
} Context_Control;
#define _CPU_Context_Get_SP( _context ) \
@@ -866,9 +866,7 @@ uint32_t _CPU_ISR_Get_level( void );
#define _CPU_Context_Initialize( _the_context, _stack_base, _size, \
_isr, _entry_point, _is_fp ) \
do { \
- extern char _gp[]; \
uint32_t _stack = (uint32_t)(_stack_base) + (_size) - 4; \
- (_the_context)->gp = (void *)_gp; \
(_the_context)->fp = (void *)_stack; \
(_the_context)->sp = (void *)_stack; \
(_the_context)->ra = (void *)(_entry_point); \