aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:52 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 18:24:51 -0500
commitf5e48e94a2f4d4bbd6e5628c7f2afafc6dbcc459 (patch)
tree93b156621dc0303816b37f60ba88051b702d92f6 /lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp
parentbd5969fc876a10b18613302db7087ef3c40f18e1 (diff)
build: Build mlibc + add distclean target
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp')
-rw-r--r--lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp78
1 files changed, 0 insertions, 78 deletions
diff --git a/lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp b/lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp
deleted file mode 100644
index d2ebbe7..0000000
--- a/lib/mlibc/sysdeps/linux/x86_64/arch-syscall.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-#include <sys/syscall.h>
-#include <bits/syscall.h>
-
-using sc_word_t = __sc_word_t;
-
-sc_word_t __do_syscall0(long sc) {
- sc_word_t ret;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall1(long sc,
- sc_word_t arg1) {
- sc_word_t ret;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall2(long sc,
- sc_word_t arg1, sc_word_t arg2) {
- sc_word_t ret;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1), "S"(arg2)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall3(long sc,
- sc_word_t arg1, sc_word_t arg2, sc_word_t arg3) {
- sc_word_t ret;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1), "S"(arg2), "d"(arg3)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall4(long sc,
- sc_word_t arg1, sc_word_t arg2, sc_word_t arg3,
- sc_word_t arg4) {
- sc_word_t ret;
- register sc_word_t arg4_reg asm("r10") = arg4;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1), "S"(arg2), "d"(arg3),
- "r"(arg4_reg)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall5(long sc,
- sc_word_t arg1, sc_word_t arg2, sc_word_t arg3,
- sc_word_t arg4, sc_word_t arg5) {
- sc_word_t ret;
- register sc_word_t arg4_reg asm("r10") = arg4;
- register sc_word_t arg5_reg asm("r8") = arg5;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1), "S"(arg2), "d"(arg3),
- "r"(arg4_reg), "r"(arg5_reg)
- : "rcx", "r11", "memory");
- return ret;
-}
-
-sc_word_t __do_syscall6(long sc,
- sc_word_t arg1, sc_word_t arg2, sc_word_t arg3,
- sc_word_t arg4, sc_word_t arg5, sc_word_t arg6) {
- sc_word_t ret;
- register sc_word_t arg4_reg asm("r10") = arg4;
- register sc_word_t arg5_reg asm("r8") = arg5;
- register sc_word_t arg6_reg asm("r9") = arg6;
- asm volatile ("syscall" : "=a"(ret)
- : "a"(sc), "D"(arg1), "S"(arg2), "d"(arg3),
- "r"(arg4_reg), "r"(arg5_reg), "r"(arg6_reg)
- : "rcx", "r11", "memory");
- return ret;
-}