diff options
| author | Valery Ushakov <uwe@stderr.spb.ru> | 2017-08-17 00:13:41 +0300 |
|---|---|---|
| committer | Valery Ushakov <uwe@stderr.spb.ru> | 2017-08-17 00:13:41 +0300 |
| commit | 4a062f32e3dd93bf371feb27f3ccc28d7930099e (patch) | |
| tree | 3f82934c7fd112eecc65efa0db68ed759028f76e /emu/Linux/asm-386.S | |
| parent | c12c42236c5882afe34356ec8e4088a6ac9c3629 (diff) | |
| parent | 8823998c509302a526d8711095f664dd06997234 (diff) | |
Merged with inferno-os/inferno-os via default.
Diffstat (limited to 'emu/Linux/asm-386.S')
| -rw-r--r-- | emu/Linux/asm-386.S | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/emu/Linux/asm-386.S b/emu/Linux/asm-386.S index 31946335..fe5ce6c1 100644 --- a/emu/Linux/asm-386.S +++ b/emu/Linux/asm-386.S @@ -1,59 +1,7 @@ .file "asm-Linux-386.S" -#include "syscall.h" .text /* - * executeonnewstack(void *tos, void (*tramp)(void *arg), void *arg) - */ - - .type executeonnewstack,@function - .global executeonnewstack -executeonnewstack: - pushl %ebp - movl %esp, %ebp - pushl %esi - - movl 8(%ebp), %esi /* get tos */ - subl $4, %esi - movl 16(%ebp), %eax - movl %eax, (%esi) /* stash arg on new stack */ - subl $4, %esi - movl 12(%ebp), %eax - movl %eax, (%esi) /* stash tramp on new stack */ - mov %esi, %esp /* swap stacks pronto */ - popl %eax /* recover the tramp address */ - subl %ebp, %ebp /* stop stack traceback here */ - call *%eax /* and jump to it (ho ho) */ - - /* if we return here, tramp didn't do its job */ - - addl $8, %esp /* clean up for pose value */ - - leal SYS_exit, %eax - int $0x80 - -/* - * unlockandexit(int *key) - * - * NB: the return status may be garbaged if the stack is reused - * between the unlock and the system call, but this should - * not matter since no task is waiting for the result - */ - - .type unlockandexit,@function - .global unlockandexit -unlockandexit: - pushl %ebp - movl %esp, %ebp - - movl 8(%ebp), %esi /* get the key address */ - pushl $0 /* exit status 0 */ - movl $0, %eax /* unlock the stack allocator */ - movl %eax, (%esi) - leal SYS_exit, %eax /* call exit */ - int $0x80 - -/* * umult(ulong m1, ulong m2, ulong *hi) */ |
