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 63fe9153a36137b2a69e5775c3d40e2739cade13..894abd878bd98f57686f884747644b7d3eb470c3 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 ea863d7e34061adc19082f7b0c87ef09147e38c3..3accc696158b4bad98018f366ffd80ce4ce599c1 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 0f849b2c5d890e75fb923264f08ac8fa0862da0f..aec66542de89096c19839dc590dafba03e4a42a1 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