mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:27:43 +00:00
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:
parent
9b90f1fed5
commit
294cb3cef4
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue