Fixed pthread_spin_lock on sparc32/64 (bug 16882)
authorGuo Yixuan <culu.gyx@gmail.com>
Fri, 30 May 2014 04:43:15 +0000 (21:43 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 3 Jun 2014 23:10:48 +0000 (16:10 -0700)
[BZ #16882]
* nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
(pthread_spin_lock): Branch out of spin loop to proper location.
* nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
(pthread_spin_lock): Likewise.

ChangeLog
nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S

index 63fe915..894abd8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-06-03  Guo Yixuan  <culu.gyx@gmail.com>
+
+       [BZ #16882]
+       * nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
+       (pthread_spin_lock): Branch out of spin loop to proper location.
+       * nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
+       (pthread_spin_lock): Likewise.
+
 2014-06-03  Andreas Schwab  <schwab@suse.de>
 
        [BZ #15946]
index ea863d7..3accc69 100644 (file)
 
        .text
 ENTRY(pthread_spin_lock)
-       ldstub          [%o0], %g1
+1:     ldstub          [%o0], %g1
        orcc            %g1, 0x0, %g0
        bne,a           2f
         ldub           [%o0], %g1
-1:     retl
+       retl
         mov            0, %o0
 2:     orcc            %g1, 0x0, %g0
        bne,a           2b
index 0f849b2..aec6654 100644 (file)
 
        .text
 ENTRY(pthread_spin_lock)
-       ldstub          [%o0], %g1
+1:     ldstub          [%o0], %g1
        brnz,pn         %g1, 2f
         membar         #StoreLoad | #StoreStore
-1:     retl
+       retl
         mov            0, %o0
 2:     ldub            [%o0], %g1
        brnz,pt         %g1, 2b