From: Guo Yixuan Date: Fri, 30 May 2014 04:43:15 +0000 (-0700) Subject: Fixed pthread_spin_lock on sparc32/64 (bug 16882) X-Git-Tag: glibc-2.20~385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b42eca7d39d7d263815a4457c318eb57ee2686a4;p=platform%2Fupstream%2Fglibc.git 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. --- diff --git a/ChangeLog b/ChangeLog index 63fe915..894abd8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2014-06-03 Guo Yixuan + + [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 [BZ #15946] diff --git a/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S b/nptl/sysdeps/sparc/sparc32/pthread_spin_lock.S index ea863d7..3accc69 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 0f849b2..aec6654 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