about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/mips/sys
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-03 02:26:37 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-03 02:26:37 +0000
commit5c1159b6a9303f5c9f93e8e048d52acc630c2a86 (patch)
tree2a7f252291a88632101388dd44a6c3786b2f4cb9 /sysdeps/unix/sysv/linux/mips/sys
parentb5ef404e0897450bbe1caaff867d8daf40ba0e35 (diff)
downloadglibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.tar.gz
glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.tar.xz
glibc-5c1159b6a9303f5c9f93e8e048d52acc630c2a86.zip
Update.
2002-02-01  H.J. Lu  <hjl@gnu.org>

	* sysdeps/mips/atomicity.h (exchange_and_add): Use branch
	likely.
	(atomic_add): Likewise.
	(compare_and_swap): Return 0 only when failed to compare. Use
	branch likely.

	* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Use
	branch likely.

2002-02-03  kaz Kojima  <kkojima@rr.iij4u.or.jp>

	* sysdeps/sh/dl-machine.h (elf_machine_rela): Fix a typo.

2002-02-02  Ulrich Drepper  <drepper@redhat.com>

	* elf/dl-minimal.c (__strsep): New minimal implementation.
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/sys')
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/tas.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h
index 0c81dc2de2..339670894f 100644
--- a/sysdeps/unix/sysv/linux/mips/sys/tas.h
+++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h
@@ -42,16 +42,19 @@ _test_and_set (int *p, int v) __THROW
   int r, t;
 
   __asm__ __volatile__
-    ("1:\n\t"
-     "ll	%0,%3\n\t"
+    ("/* Inline test and set */\n\t"
+     "ll	%0,%3\n"
+     "1:\n\t"
      ".set	push\n\t"
      ".set	noreorder\n\t"
      "beq	%0,%4,2f\n\t"
      " move	%1,%4\n\t"
-     ".set	pop\n\t"
      "sc	%1,%2\n\t"
-     "beqz	%1,1b\n"
-     "2:\n"
+     "beqzl	%1,1b\n\t"
+     " ll	%0,%3\n\t"
+     ".set	pop\n"
+     "2:\n\t"
+     "/* End test and set */"
      : "=&r" (r), "=&r" (t), "=m" (*p)
      : "m" (*p), "r" (v)
      : "memory");