1 #ifndef __ASM_SH_CMPXCHG_LLSC_H
2 #define __ASM_SH_CMPXCHG_LLSC_H
4 static inline unsigned long xchg_u32(volatile u32
*m
, unsigned long val
)
11 "movli.l @%2, %0 ! xchg_u32 \n\t"
14 "movco.l %0, @%2 \n\t"
17 : "=&z"(tmp
), "=&r" (retval
)
25 static inline unsigned long
26 __cmpxchg_u32(volatile u32
*m
, unsigned long old
, unsigned long new)
31 __asm__
__volatile__ (
33 "movli.l @%2, %0 ! __cmpxchg_u32 \n\t"
39 "movco.l %0, @%2 \n\t"
42 : "=&z" (tmp
), "=&r" (retval
)
43 : "r" (m
), "r" (old
), "r" (new)
50 #include <asm/cmpxchg-xchg.h>
52 #endif /* __ASM_SH_CMPXCHG_LLSC_H */