[PATCH 09/26] sparc64: Rename CPU_Minimum_stack_frame

Sebastian Huber sebastian.huber at embedded-brains.de
Tue Nov 15 13:51:41 UTC 2016


Rename SPARC64-specific CPU_Minimum_stack_frame to
SPARC64_Minimum_stack_frame.  Rename SPARC64-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC64_MINIMUM_STACK_FRAME_SIZE.

Update #2809.
---
 c/src/lib/libbsp/sparc64/shared/start/start.S     |  4 +-
 c/src/lib/libcpu/sparc64/shared/score/interrupt.S |  2 +-
 cpukit/score/cpu/sparc64/context.S                |  6 +--
 cpukit/score/cpu/sparc64/cpu.c                    |  2 +-
 cpukit/score/cpu/sparc64/rtems/score/cpu.h        | 52 +++++++++++------------
 5 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/c/src/lib/libbsp/sparc64/shared/start/start.S b/c/src/lib/libbsp/sparc64/shared/start/start.S
index ca85d69..56ecc05 100644
--- a/c/src/lib/libbsp/sparc64/shared/start/start.S
+++ b/c/src/lib/libbsp/sparc64/shared/start/start.S
@@ -140,10 +140,10 @@ halted:	nop
 
 .section BOOTSTRAP
   .align CPU_ALIGNMENT
-  .space 32768 - CPU_MINIMUM_STACK_FRAME_SIZE ! 32K boot stack grows down
+  .space 32768 - SPARC64_MINIMUM_STACK_FRAME_SIZE ! 32K boot stack grows down
   .global StackStart
   StackStart:
-    .space CPU_MINIMUM_STACK_FRAME_SIZE ! initial stack frame
+    .space SPARC64_MINIMUM_STACK_FRAME_SIZE ! initial stack frame
 
 .section BOOTSTRAP
   .align CPU_ALIGNMENT
diff --git a/c/src/lib/libcpu/sparc64/shared/score/interrupt.S b/c/src/lib/libcpu/sparc64/shared/score/interrupt.S
index 5aee91a..6f8eb37 100644
--- a/c/src/lib/libcpu/sparc64/shared/score/interrupt.S
+++ b/c/src/lib/libcpu/sparc64/shared/score/interrupt.S
@@ -197,7 +197,7 @@ PUBLIC(_ISR_Handler)
    *  enable traps again.
    */
 
-  sub      %sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+  sub      %sp, SPARC64_MINIMUM_STACK_FRAME_SIZE, %sp
 
   dont_switch_stacks:
   /*
diff --git a/cpukit/score/cpu/sparc64/context.S b/cpukit/score/cpu/sparc64/context.S
index 8bd0219..e83507d 100644
--- a/cpukit/score/cpu/sparc64/context.S
+++ b/cpukit/score/cpu/sparc64/context.S
@@ -39,7 +39,7 @@
   .align 4
 PUBLIC(_CPU_Context_save_fp)
   SYM(_CPU_Context_save_fp):
-    save    %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+    save    %sp, -SPARC64_MINIMUM_STACK_FRAME_SIZE, %sp
 
     /*
      *  The following enables the floating point unit.
@@ -105,7 +105,7 @@ PUBLIC(_CPU_Context_save_fp)
   .align 4
 PUBLIC(_CPU_Context_restore_fp)
   SYM(_CPU_Context_restore_fp):
-    save    %sp, -CPU_MINIMUM_STACK_FRAME_SIZE , %sp
+    save    %sp, -SPARC64_MINIMUM_STACK_FRAME_SIZE , %sp
 
     /*
      *  The following enables the floating point unit.
@@ -300,7 +300,7 @@ PUBLIC(_CPU_Context_restore_heir)
   .align 4
 PUBLIC(_CPU_Context_restore)
   SYM(_CPU_Context_restore):
-    save    %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+    save    %sp, -SPARC64_MINIMUM_STACK_FRAME_SIZE, %sp
 !    rdpr    %pstate, %o2
     ba      SYM(_CPU_Context_restore_heir)
     mov     %i0, %o1                      ! in the delay slot
diff --git a/cpukit/score/cpu/sparc64/cpu.c b/cpukit/score/cpu/sparc64/cpu.c
index 512ab90..93a4573 100644
--- a/cpukit/score/cpu/sparc64/cpu.c
+++ b/cpukit/score/cpu/sparc64/cpu.c
@@ -90,7 +90,7 @@ void _CPU_Context_Initialize(
      */
 
     the_context->o7    = ((uint64_t) entry_point) - 8;
-    the_context->o6_sp = stack_high - CPU_MINIMUM_STACK_FRAME_SIZE - STACK_BIAS;
+    the_context->o6_sp = stack_high - SPARC64_MINIMUM_STACK_FRAME_SIZE - STACK_BIAS;
     the_context->i6_fp = 0;
 
     /* ABI uses g4 as segment register, make sure it is zeroed */
diff --git a/cpukit/score/cpu/sparc64/rtems/score/cpu.h b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
index 8e4012e..4e95784 100644
--- a/cpukit/score/cpu/sparc64/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc64/rtems/score/cpu.h
@@ -238,7 +238,7 @@ typedef struct {
   uint64_t    saved_arg4;
   uint64_t    saved_arg5;
   uint64_t    pad0;
-}  CPU_Minimum_stack_frame;
+} SPARC64_Minimum_stack_frame;
 
 #endif /* !ASM */
 
@@ -267,7 +267,7 @@ typedef struct {
 #define CPU_STACK_FRAME_SAVED_ARG5_OFFSET     0xB0
 #define CPU_STACK_FRAME_PAD0_OFFSET           0xB8
 
-#define CPU_MINIMUM_STACK_FRAME_SIZE          0xC0
+#define SPARC64_MINIMUM_STACK_FRAME_SIZE          0xC0
 
 /*
  * Contexts
@@ -474,7 +474,7 @@ typedef struct {
  */
 
 typedef struct {
-  CPU_Minimum_stack_frame  Stack_frame;
+  SPARC64_Minimum_stack_frame Stack_frame;
   uint64_t                 tstate;
   uint64_t                 tpc;
   uint64_t                 tnpc;
@@ -504,29 +504,29 @@ typedef struct {
  *  Offsets of fields with CPU_Interrupt_frame for assembly routines.
  */
 
-#define ISF_TSTATE_OFFSET      CPU_MINIMUM_STACK_FRAME_SIZE + 0x00
-#define ISF_TPC_OFFSET         CPU_MINIMUM_STACK_FRAME_SIZE + 0x08
-#define ISF_TNPC_OFFSET        CPU_MINIMUM_STACK_FRAME_SIZE + 0x10
-#define ISF_PIL_OFFSET         CPU_MINIMUM_STACK_FRAME_SIZE + 0x18
-#define ISF_Y_OFFSET           CPU_MINIMUM_STACK_FRAME_SIZE + 0x20
-#define ISF_G1_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x28
-#define ISF_G2_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x30
-#define ISF_G3_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x38
-#define ISF_G4_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x40
-#define ISF_G5_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x48
-#define ISF_G6_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x50
-#define ISF_G7_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x58
-#define ISF_O0_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x60
-#define ISF_O1_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x68
-#define ISF_O2_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x70
-#define ISF_O3_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x78
-#define ISF_O4_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x80
-#define ISF_O5_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x88
-#define ISF_O6_SP_OFFSET       CPU_MINIMUM_STACK_FRAME_SIZE + 0x90
-#define ISF_O7_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x98
-#define ISF_TVEC_OFFSET        CPU_MINIMUM_STACK_FRAME_SIZE + 0xA0
-
-#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE CPU_MINIMUM_STACK_FRAME_SIZE + 0xA8
+#define ISF_TSTATE_OFFSET      SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x00
+#define ISF_TPC_OFFSET         SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x08
+#define ISF_TNPC_OFFSET        SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x10
+#define ISF_PIL_OFFSET         SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x18
+#define ISF_Y_OFFSET           SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x20
+#define ISF_G1_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x28
+#define ISF_G2_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x30
+#define ISF_G3_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x38
+#define ISF_G4_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x40
+#define ISF_G5_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x48
+#define ISF_G6_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x50
+#define ISF_G7_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x58
+#define ISF_O0_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x60
+#define ISF_O1_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x68
+#define ISF_O2_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x70
+#define ISF_O3_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x78
+#define ISF_O4_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x80
+#define ISF_O5_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x88
+#define ISF_O6_SP_OFFSET       SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x90
+#define ISF_O7_OFFSET          SPARC64_MINIMUM_STACK_FRAME_SIZE + 0x98
+#define ISF_TVEC_OFFSET        SPARC64_MINIMUM_STACK_FRAME_SIZE + 0xA0
+
+#define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE SPARC64_MINIMUM_STACK_FRAME_SIZE + 0xA8
 #ifndef ASM
 /*
  *  This variable is contains the initialize context for the FP unit.
-- 
1.8.4.5




More information about the devel mailing list