svn commit: r271310 - head/sys/arm/include

Ian Lepore ian at FreeBSD.org
Tue Sep 9 13:50:22 UTC 2014


Author: ian
Date: Tue Sep  9 13:50:21 2014
New Revision: 271310
URL: http://svnweb.freebsd.org/changeset/base/271310

Log:
  Rename new to newval in inline asm code, to avoid clashes with C++ new.
  Also rename cmp to cmpval just to keep the asm variable names similar to
  the C variable names.

Modified:
  head/sys/arm/include/atomic.h

Modified: head/sys/arm/include/atomic.h
==============================================================================
--- head/sys/arm/include/atomic.h	Tue Sep  9 11:38:29 2014	(r271309)
+++ head/sys/arm/include/atomic.h	Tue Sep  9 13:50:21 2014	(r271310)
@@ -268,12 +268,12 @@ atomic_cmpset_64(volatile uint64_t *p, u
 	__asm __volatile(
 		"1:          \n"
 		"   ldrexd   %[tmp], [%[ptr]]\n"
-		"   teq      %Q[tmp], %Q[cmp]\n"
+		"   teq      %Q[tmp], %Q[cmpval]\n"
 		"   itee eq  \n"
-		"   teqeq    %R[tmp], %R[cmp]\n"
+		"   teqeq    %R[tmp], %R[cmpval]\n"
 		"   movne    %[ret], #0\n"
 		"   bne      2f\n"
-		"   strexd   %[ret], %[new], [%[ptr]]\n"
+		"   strexd   %[ret], %[newval], [%[ptr]]\n"
 		"   teq      %[ret], #0\n"
 		"   it ne    \n"
 		"   bne      1b\n"
@@ -282,8 +282,8 @@ atomic_cmpset_64(volatile uint64_t *p, u
 		:   [ret]    "=&r"  (ret), 
 		    [tmp]    "=&r"  (tmp)
 		:   [ptr]    "r"    (p), 
-		    [cmp]    "r"    (cmpval), 
-		    [new]    "r"    (newval)
+		    [cmpval] "r"    (cmpval), 
+		    [newval] "r"    (newval)
 		:   "cc", "memory");
 	return (ret);
 }


More information about the svn-src-all mailing list