diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-09-03 09:35:19 -0400 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-09-04 16:06:00 -0400 |
commit | 177875c6a96d728a9a35ab6a52fd00a4ff837ce1 (patch) | |
tree | 9230515d91090b5e074f856abb741da0bc326839 /lib/std/syscall+linux-x64.s | |
parent | ca51f97ae84297763505654567d38a74dc8dad5b (diff) | |
download | mc-177875c6a96d728a9a35ab6a52fd00a4ff837ce1.tar.gz |
Split lib/sys out of lib/std
Diffstat (limited to 'lib/std/syscall+linux-x64.s')
-rw-r--r-- | lib/std/syscall+linux-x64.s | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/lib/std/syscall+linux-x64.s b/lib/std/syscall+linux-x64.s deleted file mode 100644 index 53291cb..0000000 --- a/lib/std/syscall+linux-x64.s +++ /dev/null @@ -1,49 +0,0 @@ -.globl sys$syscall -sys$syscall: - /* - hack: We load 6 args regardless of - how many we actually have. This may - load junk values, but if the syscall - doesn't use them, it's going to be - harmless. - */ - movq %rdi,%rax - /* 8(%rsp): hidden type arg */ - movq 16(%rsp),%rdi - movq 24(%rsp),%rsi - movq 32(%rsp),%rdx - movq 40(%rsp),%r10 - movq 48(%rsp),%r8 - movq 56(%rsp),%r9 - - syscall - - ret - -/* clone(flags, stack, ptid, tls, ctid, regs) */ -.globl sys$fnclone -sys$fnclone: - pushq %r15 - /* %rsp is modified by clone(), so it's saved here */ - movq 16(%rsp),%r15 - /* - %rdi: flags, %rsi: stack, %rdx: ptid, - %rcx: tls, %r8: ctid, %r9: regs - */ - movq $56,%rax /* syscall num */ - movq %rcx,%r10 /* tls */ - syscall - - /* fn() */ - testl %eax,%eax - jnz parent - call *%r15 - - /* exit(0) */ - movq $60, %rax /* exit */ - movq $0, %rdi /* arg: 0 */ - syscall - -parent: - popq %r15 - ret |