mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
new
This commit is contained in:
parent
ad9e684811
commit
9f7a3e020e
1 changed files with 16 additions and 0 deletions
16
src/libthread/Linux-power-asm.s
Normal file
16
src/libthread/Linux-power-asm.s
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
.globl _tas
|
||||||
|
_tas:
|
||||||
|
li %r0, 0
|
||||||
|
mr %r4, %r3
|
||||||
|
lis %r5, 0xcafe
|
||||||
|
ori %r5, %r5, 0xbabe
|
||||||
|
1:
|
||||||
|
lwarx %r3, %r0, %r4
|
||||||
|
cmpwi %r3, 0
|
||||||
|
bne 2f
|
||||||
|
stwcx. %r5, %r0, %r4
|
||||||
|
bne- 1b
|
||||||
|
2:
|
||||||
|
sync
|
||||||
|
blr
|
||||||
|
|
Loading…
Reference in a new issue