about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/mips
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2000-08-12 09:29:03 +0000
committerAndreas Jaeger <aj@suse.de>2000-08-12 09:29:03 +0000
commit567152ea54b5f76db543779ae0a148e543fb7587 (patch)
tree3b6d432a62851b5da3abb6a95bc3aecf35a36fbb /linuxthreads/sysdeps/mips
parent966e8ffc0042d817f63d08a12145147c3785f242 (diff)
downloadglibc-567152ea54b5f76db543779ae0a148e543fb7587.tar.gz
glibc-567152ea54b5f76db543779ae0a148e543fb7587.tar.xz
glibc-567152ea54b5f76db543779ae0a148e543fb7587.zip
* sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Add .set mips2 for assembler. * sysdeps/mips/pt-machine.h (testandset): Add .set mips2 for assembler. (__compare_and_swap): Likewise. * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Likewise.
Diffstat (limited to 'linuxthreads/sysdeps/mips')
-rw-r--r--linuxthreads/sysdeps/mips/pspinlock.c3
-rw-r--r--linuxthreads/sysdeps/mips/pt-machine.h6
2 files changed, 6 insertions, 3 deletions
diff --git a/linuxthreads/sysdeps/mips/pspinlock.c b/linuxthreads/sysdeps/mips/pspinlock.c
index 7df3040bda..caa82e38eb 100644
--- a/linuxthreads/sysdeps/mips/pspinlock.c
+++ b/linuxthreads/sysdeps/mips/pspinlock.c
@@ -32,7 +32,8 @@ __pthread_spin_lock (pthread_spinlock_t *lock)
   unsigned int tmp;
 
   asm volatile
-    ("\t\t\t# spin_lock\n\t"
+    (".set	mips2\n\t"
+     "\t\t\t# spin_lock\n\t"
      "1:\n\t"
      "ll	%1,%2\n\t"
      ".set	push\n\t"
diff --git a/linuxthreads/sysdeps/mips/pt-machine.h b/linuxthreads/sysdeps/mips/pt-machine.h
index 16e264017d..7b4ef61857 100644
--- a/linuxthreads/sysdeps/mips/pt-machine.h
+++ b/linuxthreads/sysdeps/mips/pt-machine.h
@@ -41,7 +41,8 @@ testandset (int *spinlock)
   long int ret, temp;
 
   __asm__ __volatile__
-    ("/* Inline spinlock test & set */\n\t"
+    (".set	mips2\n\t"
+     "/* Inline spinlock test & set */\n\t"
      "1:\n\t"
      "ll	%0,%3\n\t"
      ".set	push\n\t"
@@ -87,7 +88,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
   long int ret;
 
   __asm__ __volatile__
-    ("/* Inline compare & swap */\n\t"
+    (".set	mips2\n\t"
+     "/* Inline compare & swap */\n\t"
      "1:\n\t"
      "ll	%0,%4\n\t"
      ".set	push\n"