change log for rtems (2011-08-09)

rtems-vc at rtems.org rtems-vc at rtems.org
Tue Aug 9 11:10:20 UTC 2011


 *sh*:
2011-08-09	Sebastian Huber <sebastian.huber at 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.

M   1.30  cpukit/score/cpu/nios2/ChangeLog
M    1.7  cpukit/score/cpu/nios2/cpu_asm.S
M   1.18  cpukit/score/cpu/nios2/rtems/score/cpu.h

diff -u rtems/cpukit/score/cpu/nios2/ChangeLog:1.29 rtems/cpukit/score/cpu/nios2/ChangeLog:1.30
--- rtems/cpukit/score/cpu/nios2/ChangeLog:1.29	Sun Jul 24 18:43:07 2011
+++ rtems/cpukit/score/cpu/nios2/ChangeLog	Tue Aug  9 05:28:09 2011
@@ -1,3 +1,9 @@
+2011-08-09	Sebastian Huber <sebastian.huber at 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.
+
 2011-07-24	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* cpu.c: Remove /*PAGE markers which were interpreted by a long dead

diff -u rtems/cpukit/score/cpu/nios2/cpu_asm.S:1.6 rtems/cpukit/score/cpu/nios2/cpu_asm.S:1.7
--- rtems/cpukit/score/cpu/nios2/cpu_asm.S:1.6	Sat Mar 27 10:02:21 2010
+++ rtems/cpukit/score/cpu/nios2/cpu_asm.S	Tue Aug  9 05:28:09 2011
@@ -46,12 +46,11 @@
     stw r21, 20(r4)
     stw r22, 24(r4)
     stw r23, 28(r4)
-    stw gp,  32(r4)
-    stw fp,  36(r4)
-    stw sp,  40(r4)
-    stw ra,  44(r4)
+    stw fp,  32(r4)
+    stw sp,  36(r4)
+    stw ra,  40(r4)
     /* r6 saved status */
-    stw r6,  48(r4)
+    stw r6,  44(r4)
 
 _CPU_Context_switch_restore:
 
@@ -63,15 +62,14 @@
     ldw r21, 20(r5)
     ldw r22, 24(r5)
     ldw r23, 28(r5)
-    ldw gp,  32(r5)
-    ldw fp,  36(r5)
-    ldw sp,  40(r5)
+    ldw fp,  32(r5)
+    ldw sp,  36(r5)
 
     /* Disable interrupts */
     wrctl status, r0
 
-    ldw ea,  44(r5)
-    ldw at,  48(r5)
+    ldw ea,  40(r5)
+    ldw at,  44(r5)
     /* FIXME: Always have interrupts enabled when we return from Context_switch */
     ori at, at, 1
     wrctl estatus, at

diff -u rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.17 rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.18
--- rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h:1.17	Thu Oct 21 17:14:02 2010
+++ rtems/cpukit/score/cpu/nios2/rtems/score/cpu.h	Tue Aug  9 05:28:09 2011
@@ -453,27 +453,27 @@
  */
 
 /**
- *  @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 @@
 #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); \



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20110809/6a9cabee/attachment.html>


More information about the vc mailing list