summaryrefslogtreecommitdiff
path: root/kernel/src/sys
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/src/sys')
-rw-r--r--kernel/src/sys/syscall_asm.S38
1 files changed, 3 insertions, 35 deletions
diff --git a/kernel/src/sys/syscall_asm.S b/kernel/src/sys/syscall_asm.S
index 2e3c0bb..8287e95 100644
--- a/kernel/src/sys/syscall_asm.S
+++ b/kernel/src/sys/syscall_asm.S
@@ -1,47 +1,15 @@
.extern syscall_handler
-.macro pushall
- push %rax
- push %rbx
- push %rcx
- push %rdx
- push %rsi
- push %rdi
- push %r8
- push %r9
- push %r10
- push %r11
- push %r12
- push %r13
- push %r14
- push %r15
-.endm
-
-.macro popall
- pop %r15
- pop %r14
- pop %r13
- pop %r12
- pop %r11
- pop %r10
- pop %r9
- pop %r8
- pop %rdi
- pop %rsi
- pop %rdx
- pop %rcx
- pop %rbx
- pop %rax
-.endm
+#include "x86_64_regs.S"
.global __syscall
__syscall:
pushq %rcx
pushq %r11
- pushall
+ push_caller_saved
call syscall_handler
- popall
+ pop_caller_saved
popfq
popq %rcx