O2. Seems tas() for PPC (storage/buffer/s_lock.c) never works if
compiled with -O0. Included are patches that should fix the problem (of course I have confirmed -O2 works with this patch). BTW, here is a platforms/regression test failure(serious one--backend death) matrix. Tatsuo Ishii
This commit is contained in:
parent
811106676e
commit
63e39ab9a9
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.9 1998/09/01 04:31:44 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/buffer/Attic/s_lock.c,v 1.10 1998/09/03 02:14:39 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -95,20 +95,23 @@ s_lock(volatile slock_t *lock, const char *file, const int line)
|
|||||||
|
|
||||||
#if defined(PPC)
|
#if defined(PPC)
|
||||||
/* Note: need a nice gcc constrained asm version so it can be inlined */
|
/* Note: need a nice gcc constrained asm version so it can be inlined */
|
||||||
int
|
static void
|
||||||
tas(volatile slock_t *lock)
|
tas_dummy()
|
||||||
{
|
{
|
||||||
__asm__("lwarx 5,0,3 \n\
|
__asm__(" \n\
|
||||||
cmpwi 5,0 \n\
|
.global tas \n\
|
||||||
bne fail \n\
|
tas: \n\
|
||||||
addi 5,5,1 \n\
|
lwarx 5,0,3 \n\
|
||||||
|
cmpwi 5,0 \n\
|
||||||
|
bne fail \n\
|
||||||
|
addi 5,5,1 \n\
|
||||||
stwcx. 5,0,3 \n\
|
stwcx. 5,0,3 \n\
|
||||||
beq success \n\
|
beq success \n\
|
||||||
fail: li 3,1 \n\
|
fail: li 3,1 \n\
|
||||||
blr \n\
|
blr \n\
|
||||||
success: \n\
|
success: \n\
|
||||||
li 3,0 \n\
|
li 3,0 \n\
|
||||||
blr \n\
|
blr \n\
|
||||||
");
|
");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user