2 * Copyright (C) 1996 Paul Mackerras.
6 static inline int get_ ## reg (void) \
7 { int ret; asm volatile ("mf" #reg " %0" : "=r" (ret) :); return ret; }
10 static inline void set_ ## reg (int val) \
11 { asm volatile ("mt" #reg " %0" : : "r" (val)); }
17 #define GSETSPR(n, name) \
18 static inline int get_ ## name (void) \
19 { int ret; asm volatile ("mfspr %0," #n : "=r" (ret) : ); return ret; } \
20 static inline void set_ ## name (int val) \
21 { asm volatile ("mtspr " #n ",%0" : : "r" (val)); }
63 static inline int get_sr(int n)
67 asm (" mfsrin %0,%1" : "=r" (ret) : "r" (n << 28));
71 static inline void set_sr(int n, int val)
73 asm ("mtsrin %0,%1" : : "r" (val), "r" (n << 28));
76 static inline void store_inst(void *p)
78 asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p));
81 static inline void cflush(void *p)
83 asm volatile ("dcbf 0,%0; icbi 0,%0" : : "r" (p));
86 static inline void cinval(void *p)
88 asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p));