Commit: 33cc37bdd2ed039a9b551f93f53a8cd2ea70c8f9
Parent: 9434ba782ac9df4c7ddb2461b89a8b56812e4dd9
Author: Randy Palamar
Date: Sat, 28 Dec 2024 11:19:50 -0700
amd64: force inline syscalls
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/platform_linux_amd64.c b/platform_linux_amd64.c
@@ -44,7 +44,7 @@ typedef u64 sys_fd_set[16];
#define DIRENT_TYPE_OFF 18
#define DIRENT_NAME_OFF 19
-static i64
+static FORCE_INLINE i64
syscall1(i64 n, i64 a1)
{
i64 result;
@@ -56,7 +56,7 @@ syscall1(i64 n, i64 a1)
return result;
}
-static i64
+static FORCE_INLINE i64
syscall2(i64 n, i64 a1, i64 a2)
{
i64 result;
@@ -68,7 +68,7 @@ syscall2(i64 n, i64 a1, i64 a2)
return result;
}
-static i64
+static FORCE_INLINE i64
syscall3(i64 n, i64 a1, i64 a2, i64 a3)
{
i64 result;
@@ -80,7 +80,7 @@ syscall3(i64 n, i64 a1, i64 a2, i64 a3)
return result;
}
-static i64
+static FORCE_INLINE i64
syscall4(i64 n, i64 a1, i64 a2, i64 a3, i64 a4)
{
i64 result;
@@ -94,7 +94,7 @@ syscall4(i64 n, i64 a1, i64 a2, i64 a3, i64 a4)
}
-static i64
+static FORCE_INLINE i64
syscall5(i64 n, i64 a1, i64 a2, i64 a3, i64 a4, i64 a5)
{
i64 result;
@@ -108,7 +108,7 @@ syscall5(i64 n, i64 a1, i64 a2, i64 a3, i64 a4, i64 a5)
return result;
}
-static i64
+static FORCE_INLINE i64
syscall6(i64 n, i64 a1, i64 a2, i64 a3, i64 a4, i64 a5, i64 a6)
{
i64 result;
@@ -139,7 +139,7 @@ new_thread(void *stack_base)
"sub $8, %%rsp\n" // place a 0 return branch pointer on the child's stack
"push (%%rdi)\n" // push the entry point back onto the stack for use by ret
"1: ret\n"
- : : : "rax", "rcx", "rsi", "rdi", "r11", "memory"
+ ::: "rax", "rcx", "rsi", "rdi", "r11", "memory"
);
}