diff options
| author | rsc <devnull@localhost> | 2003-09-30 17:47:42 +0000 |
|---|---|---|
| committer | rsc <devnull@localhost> | 2003-09-30 17:47:42 +0000 |
| commit | 76193d7cb0457807b2f0b95f909ab5de19480cd7 (patch) | |
| tree | 97e538c7e38181431e90289a0fe8b6b7ce1f8f3c /src/libthread/asm-FreeBSD-386.s | |
| parent | ed7c8e8d02c02bdbff1e88a6d8d1419f39af48ad (diff) | |
| download | plan9port-76193d7cb0457807b2f0b95f909ab5de19480cd7.tar.gz plan9port-76193d7cb0457807b2f0b95f909ab5de19480cd7.zip | |
Initial revision
Diffstat (limited to 'src/libthread/asm-FreeBSD-386.s')
| -rw-r--r-- | src/libthread/asm-FreeBSD-386.s | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/libthread/asm-FreeBSD-386.s b/src/libthread/asm-FreeBSD-386.s new file mode 100644 index 00000000..7cad85cc --- /dev/null +++ b/src/libthread/asm-FreeBSD-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 %eax, 1 + ret +iszero: + movl %eax, 0 + ret + |
