diff options
author | rsc <devnull@localhost> | 2005-08-11 14:15:34 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2005-08-11 14:15:34 +0000 |
commit | ae89363c306de4540f403fc9f205a1e8f3be6674 (patch) | |
tree | 8fbd1edd197f63e881d4de3e46ac3cf5b647c3d6 /src/libthread | |
parent | ba3c918e9c66c6242f279b7f1da59dee5528e854 (diff) | |
download | plan9port-ae89363c306de4540f403fc9f205a1e8f3be6674.tar.gz plan9port-ae89363c306de4540f403fc9f205a1e8f3be6674.tar.bz2 plan9port-ae89363c306de4540f403fc9f205a1e8f3be6674.zip |
Needed for NetBSD/macppc port.
Diffstat (limited to 'src/libthread')
-rw-r--r-- | src/libthread/NetBSD-power-asm.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/libthread/NetBSD-power-asm.s b/src/libthread/NetBSD-power-asm.s new file mode 100644 index 00000000..d6e21c15 --- /dev/null +++ b/src/libthread/NetBSD-power-asm.s @@ -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 + |