From a6049f98edbe1bbcfe62c9b7bb80a8f783c0e2b0 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Thu, 7 Feb 2002 10:39:07 +0000 Subject: Do not use branch likely. 2002-02-05 H.J. Lu * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. * sysdeps/mips/pt-machine.h (testandset): Likewise. (__compare_and_swap): Likewise. >>>>>>> 1.469 --- sysdeps/unix/sysv/linux/mips/sys/tas.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'sysdeps/unix/sysv/linux/mips/sys/tas.h') 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 , 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) -- cgit v1.2.3