|
RTEMS
5.1
|
23 #define __MFSPR(reg, val) \ 24 __asm__ __volatile__("mfspr %0,"#reg : "=r" (val)) 26 #define __MTSPR(val, reg) \ 27 __asm__ __volatile__("mtspr "#reg",%0" : : "r" (val)) 31 static inline unsigned long _read_##reg(void) \ 37 static inline void _write_##reg(unsigned long val)\ 44 static inline unsigned long _read_##reg(void) \ 51 static inline unsigned long _read_MSR(
void)
54 asm volatile(
"mfmsr %0" :
"=r" (val));
58 static inline void _write_MSR(
unsigned long val)
60 asm volatile(
"mtmsr %0" : :
"r" (val));
64 static inline unsigned long _read_SR(
void * va)
67 asm volatile(
"mfsrin %0,%1" :
"=r" (val):
"r" (va));
71 static inline void _write_SR(
unsigned long val,
void * va)
73 asm volatile(
"mtsrin %0,%1" : :
"r"(val),
"r" (va):
"memory");