aboutsummaryrefslogtreecommitdiff
path: root/src/libthread/Darwin-386-asm.s
diff options
context:
space:
mode:
authorPetter Rodhelind <petter.rodhelind@gmail.com>2020-02-11 13:40:11 +0100
committerPetter Rodhelind <petter.rodhelind@gmail.com>2020-02-11 13:40:11 +0100
commit9c79e48c93c0c4d14aabcb490fab048d68934cb2 (patch)
tree1d57d3fd193621a2357473bb65b92190914c5736 /src/libthread/Darwin-386-asm.s
parent02d7aa8915f9c3a3288dab01f321eb94ba219e3b (diff)
parent0237dec768a4ee36ae9e18ce8566d2c999d78410 (diff)
downloadplan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.tar.gz
plan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.tar.bz2
plan9port-9c79e48c93c0c4d14aabcb490fab048d68934cb2.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/libthread/Darwin-386-asm.s')
-rw-r--r--src/libthread/Darwin-386-asm.s52
1 files changed, 0 insertions, 52 deletions
diff --git a/src/libthread/Darwin-386-asm.s b/src/libthread/Darwin-386-asm.s
deleted file mode 100644
index 46c96e94..00000000
--- a/src/libthread/Darwin-386-asm.s
+++ /dev/null
@@ -1,52 +0,0 @@
-.globl _tas
-_tas:
- movl $0xCAFEBABE, %eax
- movl 4(%esp), %ecx
- xchgl %eax, 0(%ecx)
- ret
-
-.globl _getmcontext
-_getmcontext:
- movl 4(%esp), %eax
-
- movl %fs, 8(%eax)
- movl %es, 12(%eax)
- movl %ds, 16(%eax)
- movl %ss, 76(%eax)
- movl %edi, 20(%eax)
- movl %esi, 24(%eax)
- movl %ebp, 28(%eax)
- movl %ebx, 36(%eax)
- movl %edx, 40(%eax)
- movl %ecx, 44(%eax)
-
- movl $1, 48(%eax) /* %eax */
- movl (%esp), %ecx /* %eip */
- movl %ecx, 60(%eax)
- leal 4(%esp), %ecx /* %esp */
- movl %ecx, 72(%eax)
-
- movl 44(%eax), %ecx /* restore %ecx */
- movl $0, %eax
- ret
-
-.globl _setmcontext
-_setmcontext:
- movl 4(%esp), %eax
-
- movl 8(%eax), %fs
- movl 12(%eax), %es
- movl 16(%eax), %ds
- movl 76(%eax), %ss
- movl 20(%eax), %edi
- movl 24(%eax), %esi
- movl 28(%eax), %ebp
- movl 36(%eax), %ebx
- movl 40(%eax), %edx
- movl 44(%eax), %ecx
-
- movl 72(%eax), %esp
- pushl 60(%eax) /* new %eip */
- movl 48(%eax), %eax
- ret
-