summaryrefslogtreecommitdiff
path: root/nptl/sysdeps
diff options
context:
space:
mode:
authorGuo Yixuan <culu.gyx@gmail.com>2014-05-29 21:43:15 -0700
committerDavid S. Miller <davem@davemloft.net>2014-06-03 16:10:48 -0700
commitb42eca7d39d7d263815a4457c318eb57ee2686a4 (patch)
tree646e8693cf5bed500219cf6e4c145a93289f319e /nptl/sysdeps
parentf9d2d03254a58d92635a311a42253eeed5a40a47 (diff)
downloadglibc-b42eca7d39d7d263815a4457c318eb57ee2686a4.tar.gz
Fixed pthread_spin_lock on sparc32/64 (bug 16882)
[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.
Diffstat (limited to 'nptl/sysdeps')
-rw-r--r--nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S4
-rw-r--r--nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S4
2 files changed, 4 insertions, 4 deletions
diff --git a/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S b/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
index ea863d7e34..3accc69615 100644
--- a/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
+++ b/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S
@@ -19,11 +19,11 @@
.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
diff --git a/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S b/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
index 0f849b2c5d..aec66542de 100644
--- a/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
+++ b/nptl/sysdeps/sparc/sparc64/pthread_spin_lock.S
@@ -19,10 +19,10 @@
.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