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"
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to