summaryrefslogtreecommitdiffstats
path: root/src/libthread/asm-OpenBSD-386.s
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2004-03-25 23:03:57 +0000
committerrsc <devnull@localhost>2004-03-25 23:03:57 +0000
commit8ad517944e46710ab832350c0dc3fc4e9239f7e2 (patch)
tree7b99a1833e1b303719c2aac75e3f7e82482b42ab /src/libthread/asm-OpenBSD-386.s
parentcb27443abf3d6af6ab52377c71c843e619928433 (diff)
downloadplan9port-8ad517944e46710ab832350c0dc3fc4e9239f7e2.tar.gz
plan9port-8ad517944e46710ab832350c0dc3fc4e9239f7e2.zip
Today's changes.
More changes.
Diffstat (limited to 'src/libthread/asm-OpenBSD-386.s')
-rw-r--r--src/libthread/asm-OpenBSD-386.s49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/libthread/asm-OpenBSD-386.s b/src/libthread/asm-OpenBSD-386.s
new file mode 100644
index 00000000..35e2ab6f
--- /dev/null
+++ b/src/libthread/asm-OpenBSD-386.s
@@ -0,0 +1,49 @@
+.globl _setlabel
+.type _setlabel,@function
+
+_setlabel:
+ movl 4(%esp), %eax
+ movl 0(%esp), %edx
+ movl %edx, 0(%eax)
+ movl %ebx, 4(%eax)
+ movl %esp, 8(%eax)
+ movl %ebp, 12(%eax)
+ movl %esi, 16(%eax)
+ movl %edi, 20(%eax)
+ xorl %eax, %eax
+ ret
+
+.globl _gotolabel
+.type _gotolabel,@function
+
+_gotolabel:
+ movl 4(%esp), %edx
+ movl 0(%edx), %ecx
+ movl 4(%edx), %ebx
+ movl 8(%edx), %esp
+ movl 12(%edx), %ebp
+ movl 16(%edx), %esi
+ movl 20(%edx), %edi
+ xorl %eax, %eax
+ incl %eax
+ movl %ecx, 0(%esp)
+ ret
+
+
+# .globl _xinc
+# _xinc:
+# movl 4(%esp), %eax
+# lock incl 0(%eax)
+# ret
+#
+# .globl _xdec
+# _xdec:
+# movl 4(%esp), %eax
+# lock decl 0(%eax)
+# jz iszero
+# movl $1, %eax
+# ret
+# iszero:
+# movl $0, %eax
+# ret
+#