register int temp;
__asm__ __volatile__(
-
" .set push\n"
" .set mips2\n"
" .set noreorder\n"
" beqz %1, 1b\n"
" nop\n"
" .set pop "
- : "=&r" (result), "=&r" (temp), "=m" (*addr)
+ : "=&r" (result), "=&r" (temp), "+m" (*addr)
: "Ir" (incr)
: "memory");
return (AO_t)result;
" beqz %1, 1b\n"
" nop\n"
" .set pop "
- : "=&r" (oldval), "=&r" (temp), "=m" (*addr)
+ : "=&r" (oldval), "=&r" (temp), "+m" (*addr)
: "r" (1)
: "memory");
return (AO_TS_VAL_t)oldval;
" nop\n"
" .set pop\n"
"2:"
- : "=&r" (fetched_val), "=&r" (temp), "=m" (*addr)
+ : "=&r" (fetched_val), "=&r" (temp), "+m" (*addr)
: "r" (new_val), "Jr" (old)
: "memory");
return (AO_t)fetched_val;