summaryrefslogtreecommitdiff
path: root/Kernel/API
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2022-10-04 03:05:54 +0300
committerAndreas Kling <kling@serenityos.org>2022-12-28 11:53:41 +0100
commit5ff318cf3ac7d12470c357ba0bac8cd7ffa10e3e (patch)
tree36b3982d64e9602e80f990ed86790d8868827998 /Kernel/API
parent32270dcd20344ae2cd753232634cdcd4f0a4300e (diff)
downloadserenity-5ff318cf3ac7d12470c357ba0bac8cd7ffa10e3e.zip
Kernel: Remove i686 support
Diffstat (limited to 'Kernel/API')
-rw-r--r--Kernel/API/Syscall.h45
1 files changed, 10 insertions, 35 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index 9109e83277..0d0a0555ee 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -519,16 +519,11 @@ struct SC_faccessat_params {
void initialize();
int sync();
-# if ARCH(I386) || ARCH(X86_64) || ARCH(AARCH64)
+# if ARCH(X86_64) || ARCH(AARCH64)
inline uintptr_t invoke(Function function)
{
uintptr_t result;
-# if ARCH(I386)
- asm volatile("int $0x82"
- : "=a"(result)
- : "a"(function)
- : "memory");
-# elif ARCH(X86_64)
+# if ARCH(X86_64)
asm volatile("syscall"
: "=a"(result)
: "a"(function)
@@ -549,17 +544,12 @@ template<typename T1>
inline uintptr_t invoke(Function function, T1 arg1)
{
uintptr_t result;
-# if ARCH(I386)
- asm volatile("int $0x82"
- : "=a"(result)
- : "a"(function), "d"((uintptr_t)arg1)
- : "memory");
-# elif ARCH(X86_64)
+# if ARCH(X86_64)
asm volatile("syscall"
: "=a"(result)
: "a"(function), "d"((uintptr_t)arg1)
: "rcx", "r11", "memory");
-# else
+# elif ARCH(AARCH64)
register uintptr_t x0 asm("x0");
register uintptr_t x1 asm("x1") = arg1;
register uintptr_t x8 asm("x8") = function;
@@ -576,17 +566,12 @@ template<typename T1, typename T2>
inline uintptr_t invoke(Function function, T1 arg1, T2 arg2)
{
uintptr_t result;
-# if ARCH(I386)
- asm volatile("int $0x82"
- : "=a"(result)
- : "a"(function), "d"((uintptr_t)arg1), "c"((uintptr_t)arg2)
- : "memory");
-# elif ARCH(X86_64)
+# if ARCH(X86_64)
asm volatile("syscall"
: "=a"(result)
: "a"(function), "d"((uintptr_t)arg1), "D"((uintptr_t)arg2)
: "rcx", "r11", "memory");
-# else
+# elif ARCH(AARCH64)
register uintptr_t x0 asm("x0");
register uintptr_t x1 asm("x1") = arg1;
register uintptr_t x2 asm("x2") = arg2;
@@ -604,17 +589,12 @@ template<typename T1, typename T2, typename T3>
inline uintptr_t invoke(Function function, T1 arg1, T2 arg2, T3 arg3)
{
uintptr_t result;
-# if ARCH(I386)
- asm volatile("int $0x82"
- : "=a"(result)
- : "a"(function), "d"((uintptr_t)arg1), "c"((uintptr_t)arg2), "b"((uintptr_t)arg3)
- : "memory");
-# elif ARCH(X86_64)
+# if ARCH(X86_64)
asm volatile("syscall"
: "=a"(result)
: "a"(function), "d"((uintptr_t)arg1), "D"((uintptr_t)arg2), "b"((uintptr_t)arg3)
: "rcx", "r11", "memory");
-# else
+# elif ARCH(AARCH64)
register uintptr_t x0 asm("x0");
register uintptr_t x1 asm("x1") = arg1;
register uintptr_t x2 asm("x2") = arg2;
@@ -633,17 +613,12 @@ template<typename T1, typename T2, typename T3, typename T4>
inline uintptr_t invoke(Function function, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
{
uintptr_t result;
-# if ARCH(I386)
- asm volatile("int $0x82"
- : "=a"(result)
- : "a"(function), "d"((uintptr_t)arg1), "c"((uintptr_t)arg2), "b"((uintptr_t)arg3), "S"((uintptr_t)arg4)
- : "memory");
-# elif ARCH(X86_64)
+# if ARCH(X86_64)
asm volatile("syscall"
: "=a"(result)
: "a"(function), "d"((uintptr_t)arg1), "D"((uintptr_t)arg2), "b"((uintptr_t)arg3), "S"((uintptr_t)arg4)
: "memory");
-# else
+# elif ARCH(AARCH64)
register uintptr_t x0 asm("x0");
register uintptr_t x1 asm("x1") = arg1;
register uintptr_t x2 asm("x2") = arg2;