Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 02:17:58 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r200202 - head/contrib/bind9/lib/isc/ia64/include/isc
Message-ID:  <200912070217.nB72HwJx038731@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marcel
Date: Mon Dec  7 02:17:58 2009
New Revision: 200202
URL: http://svn.freebsd.org/changeset/base/200202

Log:
  Fix Read-After-Write (RAW) dependency violation for ar.ccv in
  isc_atomic_xadd() and isc_atomic_cmpxchg().
  
  Approved by:	dougb@
  MFC after:	1 week

Modified:
  head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h

Modified: head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h
==============================================================================
--- head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h	Mon Dec  7 01:46:39 2009	(r200201)
+++ head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h	Mon Dec  7 02:17:58 2009	(r200202)
@@ -41,7 +41,7 @@ isc_atomic_xadd(isc_int32_t *p, isc_int3
 	for (prev = *(volatile isc_int32_t *)p; ; prev = swapped) {
 		swapped = prev + val;
 		__asm__ volatile(
-			"mov ar.ccv=%2;"
+			"mov ar.ccv=%2;;"
 			"cmpxchg4.acq %0=%4,%3,ar.ccv"
 			: "=r" (swapped), "=m" (*p)
 			: "r" (prev), "r" (swapped), "m" (*p)
@@ -84,7 +84,7 @@ isc_atomic_cmpxchg(isc_int32_t *p, isc_i
 	isc_int32_t ret;
 
 	__asm__ volatile(
-		"mov ar.ccv=%2;"
+		"mov ar.ccv=%2;;"
 		"cmpxchg4.acq %0=%4,%3,ar.ccv"
 		: "=r" (ret), "=m" (*p)
 		: "r" (cmpval), "r" (val), "m" (*p)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912070217.nB72HwJx038731>