diff options
author | jhb <jhb@FreeBSD.org> | 2005-09-15 19:31:22 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-09-15 19:31:22 +0000 |
commit | b729e912ca61300693d243d104d5956a07be67b3 (patch) | |
tree | 3f673839211ac6f986ce60c40b7aab1d6a8b3cea /sys/powerpc/include | |
parent | b4bff5a977cedb926687495a528a0d6a2c7c872b (diff) | |
download | FreeBSD-src-b729e912ca61300693d243d104d5956a07be67b3.zip FreeBSD-src-b729e912ca61300693d243d104d5956a07be67b3.tar.gz |
Stop using the '+' constraint modifier with inline assembly. The '+'
constraint is actually only allowed for register operands. Instead, use
separate input and output memory constraints.
Education from: alc
Reviewed by: alc
Tested on: i386, alpha
MFC after: 1 week
Diffstat (limited to 'sys/powerpc/include')
-rw-r--r-- | sys/powerpc/include/atomic.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/sys/powerpc/include/atomic.h b/sys/powerpc/include/atomic.h index af7bb95..0bc8f21 100644 --- a/sys/powerpc/include/atomic.h +++ b/sys/powerpc/include/atomic.h @@ -63,8 +63,8 @@ atomic_set_32(volatile uint32_t *p, uint32_t v) "or %0, %3, %0\n\t" /* calculate new value */ "stwcx. %0, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ - : "=&r" (temp), "+m" (*p) - : "r" (p), "r" (v) + : "=&r" (temp), "=m" (*p) + : "r" (p), "r" (v), "m" (*p) : "cc", "memory"); #endif } @@ -80,8 +80,8 @@ atomic_clear_32(volatile uint32_t *p, uint32_t v) "andc %0, %0, %3\n\t" /* calculate new value */ "stwcx. %0, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ - : "=&r" (temp), "+m" (*p) - : "r" (p), "r" (v) + : "=&r" (temp), "=m" (*p) + : "r" (p), "r" (v), "m" (*p) : "cc", "memory"); #endif } @@ -97,8 +97,8 @@ atomic_add_32(volatile uint32_t *p, uint32_t v) "add %0, %3, %0\n\t" /* calculate new value */ "stwcx. %0, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ - : "=&r" (temp), "+m" (*p) - : "r" (p), "r" (v) + : "=&r" (temp), "=m" (*p) + : "r" (p), "r" (v), "m" (*p) : "cc", "memory"); #endif } @@ -114,8 +114,8 @@ atomic_subtract_32(volatile uint32_t *p, uint32_t v) "subf %0, %3, %0\n\t" /* calculate new value */ "stwcx. %0, 0, %2\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ - : "=&r" (temp), "+m" (*p) - : "r" (p), "r" (v) + : "=&r" (temp), "=m" (*p) + : "r" (p), "r" (v), "m" (*p) : "cc", "memory"); #endif } @@ -132,8 +132,8 @@ atomic_readandclear_32(volatile uint32_t *addr) "li %1, 0\n\t" /* load new value */ "stwcx. %1, 0, %3\n\t" /* attempt to store */ "bne- 1b\n\t" /* spin if failed */ - : "=&r"(result), "=&r"(temp), "+m" (*addr) - : "r" (addr) + : "=&r"(result), "=&r"(temp), "=m" (*addr) + : "r" (addr), "m" (*addr) : "cc", "memory"); #endif @@ -382,8 +382,8 @@ atomic_cmpset_32(volatile uint32_t* p, uint32_t cmpval, uint32_t newval) "stwcx. %0, 0, %2\n\t" /* clear reservation (74xx) */ "li %0, 0\n\t" /* failure - retval = 0 */ "3:\n\t" - : "=&r" (ret), "+m" (*p) - : "r" (p), "r" (cmpval), "r" (newval) + : "=&r" (ret), "=m" (*p) + : "r" (p), "r" (cmpval), "r" (newval), "m" (*p) : "cc", "memory"); #endif |