Date: Wed, 6 Jul 2011 00:49:35 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r223813 - stable/8/contrib/bind9/lib/isc/sparc64/include/isc Message-ID: <201107060049.p660nZXo092479@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dougb Date: Wed Jul 6 00:49:35 2011 New Revision: 223813 URL: http://svn.freebsd.org/changeset/base/223813 Log: Apply bug fixes Submitted by: marius Modified: stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h Modified: stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h ============================================================================== --- stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h Wed Jul 6 00:48:31 2011 (r223812) +++ stable/8/contrib/bind9/lib/isc/sparc64/include/isc/atomic.h Wed Jul 6 00:49:35 2011 (r223813) @@ -72,9 +72,9 @@ isc_atomic_xadd(isc_int32_t *p, isc_int3 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_int 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_i 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107060049.p660nZXo092479>