diff options
Diffstat (limited to 'src/user/lib/syscall.s')
-rw-r--r-- | src/user/lib/syscall.s | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/user/lib/syscall.s b/src/user/lib/syscall.s index 0f9e444..07f5631 100644 --- a/src/user/lib/syscall.s +++ b/src/user/lib/syscall.s @@ -2,24 +2,8 @@ .global _syscall .type _syscall, @function _syscall: - push %rbx // preserve registers - push %rsi - push %rdi - push %rbp - - // NOT the calling convention TODO you lazy fuck - mov 20(%rsp), %rax - mov 24(%rsp), %rbx - mov %rsp, %rcx - mov $_syscall_ret, %rdx - mov 28(%rsp), %rsi - mov 32(%rsp), %rdi - mov 36(%rsp), %rbp - sysenter - -_syscall_ret: - pop %rbp - pop %rdi - pop %rsi - pop %rbx + push %r10 + mov %rcx, %r10 + syscall + pop %r10 ret |