[rtems commit] ARM: PR2042: Provide stub for ARMv6-M

Sebastian Huber sebh at rtems.org
Tue Mar 27 15:39:59 UTC 2012


Module:    rtems
Branch:    master
Commit:    f442e6b45cfd91e68839510e3a2b4131d16ab593
Changeset: http://git.rtems.org/rtems/commit/?id=f442e6b45cfd91e68839510e3a2b4131d16ab593

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar 27 17:37:00 2012 +0200

ARM: PR2042: Provide stub for ARMv6-M

---

 cpukit/score/cpu/arm/rtems/score/arm.h |    1 -
 cpukit/score/cpu/arm/rtems/score/cpu.h |   16 +++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/cpukit/score/cpu/arm/rtems/score/arm.h b/cpukit/score/cpu/arm/rtems/score/arm.h
index 91d2756..5275b0b 100644
--- a/cpukit/score/cpu/arm/rtems/score/arm.h
+++ b/cpukit/score/cpu/arm/rtems/score/arm.h
@@ -76,7 +76,6 @@ extern "C" {
 
 #elif defined(__ARM_ARCH_6M__)
 #  define CPU_MODEL_NAME  "ARMv6M"
-#  define ARM_MULTILIB_ARCH_V7M
 
 #elif defined(__ARM_ARCH_7__)
 #  define CPU_MODEL_NAME  "ARMv7"
diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index 2543dde..f098db3 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -246,6 +246,8 @@ typedef struct {
   void *register_lr;
   void *register_sp;
   uint32_t isr_nest_level;
+#else
+  void *register_sp;
 #endif
 } Context_Control;
 
@@ -259,9 +261,10 @@ extern uint32_t arm_cpu_mode;
 
 static inline uint32_t arm_interrupt_disable( void )
 {
+  uint32_t level;
+
 #if defined(ARM_MULTILIB_ARCH_V4)
   uint32_t arm_switch_reg;
-  uint32_t level;
 
   __asm__ volatile (
     ARM_SWITCH_TO_ARM
@@ -271,10 +274,7 @@ static inline uint32_t arm_interrupt_disable( void )
     ARM_SWITCH_BACK
     : [arm_switch_reg] "=&r" (arm_switch_reg), [level] "=&r" (level)
   );
-
-  return level;
 #elif defined(ARM_MULTILIB_ARCH_V7M)
-  uint32_t level;
   uint32_t basepri = 0x80;
 
   __asm__ volatile (
@@ -283,9 +283,11 @@ static inline uint32_t arm_interrupt_disable( void )
     : [level] "=&r" (level)
     : [basepri] "r" (basepri)
   );
+#else
+  level = 0;
+#endif
 
   return level;
-#endif
 }
 
 static inline void arm_interrupt_enable( uint32_t level )
@@ -564,11 +566,11 @@ typedef struct {
 
 typedef CPU_Exception_frame CPU_Interrupt_frame;
 
-#elif defined(ARM_MULTILIB_ARCH_V7M)
+#else /* !defined(ARM_MULTILIB_ARCH_V4) */
 
 typedef void CPU_Interrupt_frame;
 
-#endif /* defined(ARM_MULTILIB_ARCH_V7M) */
+#endif /* !defined(ARM_MULTILIB_ARCH_V4) */
 
 #ifdef __cplusplus
 }




More information about the vc mailing list