summaryrefslogtreecommitdiff
path: root/lib/std/syscall+linux-x64.s
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
committerOri Bernstein <ori@eigenstate.org>2015-08-26 12:20:58 -0700
commit2bc852bda98762d3bc01548bf972e3f1b137fbfb (patch)
tree74831deed3c9057c5fe0cbb8790d220e855bc792 /lib/std/syscall+linux-x64.s
parent3de952510eb2a23350d24ed926f19c0cf72a12f2 (diff)
downloadmc-2bc852bda98762d3bc01548bf972e3f1b137fbfb.tar.gz
Move Myrddin libs to lib/ subdirectory.
Diffstat (limited to 'lib/std/syscall+linux-x64.s')
-rw-r--r--lib/std/syscall+linux-x64.s22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/std/syscall+linux-x64.s b/lib/std/syscall+linux-x64.s
new file mode 100644
index 0000000..f7c020d
--- /dev/null
+++ b/lib/std/syscall+linux-x64.s
@@ -0,0 +1,22 @@
+.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
+