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.
This commit is contained in:
Daniel Bertalan 2021-12-04 09:15:19 +01:00 committed by Brian Gianforcaro
parent 9b90f1fed5
commit 294cb3cef4
Notes: sideshowbarker 2024-07-17 23:11:13 +09:00

View file

@ -489,6 +489,7 @@ struct SC_statvfs_params {
void initialize(); void initialize();
int sync(); int sync();
# if ARCH(I386) || ARCH(X86_64)
inline uintptr_t invoke(Function function) inline uintptr_t invoke(Function function)
{ {
uintptr_t result; uintptr_t result;
@ -542,6 +543,7 @@ inline uintptr_t invoke(Function function, T1 arg1, T2 arg2, T3 arg3, T4 arg4)
: "memory"); : "memory");
return result; return result;
} }
# endif
#endif #endif
} }