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

Andrew Turner andrew at FreeBSD.org
Sun Jul 19 16:55:49 UTC 2015


Author: andrew
Date: Sun Jul 19 16:55:47 2015
New Revision: 285694
URL: https://svnweb.freebsd.org/changeset/base/285694

Log:
  Fix atomic_store_64, it should write the value passed in, not the value
  read by the load.
  
  Pointy Hat:	andrew

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

Modified: head/sys/arm/include/atomic-v6.h
==============================================================================
--- head/sys/arm/include/atomic-v6.h	Sun Jul 19 16:05:34 2015	(r285693)
+++ head/sys/arm/include/atomic-v6.h	Sun Jul 19 16:55:47 2015	(r285694)
@@ -558,7 +558,7 @@ atomic_store_64(volatile uint64_t *p, ui
 	__asm __volatile(
 	    "1:							\n"
 	    "   ldrexd	%Q[tmp], %R[tmp], [%[ptr]]		\n"
-	    "   strexd	%[exf], %Q[tmp], %R[tmp], [%[ptr]]	\n"
+	    "   strexd	%[exf], %Q[val], %R[val], [%[ptr]]	\n"
 	    "   teq	%[exf], #0				\n"
 	    "   it	ne					\n"
 	    "   bne	1b					\n"


More information about the svn-src-head mailing list