Go to the documentation of this file.
23 #ifndef __POK_SPARC_PSR_H__
24 #define __POK_SPARC_PSR_H__
29 #define PSR_CWP_MASK 0x1F
30 #define PSR_PIL(pil) (((pil) & 0xF) << 8)
32 static inline unsigned int psr_get(void)
35 asm volatile (
"rd %%psr, %0\n"
43 static inline void psr_set(
unsigned int new_psr)
45 asm volatile (
"wr %0, 0x0, %%psr\n"
54 static inline void psr_enable_traps(
void)
56 unsigned int psr = psr_get();
61 static inline void psr_disable_traps(
void)
63 unsigned int psr = psr_get();
68 static inline void psr_disable_interupt(
void)
70 unsigned int psr = psr_get();
76 static inline void psr_enable_interupt(
void)
78 unsigned int psr = psr_get();