Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2013 21:30:06 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r254614 - in head/sys: amd64/include i386/include
Message-ID:  <201308212130.r7LLU6X8008358@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Aug 21 21:30:06 2013
New Revision: 254614
URL: http://svnweb.freebsd.org/changeset/base/254614

Log:
  - Remove the "a" constraint from main output operand for atomic_cmpset().
  - Use "+" modifier for the "expect" because it is also an output (unused).

Modified:
  head/sys/amd64/include/atomic.h
  head/sys/i386/include/atomic.h

Modified: head/sys/amd64/include/atomic.h
==============================================================================
--- head/sys/amd64/include/atomic.h	Wed Aug 21 21:20:16 2013	(r254613)
+++ head/sys/amd64/include/atomic.h	Wed Aug 21 21:30:06 2013	(r254614)
@@ -138,13 +138,13 @@ atomic_cmpset_int(volatile u_int *dst, u
 
 	__asm __volatile(
 	"	" MPLOCKED "		"
-	"	cmpxchgl %2,%1 ;	"
+	"	cmpxchgl %3,%1 ;	"
 	"       sete	%0 ;		"
 	"# atomic_cmpset_int"
-	: "=a" (res),			/* 0 */
-	  "+m" (*dst)			/* 1 */
-	: "r" (src),			/* 2 */
-	  "a" (expect)			/* 3 */
+	: "=q" (res),			/* 0 */
+	  "+m" (*dst),			/* 1 */
+	  "+a" (expect)			/* 2 */
+	: "r" (src)			/* 3 */
 	: "memory", "cc");
 
 	return (res);
@@ -157,13 +157,13 @@ atomic_cmpset_long(volatile u_long *dst,
 
 	__asm __volatile(
 	"	" MPLOCKED "		"
-	"	cmpxchgq %2,%1 ;	"
+	"	cmpxchgq %3,%1 ;	"
 	"       sete	%0 ;		"
 	"# atomic_cmpset_long"
-	: "=a" (res),			/* 0 */
-	  "+m" (*dst)			/* 1 */
-	: "r" (src),			/* 2 */
-	  "a" (expect)			/* 3 */
+	: "=q" (res),			/* 0 */
+	  "+m" (*dst),			/* 1 */
+	  "+a" (expect)			/* 2 */
+	: "r" (src)			/* 3 */
 	: "memory", "cc");
 
 	return (res);

Modified: head/sys/i386/include/atomic.h
==============================================================================
--- head/sys/i386/include/atomic.h	Wed Aug 21 21:20:16 2013	(r254613)
+++ head/sys/i386/include/atomic.h	Wed Aug 21 21:30:06 2013	(r254614)
@@ -243,13 +243,13 @@ atomic_cmpset_int(volatile u_int *dst, u
 
 	__asm __volatile(
 	"	" MPLOCKED "		"
-	"	cmpxchgl %2,%1 ;	"
+	"	cmpxchgl %3,%1 ;	"
 	"       sete	%0 ;		"
 	"# atomic_cmpset_int"
-	: "=a" (res),			/* 0 */
-	  "+m" (*dst)			/* 1 */
-	: "r" (src),			/* 2 */
-	  "a" (expect)			/* 3 */
+	: "=q" (res),			/* 0 */
+	  "+m" (*dst),			/* 1 */
+	  "+a" (expect)			/* 2 */
+	: "r" (src)			/* 3 */
 	: "memory", "cc");
 
 	return (res);



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