summaryrefslogtreecommitdiff
path: root/Kernel/API
diff options
context:
space:
mode:
authorDaniel Bertalan <dani@danielbertalan.dev>2021-12-04 09:15:19 +0100
committerBrian Gianforcaro <b.gianfo@gmail.com>2021-12-04 11:59:59 -0800
commit294cb3cef483b1a99a47bc715bff3e4b27e0d409 (patch)
tree19625fa4e36efcc32a4ed2586f394fab9b2ca391 /Kernel/API
parent9b90f1fed5a81c52f006203ee2212f28bdc470d3 (diff)
downloadserenity-294cb3cef483b1a99a47bc715bff3e4b27e0d409.zip
Kernel: Wrap x86 assembly behind `ARCH(...)` in Syscall.h
Unlike GCC, Clang parses assembly eagerly, and immediately rejects inline assembly that's not for the right architecture.
Diffstat (limited to 'Kernel/API')
-rw-r--r--Kernel/API/Syscall.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h
index eb27f678cd..019a471db9 100644
--- a/Kernel/API/Syscall.h
+++ b/Kernel/API/Syscall.h
@@ -489,6 +489,7 @@ struct SC_statvfs_params {
void initialize();
int sync();
+# if ARCH(I386) || ARCH(X86_64)
inline uintptr_t invoke(Function function)
{
uintptr_t result;
@@ -542,6 +543,7 @@ inline uintptr_t invoke(Function function, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
: "memory");
return result;
}
+# endif
#endif
}