20 extern __inline
void eieio(
void)
22 __asm__
volatile (
"eieio ") ;
34 extern __inline
void w32(
volatile unsigned int *addr,
unsigned int data)
44 extern __inline
void w16(
volatile unsigned short *addr,
unsigned short data)
54 extern __inline
void w8(
volatile unsigned char *addr,
unsigned char data)
66 extern __inline
unsigned int rs32(
volatile unsigned int *addr)
70 __asm__
volatile (
"lwbrx %0,0,%1 " :
"=rI" (tmp) :
"rI" (addr)) ;
79 extern __inline
unsigned short rs16(
volatile unsigned short *addr)
83 __asm__
volatile (
"lhbrx %0,0,%1 " :
"=rI" (tmp) :
"rI" (addr)) ;
86 return (
unsigned short)tmp ;
95 extern __inline
void ws32(
volatile unsigned int *addr,
unsigned int data)
97 __asm__
volatile (
"stwbrx %0,0,%1; eieio " : :
"r" (data) ,
"rI" (addr)) ;
106 extern __inline
void ws32_no_eieio(
volatile unsigned int *addr,
unsigned int data)
108 __asm__
volatile (
"stwbrx %0,0,%1 " : :
"r" (data) ,
"rI" (addr)) ;
116 extern __inline
void ws16(
volatile unsigned short *addr,
unsigned short data)
118 __asm__
volatile (
"sthbrx %0,0,%1 \n eieio " : :
"r" (data) ,
"rI" (addr)) ;