* Matheus Afonso Martins Moreira via Gcc: > + It's stable > > This is one of the things which makes Linux unique > in the operating system landscape: applications > can target the kernel directly. Unlike in virtually > every other operating system out there, the Linux kernel > to user space binary interface is documented[2] as stable. > Breaking it is considered a regression in the kernel. > Therefore it makes sense for a compiler to target it. > The same is not true for any other operating system.
There is quite a bit of variance in how the kernel is entered. On x86-64, one once popular mechanism is longer present in widely-used kernels. For POWER, the preferred way changed over time. Likewise for i386. > + It's a calling convention > > GCC already supports many calling conventions > via function attributes. On x86 alone[3] there's > cdecl, fastcall, thiscall, stdcall, ms_abi, sysv_abi, > Win32 specific hot patching hooks. So I believe this > would not at all be a strange addition to the compiler. But using a builtin obfuscates that relationship. There is no __builtin_call_ms_abi, is there? Thanks, Florian