You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in particular, -fcall-saved-REG is used by linux on x86 (i.e., both i386 and amd64) for an optimized ABI for a few specific functions. since clang ignores this switch (for completeness, i added the other two related switches too) the generated machine code is not correct and results in runtime failure. the workaround on the linux side is to disable CONFIG_ARCH_HWEIGHT_CFLAGS for now.
The text was updated successfully, but these errors were encountered:
Not used anymore on x86 or x86-64 now, only arm64.
I'd recommend not implementing this in clang and having the kernel use one of the alternate calling conventions for these functions instead (e.g. "coldcc" or "preserve_allcc"), if desired.
The Clang/LLVM flags I've linked in this bug will ship in Clang-8. The above kernel patch will land in Linux-4.20.
Since these flags are no longer used for other archs, and only in the kernel, I'm closing this bug. Please open a new one if you'd like support for other archs or -fcall-used.
llvmbot
transferred this issue from llvm/llvm-bugzilla-archive
Dec 3, 2021
Extended Description
in particular, -fcall-saved-REG is used by linux on x86 (i.e., both i386 and amd64) for an optimized ABI for a few specific functions. since clang ignores this switch (for completeness, i added the other two related switches too) the generated machine code is not correct and results in runtime failure. the workaround on the linux side is to disable CONFIG_ARCH_HWEIGHT_CFLAGS for now.
The text was updated successfully, but these errors were encountered: