diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/mips/sys/tas.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/sys/tas.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/sys/tas.h b/sysdeps/unix/sysv/linux/mips/sys/tas.h index 339670894f..1bfbbcf2de 100644 --- a/sysdeps/unix/sysv/linux/mips/sys/tas.h +++ b/sysdeps/unix/sysv/linux/mips/sys/tas.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2002 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Maciej W. Rozycki <macro@ds2.pg.gda.pl>, 2000. @@ -42,17 +42,16 @@ _test_and_set (int *p, int v) __THROW int r, t; __asm__ __volatile__ - ("/* Inline test and set */\n\t" - "ll %0,%3\n" + ("/* Inline test and set */\n" "1:\n\t" + "ll %0,%3\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" - "beqzl %1,1b\n\t" - " ll %0,%3\n\t" - ".set pop\n" + "beqz %1,1b\n" "2:\n\t" "/* End test and set */" : "=&r" (r), "=&r" (t), "=m" (*p) |