Changeset 5e61c80 in rtems


Ignore:
Timestamp:
Sep 18, 2009, 8:07:23 AM (10 years ago)
Author:
Thomas Doerfler <Thomas.Doerfler@…>
Branches:
4.10, 4.11, master
Children:
34ad1f48
Parents:
091705c
Message:
  • rtems/score/cpu.h: Fix for inline asm in _CPU_Fatal_halt().
  • rtems/asm.h: Added macro to define ARM functions.
  • cpu_asm.S, arm_exc_handler_low.S: Use macro from above.
Location:
cpukit/score/cpu/arm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/cpu/arm/ChangeLog

    r091705c r5e61c80  
     12009-09-15      Sebastian Huber <sebastian.huber@embedded-brains.de>
     2
     3        * rtems/score/cpu.h: Fix for inline asm in _CPU_Fatal_halt().
     4        * rtems/asm.h: Added macro to define ARM functions.
     5        * cpu_asm.S, arm_exc_handler_low.S: Use macro from above.
     6
    172009-08-19      Joel Sherrill <joel.sherrill@OARcorp.com>
    28
  • cpukit/score/cpu/arm/arm_exc_handler_low.S

    r091705c r5e61c80  
    2828#include <rtems/score/cpu_asm.h>
    2929
    30 /*
    31  *  function declaration macro (start body in ARM mode)
    32  */
    33 #ifdef __thumb__
    34   #define FUNC_START_ARM(_name_)              \
    35     .code   16                              ;\
    36     .thumb_func                             ;\
    37     .globl _name_                           ;\
    38 _name_:                                         ;\
    39      bx      pc                              ;\
    40      .code   32                              ;\
    41 _name_ ## _ARM:
    42 #else
    43   #define FUNC_START_ARM(_name_) \
    44      .globl _name_; \
    45 _name_:
    46 #endif
    47 
    4830        .text
    4931
    5032/* FIXME:       _Exception_Handler_Undef_Swi is untested */
    51 FUNC_START_ARM(_Exception_Handler_Undef_Swi)
     33DEFINE_FUNCTION_ARM(_Exception_Handler_Undef_Swi)
    5234/* FIXME: This should use load and store multiple instructions */
    5335        sub     r13,r13,#SIZE_REGS
     
    8567       
    8668/* FIXME:       _Exception_Handler_Abort is untested */
    87 FUNC_START_ARM(_Exception_Handler_Abort)
     69DEFINE_FUNCTION_ARM(_Exception_Handler_Abort)
    8870/* FIXME: This should use load and store multiple instructions */
    8971        sub     r13,r13,#SIZE_REGS
     
    128110#define ABORT_SIZE_REGS SIZE_REGS+ABORT_REGS_OFFS
    129111       
    130 FUNC_START_ARM(_exc_data_abort)
     112DEFINE_FUNCTION_ARM(_exc_data_abort)
    131113        sub     sp, sp, #ABORT_SIZE_REGS        /* reserve register frame */
    132114        stmia   sp, {r0-r11}
  • cpukit/score/cpu/arm/cpu_asm.S

    r091705c r5e61c80  
    2323#include <rtems/score/cpu_asm.h>
    2424
    25 /*
    26  *  function declaration macro (start body in ARM mode)
    27  */
    28 #ifdef __thumb__
    29   #define FUNC_START_ARM(_name_)              \
    30     .code   16                              ;\
    31     .thumb_func                             ;\
    32     .globl _name_                           ;\
    33 _name_:                                         ;\
    34      bx      pc                              ;\
    35      .code   32                              ;\
    36 _name_ ## _ARM:
    37 #else
    38   #define FUNC_START_ARM(_name_) \
    39      .globl _name_; \
    40 _name_:
    41 #endif
    42 
    4325        .text
    4426
     
    5941 */
    6042 
    61 FUNC_START_ARM(_CPU_Context_switch)
     43DEFINE_FUNCTION_ARM(_CPU_Context_switch)
    6244/* Start saving context */
    6345        mrs     r2, cpsr
     
    8264 *
    8365 */
    84 FUNC_START_ARM(_CPU_Context_restore)
     66DEFINE_FUNCTION_ARM(_CPU_Context_restore)
    8567        mov     r1, r0
    8668        b       _restore
  • cpukit/score/cpu/arm/rtems/asm.h

    r091705c r5e61c80  
    133133#define EXTERN(sym) .globl SYM (sym)
    134134
     135#ifdef __thumb__
     136  #define DEFINE_FUNCTION_ARM(name) \
     137    .thumb_func ; .globl name ; name: ; bx pc ; \
     138    .arm ; .globl name ## _arm ; name ## _arm:
     139#else
     140  #define DEFINE_FUNCTION_ARM(name) \
     141    .globl name ; name: ; .globl name ## _arm ; name ## _arm:
    135142#endif
     143
     144#endif /* _RTEMS_ASM_H */
  • cpukit/score/cpu/arm/rtems/score/cpu.h

    r091705c r5e61c80  
    337337  } while (0)
    338338
    339 #define _CPU_Fatal_halt( _error )           \
     339#define _CPU_Fatal_halt( _err )             \
    340340   do {                                     \
    341      int _level;                            \
     341     uint32_t _level;                       \
     342     uint32_t _error = _err;                \
    342343     _CPU_ISR_Disable( _level );            \
    343344     asm volatile ("mov r0, %0\n"           \
Note: See TracChangeset for help on using the changeset viewer.