tlibthread: rm OpenBSD tas implementations - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 37e7d24c0cb9fd2d18ab332980c31cf470454d93 (DIR) parent 41b3e8b9893a8561af7e85ca98444bc284b4013d (HTM) Author: Russ Cox <rsc@swtch.com> Date: Sun, 19 Jan 2020 22:52:04 -0500 libthread: rm OpenBSD tas implementations OpenBSD is using pthreads now, so no need for tas. Diffstat: M src/libthread/OpenBSD-386-asm.s | 9 +-------- M src/libthread/OpenBSD-power-asm.S | 15 --------------- 2 files changed, 1 insertion(+), 23 deletions(-) --- (DIR) diff --git a/src/libthread/OpenBSD-386-asm.s b/src/libthread/OpenBSD-386-asm.s t@@ -1,10 +1,3 @@ -.globl _tas -_tas: - movl $0xCAFEBABE, %eax - movl 4(%esp), %ecx - xchgl %eax, 0(%ecx) - ret - .globl getmcontext getmcontext: movl 4(%esp), %eax t@@ -17,7 +10,7 @@ getmcontext: movl %esi, 24(%eax) movl %ebp, 28(%eax) movl %ebx, 36(%eax) - movl %edx, 40(%eax) + movl %edx, 40(%eax) movl %ecx, 44(%eax) movl $1, 48(%eax) /* %eax */ (DIR) diff --git a/src/libthread/OpenBSD-power-asm.S b/src/libthread/OpenBSD-power-asm.S t@@ -1,18 +1,3 @@ -ENTRY(_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 - ENTRY(_getmcontext) /* xxx: instruction scheduling */ mflr %r0 mfcr %r5