diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-02-03 02:25:17 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-02-03 02:25:17 +0000 |
commit | d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63 (patch) | |
tree | a8532f45a4fd85ca9730cb0b9a3c0d2cda0bb8a2 | |
parent | f295ff32125aa9edb6d042e80295cf4c31b590ec (diff) | |
download | glibc-d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63.tar glibc-d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63.tar.gz glibc-d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63.tar.bz2 glibc-d7d16bb3eaf17a21fafe25cdf0e8feba52f0cf63.zip |
(_test_and_set): Use branch likely.
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/sys/tas.h | 13 |
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"); |