aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/sysdeps/mips/pspinlock.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2002-02-07 10:39:07 +0000
committerAndreas Jaeger <aj@suse.de>2002-02-07 10:39:07 +0000
commita6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0 (patch)
treedaefebc2ad33b01ce974909aef938cc96f68a98b /linuxthreads/sysdeps/mips/pspinlock.c
parentcd30b01ee9cdefd2e6f81b1c25ee6897243706fc (diff)
downloadglibc-a6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0.tar
glibc-a6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0.tar.gz
glibc-a6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0.tar.bz2
glibc-a6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0.zip
Do not use branch likely.
2002-02-05 H.J. Lu <hjl@gnu.org> * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. * sysdeps/mips/pt-machine.h (testandset): Likewise. (__compare_and_swap): Likewise. >>>>>>> 1.469
Diffstat (limited to 'linuxthreads/sysdeps/mips/pspinlock.c')
-rw-r--r--linuxthreads/sysdeps/mips/pspinlock.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/linuxthreads/sysdeps/mips/pspinlock.c b/linuxthreads/sysdeps/mips/pspinlock.c
index bf0a2c833d..3a4f586fc1 100644
--- a/linuxthreads/sysdeps/mips/pspinlock.c
+++ b/linuxthreads/sysdeps/mips/pspinlock.c
@@ -32,17 +32,16 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
unsigned int tmp1, tmp2;
asm volatile
- ("\t\t\t# spin_lock\n\t"
- "ll %1,%3\n"
+ ("\t\t\t# spin_lock\n"
"1:\n\t"
+ "ll %1,%3\n\t"
".set push\n\t"
".set noreorder\n\t"
"bnez %1,1b\n\t"
" li %2,1\n\t"
+ ".set pop\n\t"
"sc %2,%0\n\t"
- "beqzl %2,1b\n\t"
- " ll %1,%3\n\t"
- ".set pop"
+ "beqz %2,1b"
: "=m" (*lock), "=&r" (tmp1), "=&r" (tmp2)
: "m" (*lock)
: "memory");