{
u8 _out;
int res;
- int err = 0;
+ int err;
do {
__asm__ __volatile__(
"0: ldxrb %w1, %4\n"
"1: stxrb %w0, %w3, %4\n"
+ " mov %w2, #0\n"
"2:\n"
" .section .fixup,\"ax\"\n"
" .align 2\n"
" .quad 1b, 3b\n"
" .previous"
: "=&r" (res), "=r" (_out), "=r" (err)
- : "r" (in), "Q" (addr), "i" (-EFAULT)
+ : "r" (in), "Q" (*addr), "i" (-EFAULT)
: "cc", "memory");
} while (err == 0 && res != 0);
__asm__ __volatile__(
"0: ldxr %w1, %4\n"
"1: stxr %w0, %w3, %4\n"
+ " mov %w2, #0\n"
"2:\n"
" .section .fixup,\"ax\"\n"
" .align 2\n"
" .quad 1b, 3b\n"
" .previous"
: "=&r" (res), "=r" (_out), "=r" (err)
- : "r" (in), "Q" (addr), "i" (-EFAULT)
+ : "r" (in), "Q" (*addr), "i" (-EFAULT)
: "cc", "memory");
} while (err == 0 && res != 0);