[PATCH 10/26] sparc: Rename CPU_Minimum_stack_frame

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


Rename SPARC-specific CPU_Minimum_stack_frame to
SPARC_Minimum_stack_frame.  Rename SPARC-specific
CPU_MINIMUM_STACK_FRAME_SIZE to SPARC_MINIMUM_STACK_FRAME_SIZE.

Update #2809.
---
 c/src/lib/libbsp/sparc/shared/irq_asm.S            |  8 ++--
 c/src/lib/libbsp/sparc/shared/start/start.S        |  2 +-
 cpukit/score/cpu/sparc/cpu.c                       |  2 +-
 cpukit/score/cpu/sparc/rtems/score/cpu.h           | 46 +++++++++++-----------
 cpukit/score/cpu/sparc/sparc-context-validate.S    |  2 +-
 .../cpu/sparc/sparc-context-volatile-clobber.S     |  2 +-
 6 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/c/src/lib/libbsp/sparc/shared/irq_asm.S b/c/src/lib/libbsp/sparc/shared/irq_asm.S
index 4a0c382..3143b10 100644
--- a/c/src/lib/libbsp/sparc/shared/irq_asm.S
+++ b/c/src/lib/libbsp/sparc/shared/irq_asm.S
@@ -26,7 +26,7 @@
 #include <bspopts.h>
 
 #if SPARC_HAS_FPU == 1 && defined(SPARC_USE_SAFE_FP_SUPPORT)
-  #define FP_FRAME_OFFSET_FO_F1 (CPU_MINIMUM_STACK_FRAME_SIZE + 0)
+  #define FP_FRAME_OFFSET_FO_F1 (SPARC_MINIMUM_STACK_FRAME_SIZE + 0)
   #define FP_FRAME_OFFSET_F2_F3 (FP_FRAME_OFFSET_FO_F1 + 8)
   #define FP_FRAME_OFFSET_F4_F5 (FP_FRAME_OFFSET_F2_F3 + 8)
   #define FP_FRAME_OFFSET_F6_F7 (FP_FRAME_OFFSET_F4_F5 + 8)
@@ -268,7 +268,7 @@ check_is_executing:
         .align 4
         PUBLIC(_CPU_Context_restore)
 SYM(_CPU_Context_restore):
-        save    %sp, -CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+        save    %sp, -SPARC_MINIMUM_STACK_FRAME_SIZE, %sp
         rd      %psr, %o2
 #if defined(RTEMS_SMP)
         ! On SPARC the restore path needs also a valid executing context on SMP
@@ -486,7 +486,7 @@ dont_switch_stacks:
          *  enable traps again.
          */
 
-        sub      %sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+        sub      %sp, SPARC_MINIMUM_STACK_FRAME_SIZE, %sp
 
         /*
          *  Check if we have an external interrupt (trap 0x11 - 0x1f). If so,
@@ -621,7 +621,7 @@ profiling_not_outer_most_exit:
          *  of the task and subsequent interrupts can operate normally.
          */
 
-        sub      %fp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+        sub      %fp, SPARC_MINIMUM_STACK_FRAME_SIZE, %sp
 
         or      %l0, SPARC_PSR_ET_MASK, %l7    ! l7 = PSR with ET=1
         mov     %l7, %psr                      !  **** ENABLE TRAPS ****
diff --git a/c/src/lib/libbsp/sparc/shared/start/start.S b/c/src/lib/libbsp/sparc/shared/start/start.S
index 46498b8..a7ef9fe 100644
--- a/c/src/lib/libbsp/sparc/shared/start/start.S
+++ b/c/src/lib/libbsp/sparc/shared/start/start.S
@@ -289,7 +289,7 @@ SYM(hard_reset):
 	mov	%sp, %fp		! set frame pointer
 
 	call	SYM(bsp_start_on_secondary_processor) ! does not return
-	 sub	%sp, CPU_MINIMUM_STACK_FRAME_SIZE, %sp
+	 sub	%sp, SPARC_MINIMUM_STACK_FRAME_SIZE, %sp
 cpu0:
 #endif
 
diff --git a/cpukit/score/cpu/sparc/cpu.c b/cpukit/score/cpu/sparc/cpu.c
index 899ed40..5afad17 100644
--- a/cpukit/score/cpu/sparc/cpu.c
+++ b/cpukit/score/cpu/sparc/cpu.c
@@ -343,7 +343,7 @@ void _CPU_Context_Initialize(
      */
 
     the_context->o7    = ((uint32_t) entry_point) - 8;
-    the_context->o6_sp = stack_high - CPU_MINIMUM_STACK_FRAME_SIZE;
+    the_context->o6_sp = stack_high - SPARC_MINIMUM_STACK_FRAME_SIZE;
     the_context->i6_fp = 0;
 
     /*
diff --git a/cpukit/score/cpu/sparc/rtems/score/cpu.h b/cpukit/score/cpu/sparc/rtems/score/cpu.h
index e7fc3b2..f0f8110 100644
--- a/cpukit/score/cpu/sparc/rtems/score/cpu.h
+++ b/cpukit/score/cpu/sparc/rtems/score/cpu.h
@@ -291,7 +291,7 @@ typedef struct {
   uint32_t    saved_arg5;
   /** This field pads the structure so ldd and std instructions can be used. */
   uint32_t    pad0;
-}  CPU_Minimum_stack_frame;
+} SPARC_Minimum_stack_frame;
 
 #endif /* ASM */
 
@@ -345,7 +345,7 @@ typedef struct {
 #define CPU_STACK_FRAME_PAD0_OFFSET           0x5c
 
 /** This defines the size of the minimum stack frame. */
-#define CPU_MINIMUM_STACK_FRAME_SIZE          0x60
+#define SPARC_MINIMUM_STACK_FRAME_SIZE          0x60
 
 #define CPU_MAXIMUM_PROCESSORS 32
 
@@ -638,7 +638,7 @@ typedef struct {
  */
 typedef struct {
   /** On an interrupt, we must save the minimum stack frame. */
-  CPU_Minimum_stack_frame  Stack_frame;
+  SPARC_Minimum_stack_frame Stack_frame;
   /** This is the offset of the PSR on an ISF. */
   uint32_t                 psr;
   /** This is the offset of the XXX on an ISF. */
@@ -688,47 +688,47 @@ typedef struct {
  */
 
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_PSR_OFFSET         CPU_MINIMUM_STACK_FRAME_SIZE + 0x00
+#define ISF_PSR_OFFSET         SPARC_MINIMUM_STACK_FRAME_SIZE + 0x00
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_PC_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x04
+#define ISF_PC_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x04
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_NPC_OFFSET         CPU_MINIMUM_STACK_FRAME_SIZE + 0x08
+#define ISF_NPC_OFFSET         SPARC_MINIMUM_STACK_FRAME_SIZE + 0x08
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G1_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x0c
+#define ISF_G1_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x0c
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G2_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x10
+#define ISF_G2_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x10
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G3_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x14
+#define ISF_G3_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x14
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G4_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x18
+#define ISF_G4_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x18
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G5_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x1c
+#define ISF_G5_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x1c
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_G7_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x24
+#define ISF_G7_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x24
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I0_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x28
+#define ISF_I0_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x28
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I1_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x2c
+#define ISF_I1_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x2c
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I2_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x30
+#define ISF_I2_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x30
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I3_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x34
+#define ISF_I3_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x34
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I4_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x38
+#define ISF_I4_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x38
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I5_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x3c
+#define ISF_I5_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x3c
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I6_FP_OFFSET       CPU_MINIMUM_STACK_FRAME_SIZE + 0x40
+#define ISF_I6_FP_OFFSET       SPARC_MINIMUM_STACK_FRAME_SIZE + 0x40
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_I7_OFFSET          CPU_MINIMUM_STACK_FRAME_SIZE + 0x44
+#define ISF_I7_OFFSET          SPARC_MINIMUM_STACK_FRAME_SIZE + 0x44
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_Y_OFFSET           CPU_MINIMUM_STACK_FRAME_SIZE + 0x48
+#define ISF_Y_OFFSET           SPARC_MINIMUM_STACK_FRAME_SIZE + 0x48
 /** This macro defines an offset into the ISF for use in assembly. */
-#define ISF_TPC_OFFSET         CPU_MINIMUM_STACK_FRAME_SIZE + 0x4c
+#define ISF_TPC_OFFSET         SPARC_MINIMUM_STACK_FRAME_SIZE + 0x4c
 
 /** This defines the size of the ISF area for use in assembly. */
 #define CONTEXT_CONTROL_INTERRUPT_FRAME_SIZE \
-        CPU_MINIMUM_STACK_FRAME_SIZE + 0x50
+        SPARC_MINIMUM_STACK_FRAME_SIZE + 0x50
 
 #ifndef ASM
 /**
diff --git a/cpukit/score/cpu/sparc/sparc-context-validate.S b/cpukit/score/cpu/sparc/sparc-context-validate.S
index 699c94a..af77721 100644
--- a/cpukit/score/cpu/sparc/sparc-context-validate.S
+++ b/cpukit/score/cpu/sparc/sparc-context-validate.S
@@ -19,7 +19,7 @@
 #include <rtems/asm.h>
 #include <rtems/score/cpu.h>
 
-#define FRAME_OFFSET_BUFFER_0 (CPU_MINIMUM_STACK_FRAME_SIZE)
+#define FRAME_OFFSET_BUFFER_0 (SPARC_MINIMUM_STACK_FRAME_SIZE)
 #define FRAME_OFFSET_BUFFER_1 (FRAME_OFFSET_BUFFER_0 + 0x04)
 #define FRAME_OFFSET_BUFFER_2 (FRAME_OFFSET_BUFFER_1 + 0x04)
 #define FRAME_OFFSET_L0 (FRAME_OFFSET_BUFFER_2 + 0x04)
diff --git a/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S b/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
index 6e364cd..feed22b 100644
--- a/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
+++ b/cpukit/score/cpu/sparc/sparc-context-volatile-clobber.S
@@ -19,7 +19,7 @@
 #include <rtems/asm.h>
 #include <rtems/score/cpu.h>
 
-#define SCRATCH_0 (CPU_MINIMUM_STACK_FRAME_SIZE)
+#define SCRATCH_0 (SPARC_MINIMUM_STACK_FRAME_SIZE)
 #define SCRATCH_1 (SCRATCH_0 + 0x04)
 #define FRAME_END (SCRATCH_1 + 0x04)
 #define FRAME_SIZE \
-- 
1.8.4.5




More information about the devel mailing list