Clear reservation for 970 (thanks to Miro Jurisic and Philip Koch)

[SVN r28060]
This commit is contained in:
Peter Dimov
2005-04-08 10:39:28 +00:00
parent d24f6d3b97
commit 76722e125f
2 changed files with 6 additions and 5 deletions

View File

@ -64,14 +64,15 @@ loop:
lwarx r4, 0, r3
cmpwi r4, 0
beq done
beq store
addi r4, r4, 1
store:
stwcx. r4, 0, r3
bne- loop
done:
mr r3, r4
}

View File

@ -90,9 +90,9 @@ inline long atomic_conditional_increment( long * pw )
"cmpwi %1, 0\n\t"
"beq 1f\n\t"
"addi %1, %1, 1\n\t"
"1:\n\t"
"stwcx. %1, 0, %2\n\t"
"bne- 0b\n\t"
"1:":
"bne- 0b":
"=m"( *pw ), "=&b"( rv ):
"r"( pw ):