MCPcopy Create free account
hub / github.com/F-Stack/f-stack / __set_cpsr

Function __set_cpsr

freebsd/arm/include/cpufunc.h:112–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110#define __ARM_INTR_BITS (PSR_I | PSR_F | PSR_A)
111
112static __inline uint32_t
113__set_cpsr(uint32_t bic, uint32_t eor)
114{
115 uint32_t tmp, ret;
116
117 __asm __volatile(
118 "mrs %0, cpsr\n" /* Get the CPSR */
119 "bic %1, %0, %2\n" /* Clear bits */
120 "eor %1, %1, %3\n" /* XOR bits */
121 "msr cpsr_xc, %1\n" /* Set the CPSR */
122 : "=&r" (ret), "=&r" (tmp)
123 : "r" (bic), "r" (eor) : "memory");
124
125 return ret;
126}
127
128static __inline uint32_t
129disable_interrupts(uint32_t mask)

Callers 3

disable_interruptsFunction · 0.85
enable_interruptsFunction · 0.85
restore_interruptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected