1 #ifndef __PARISC_SPECIAL_INSNS_H
2 #define __PARISC_SPECIAL_INSNS_H
4 #define mfctl(reg) ({ \
6 __asm__ __volatile__( \
7 "mfctl " #reg ",%0" : \
13 #define mtctl(gr, cr) \
14 __asm__ __volatile__("mtctl %0,%1" \
16 : "r" (gr), "i" (cr) : "memory")
18 /* these are here to de-mystefy the calling code, and to provide hooks */
19 /* which I needed for debugging EIEM problems -PB */
20 #define get_eiem() mfctl(15)
21 static inline void set_eiem(unsigned long val
)
26 #define mfsp(reg) ({ \
28 __asm__ __volatile__( \
29 "mfsp " #reg ",%0" : \
35 #define mtsp(val, cr) \
36 { if (__builtin_constant_p(val) && ((val) == 0)) \
37 __asm__ __volatile__("mtsp %%r0,%0" : : "i" (cr) : "memory"); \
39 __asm__ __volatile__("mtsp %0,%1" \
41 : "r" (val), "i" (cr) : "memory"); }
43 #endif /* __PARISC_SPECIAL_INSNS_H */