Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Sep 2005 17:21:43 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 83676 for review
Message-ID:  <200509151721.j8FHLhe6001519@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=83676

Change 83676 by jhb@jhb_slimer on 2005/09/15 17:21:06

	Use the input memory operand rather than the output one for the
	load instructions for clarity.
	
	Suggested by:	  alc

Affected files ...

.. //depot/projects/smpng/sys/alpha/include/atomic.h#30 edit

Differences ...

==== //depot/projects/smpng/sys/alpha/include/atomic.h#30 (text+ko) ====

@@ -56,7 +56,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldl_l %0, %1\n\t"		/* load old value */
+		"1:\tldl_l %0, %3\n\t"		/* load old value */
 		"bis %0, %2, %0\n\t"		/* calculate new value */
 		"stl_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -72,7 +72,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldl_l %0, %1\n\t"		/* load old value */
+		"1:\tldl_l %0, %3\n\t"		/* load old value */
 		"bic %0, %2, %0\n\t"		/* calculate new value */
 		"stl_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -88,7 +88,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldl_l %0, %1\n\t"		/* load old value */
+		"1:\tldl_l %0, %3\n\t"		/* load old value */
 		"addl %0, %2, %0\n\t"		/* calculate new value */
 		"stl_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -104,7 +104,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldl_l %0, %1\n\t"		/* load old value */
+		"1:\tldl_l %0, %3\n\t"		/* load old value */
 		"subl %0, %2, %0\n\t"		/* calculate new value */
 		"stl_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -121,7 +121,7 @@
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
 		"wmb\n"			/* ensure pending writes have drained */
-		"1:\tldl_l %0,%2\n\t"	/* load current value, asserting lock */
+		"1:\tldl_l %0,%3\n\t"	/* load current value, asserting lock */
 		"ldiq %1,0\n\t"		/* value to store */
 		"stl_c %1,%2\n\t"	/* attempt to store */
 		"beq %1,1b\n"		/* if the store failed, spin */
@@ -139,7 +139,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldq_l %0, %1\n\t"		/* load old value */
+		"1:\tldq_l %0, %3\n\t"		/* load old value */
 		"bis %0, %2, %0\n\t"		/* calculate new value */
 		"stq_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -155,7 +155,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldq_l %0, %1\n\t"		/* load old value */
+		"1:\tldq_l %0, %3\n\t"		/* load old value */
 		"bic %0, %2, %0\n\t"		/* calculate new value */
 		"stq_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -171,7 +171,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldq_l %0, %1\n\t"		/* load old value */
+		"1:\tldq_l %0, %3\n\t"		/* load old value */
 		"addq %0, %2, %0\n\t"		/* calculate new value */
 		"stq_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -187,7 +187,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldq_l %0, %1\n\t"		/* load old value */
+		"1:\tldq_l %0, %3\n\t"		/* load old value */
 		"subq %0, %2, %0\n\t"		/* calculate new value */
 		"stq_c %0, %1\n\t"		/* attempt to store */
 		"beq %0, 1b\n"			/* spin if failed */
@@ -204,7 +204,7 @@
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
 		"wmb\n"			/* ensure pending writes have drained */
-		"1:\tldq_l %0,%2\n\t"	/* load current value, asserting lock */
+		"1:\tldq_l %0,%3\n\t"	/* load current value, asserting lock */
 		"ldiq %1,0\n\t"		/* value to store */
 		"stq_c %1,%2\n\t"	/* attempt to store */
 		"beq %1,1b\n"		/* if the store failed, spin */
@@ -289,7 +289,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldl_l %0, %1\n\t"		/* load old value */
+		"1:\tldl_l %0, %4\n\t"		/* load old value */
 		"cmpeq %0, %2, %0\n\t"		/* compare */
 		"beq %0, 2f\n\t"		/* exit if not equal */
 		"mov %3, %0\n\t"		/* value to store */
@@ -316,7 +316,7 @@
 
 #ifdef __GNUCLIKE_ASM
 	__asm __volatile (
-		"1:\tldq_l %0, %1\n\t"		/* load old value */
+		"1:\tldq_l %0, %4\n\t"		/* load old value */
 		"cmpeq %0, %2, %0\n\t"		/* compare */
 		"beq %0, 2f\n\t"		/* exit if not equal */
 		"mov %3, %0\n\t"		/* value to store */



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