mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-24 23:38:20 +08:00
2011-08-30 Peter Dufault <dufault@hda.com>
* rtems/score/cpu.h: Add more context access functionality. Needed to get GDB debugger hooks working.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2011-08-30 Peter Dufault <dufault@hda.com>
|
||||
|
||||
* rtems/score/cpu.h: Add more context access functionality. Needed to
|
||||
get GDB debugger hooks working.
|
||||
|
||||
2011-08-24 Sebastian Huber <sebastian.huber@embedded-brains.de>
|
||||
|
||||
* rtems/powerpc/registers.h: Renamed defines XER in PPC_XER, LR in
|
||||
|
||||
@@ -309,11 +309,25 @@ typedef struct {
|
||||
(_context)->gpr1 = _sp; \
|
||||
} while (0)
|
||||
|
||||
#define PPC_CONTEXT_GET_CR( _context ) \
|
||||
(_context)->cr
|
||||
|
||||
#define PPC_CONTEXT_GET_MSR( _context ) \
|
||||
(_context)->msr
|
||||
|
||||
#define PPC_CONTEXT_SET_MSR( _context, _msr ) \
|
||||
do { \
|
||||
(_context)->msr = _msr; \
|
||||
} while (0)
|
||||
|
||||
#define PPC_CONTEXT_FIRST_SAVED_GPR 13
|
||||
|
||||
#define PPC_CONTEXT_GET_FIRST_SAVED( _context ) \
|
||||
(_context)->gpr13
|
||||
|
||||
#define PPC_CONTEXT_GET_PC( _context ) \
|
||||
(_context)->pc
|
||||
|
||||
#define PPC_CONTEXT_SET_PC( _context, _pc ) \
|
||||
do { \
|
||||
(_context)->pc = _pc; \
|
||||
@@ -361,11 +375,25 @@ typedef struct {
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_SP ) = _sp; \
|
||||
} while (0)
|
||||
|
||||
#define PPC_CONTEXT_GET_CR( _context ) \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_CR )
|
||||
|
||||
#define PPC_CONTEXT_GET_MSR( _context ) \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_MSR )
|
||||
|
||||
#define PPC_CONTEXT_SET_MSR( _context, _msr ) \
|
||||
do { \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_MSR ) = _msr; \
|
||||
} while (0)
|
||||
|
||||
#define PPC_CONTEXT_FIRST_SAVED_GPR 14
|
||||
|
||||
#define PPC_CONTEXT_GET_FIRST_SAVED( _context ) \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_GPR14 )
|
||||
|
||||
#define PPC_CONTEXT_GET_PC( _context ) \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_LR )
|
||||
|
||||
#define PPC_CONTEXT_SET_PC( _context, _pc ) \
|
||||
do { \
|
||||
PPC_CONTEXT_FIELD( _context, PPC_CONTEXT_OFFSET_LR ) = _pc; \
|
||||
|
||||
Reference in New Issue
Block a user