[rtems commit] arm: Provide CPU_Exception_frame for ARMv7-M

Sebastian Huber sebh at rtems.org
Mon Jan 7 14:05:04 UTC 2013


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Jan  7 08:39:45 2013 +0100

arm: Provide CPU_Exception_frame for ARMv7-M

---

 cpukit/score/cpu/arm/rtems/score/cpu.h |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/cpukit/score/cpu/arm/rtems/score/cpu.h b/cpukit/score/cpu/arm/rtems/score/cpu.h
index ed1ce3b..0083112 100644
--- a/cpukit/score/cpu/arm/rtems/score/cpu.h
+++ b/cpukit/score/cpu/arm/rtems/score/cpu.h
@@ -482,14 +482,14 @@ static inline uint16_t CPU_swap_u16( uint16_t value )
 
 /** @} */
 
-#if defined(ARM_MULTILIB_ARCH_V4)
-
 /**
  * @addtogroup ScoreCPUARM
  *
  * @{
  */
 
+#if defined(ARM_MULTILIB_ARCH_V4)
+
 typedef enum {
   ARM_EXCEPTION_RESET = 0,
   ARM_EXCEPTION_UNDEF = 1,
@@ -503,7 +503,7 @@ typedef enum {
   ARM_EXCEPTION_MAKE_ENUM_32_BIT = 0xffffffff
 } Arm_symbolic_exception_name;
 
-/** @} */
+#endif /* defined(ARM_MULTILIB_ARCH_V4) */
 
 typedef struct {
   uint32_t register_r0;
@@ -520,27 +520,25 @@ typedef struct {
   uint32_t register_r11;
   uint32_t register_r12;
   uint32_t register_sp;
-  uint32_t register_lr;
-  uint32_t register_pc;
+  void *register_lr;
+  void *register_pc;
+#if defined(ARM_MULTILIB_ARCH_V4)
   uint32_t register_cpsr;
   Arm_symbolic_exception_name vector;
+#elif defined(ARM_MULTILIB_ARCH_V7M)
+  uint32_t register_xpsr;
+  uint32_t vector;
+#endif
 } CPU_Exception_frame;
 
 typedef CPU_Exception_frame CPU_Interrupt_frame;
 
-#else /* !defined(ARM_MULTILIB_ARCH_V4) */
-
-typedef void CPU_Interrupt_frame;
-
-/* FIXME */
-typedef CPU_Interrupt_frame CPU_Exception_frame;
-
-#endif /* !defined(ARM_MULTILIB_ARCH_V4) */
-
 void _CPU_Exception_frame_print( const CPU_Exception_frame *frame );
 
 void _ARM_Exception_default( CPU_Exception_frame *frame );
 
+/** @} */
+
 #ifdef __cplusplus
 }
 #endif




More information about the vc mailing list