Commit Diff


commit - ad9e684811638b69d3800b011ee5fafb448992a3
commit + 9f7a3e020e851a217790be84c177f0e8a4347d9b
blob - /dev/null
blob + d6e21c157b50a515a08e33e31a949dafa41e08a2 (mode 644)
--- /dev/null
+++ src/libthread/Linux-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
+