Tighten up register usage for inline PPC version of tas().
This commit is contained in:
parent
cd35d601b8
commit
eb5e4c58d1
@ -63,7 +63,7 @@
|
|||||||
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Id: s_lock.h,v 1.104 2003/04/04 05:32:30 tgl Exp $
|
* $Id: s_lock.h,v 1.105 2003/04/04 06:57:39 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -229,20 +229,20 @@ tas(volatile slock_t *lock)
|
|||||||
int _res;
|
int _res;
|
||||||
|
|
||||||
__asm__ __volatile__(
|
__asm__ __volatile__(
|
||||||
" lwarx %0,0,%3 \n"
|
" lwarx %0,0,%2 \n"
|
||||||
" cmpwi %0,0 \n"
|
" cmpwi %0,0 \n"
|
||||||
" bne 1f \n"
|
" bne 1f \n"
|
||||||
" addi %0,%0,1 \n"
|
" addi %0,%0,1 \n"
|
||||||
" stwcx. %0,0,%3 \n"
|
" stwcx. %0,0,%2 \n"
|
||||||
" beq 2f \n"
|
" beq 2f \n"
|
||||||
"1: li %2,1 \n"
|
"1: li %1,1 \n"
|
||||||
" b 3f \n"
|
" b 3f \n"
|
||||||
"2: \n"
|
"2: \n"
|
||||||
" isync \n"
|
" isync \n"
|
||||||
" li %2,0 \n"
|
" li %1,0 \n"
|
||||||
"3: \n"
|
"3: \n"
|
||||||
|
|
||||||
: "=&r" (_t), "=m" (lock), "=r" (_res)
|
: "=&r" (_t), "=r" (_res)
|
||||||
: "r" (lock)
|
: "r" (lock)
|
||||||
: "cc", "memory"
|
: "cc", "memory"
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user