summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64/syscall.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/x86_64/syscall.S')
-rw-r--r--libc/sysdeps/linux/x86_64/syscall.S15
1 files changed, 8 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/x86_64/syscall.S b/libc/sysdeps/linux/x86_64/syscall.S
index 0ec272566..23ff07ac1 100644
--- a/libc/sysdeps/linux/x86_64/syscall.S
+++ b/libc/sysdeps/linux/x86_64/syscall.S
@@ -23,9 +23,10 @@
We need to do some arg shifting, the syscall_number will be in
rax. */
-.globl syscall;
-.type syscall,@function;
-.align 16;
+.text
+.globl syscall
+.type syscall,@function
+.align 16
syscall:
movq %rdi, %rax /* Syscall number -> rax. */
movq %rsi, %rdi /* shift arg1 - arg5. */
@@ -36,10 +37,10 @@ syscall:
movq 8(%rsp),%r9 /* arg6 is on the stack. */
syscall /* Do the system call. */
cmpq $-4095, %rax /* Check %rax for error. */
- jae __syscall_error /* Branch forward if it failed. */
+ jae __error /* Branch forward if it failed. */
ret /* Return to caller. */
-__syscall_error:
- /* TODO: implement this ! :D */
+__error:
+ jmp __syscall_error
-.size syscall,.-syscall;
+.size syscall,.-syscall