2 static inline int a_ll(volatile int *p)
6 ".set push ; .set mips2\n\t"
14 static inline int a_sc(volatile int *p, int v)
17 __asm__ __volatile__ (
18 ".set push ; .set mips2\n\t"
21 : "=r"(r), "=m"(*p) : "0"(v) : "memory");
25 #define a_barrier a_barrier
26 static inline void a_barrier()
28 /* mips2 sync, but using too many directives causes
29 * gcc not to inline it, so encode with .long instead. */
30 __asm__ __volatile__ (".long 0xf" : : : "memory");
32 __asm__ __volatile__ (
33 ".set push ; .set mips2 ; sync ; .set pop"
38 #define a_pre_llsc a_barrier
39 #define a_post_llsc a_barrier