mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Do not use branch likely.
2002-02-05 H.J. Lu <hjl@gnu.org> * sysdeps/mips/pspinlock.c (__pthread_spin_lock): Not use branch likely. * sysdeps/mips/pt-machine.h (testandset): Likewise. (__compare_and_swap): Likewise. >>>>>>> 1.469
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user