blob: 11a542927baa1af35319d8d397d9c669a9911b31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#define a_cas a_cas
static inline int a_cas(volatile int *p, int t, int s)
{
__asm__("1: l.lwa %0, %1\n"
" l.sfeq %0, %2\n"
" l.bnf 1f\n"
" l.nop\n"
" l.swa %1, %3\n"
" l.bnf 1b\n"
" l.nop\n"
"1: \n"
: "=&r"(t), "+m"(*p) : "r"(t), "r"(s) : "cc", "memory" );
return t;
}
|