diff options
author | dougb <dougb@FreeBSD.org> | 2011-07-06 00:47:27 +0000 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2011-07-06 00:47:27 +0000 |
commit | 28d62831de06efc82624596849d25e9d6510caef (patch) | |
tree | a46ebef1a9fd0a720019cf25bc29166d0f514b13 /contrib/bind9 | |
parent | 81d1868c0575b19d34b948cd5f807e5bf4e6763c (diff) | |
download | FreeBSD-src-28d62831de06efc82624596849d25e9d6510caef.zip FreeBSD-src-28d62831de06efc82624596849d25e9d6510caef.tar.gz |
Apply bug fixes
Submitted by: marius
Diffstat (limited to 'contrib/bind9')
-rw-r--r-- | contrib/bind9/lib/isc/sparc64/include/isc/atomic.h | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h b/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h index 9ee3c0b..89eaec5 100644 --- a/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h +++ b/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h @@ -72,9 +72,9 @@ isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) { swapped = prev + val; __asm__ volatile( - "casa [%1] %2, %3, %0" - : "+r"(swapped) - : "r"(p), "n"(ASI_P), "r"(prev)); + "casa [%2] %3, %4, %0" + : "+r"(swapped), "=m"(*p) + : "r"(p), "n"(ASI_P), "r"(prev), "m"(*p)); if (swapped == prev) break; } @@ -92,10 +92,9 @@ isc_atomic_store(isc_int32_t *p, isc_int32_t val) { for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) { swapped = val; __asm__ volatile( - "casa [%1] %2, %3, %0" - : "+r"(swapped) - : "r"(p), "n"(ASI_P), "r"(prev) - : "memory"); + "casa [%2] %3, %4, %0" + : "+r"(swapped), "=m"(*p) + : "r"(p), "n"(ASI_P), "r"(prev), "m"(*p)); if (swapped == prev) break; } @@ -111,9 +110,9 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { isc_int32_t temp = val; __asm__ volatile( - "casa [%1] %2, %3, %0" - : "+r"(temp) - : "r"(p), "n"(ASI_P), "r"(cmpval)); + "casa [%2] %3, %4, %0" + : "+r"(temp), "=m"(*p) + : "r"(p), "n"(ASI_P), "r"(cmpval), "m"(*p)); return (temp); } |