This is a follow-up to D94143 which added the necessary support in LLVM.
ILP32 mode is enabled by specifying an ILP32 target (aarch64[_be]-*-gnu_ilp32) with -target.
Paths
| Differential D104931
[AArch64] Wire up ILP32 ABI support in Clang Needs ReviewPublic Authored by Amanieu on Jun 25 2021, 10:50 AM.
Details
Summary This is a follow-up to D94143 which added the necessary support in LLVM. ILP32 mode is enabled by specifying an ILP32 target (aarch64[_be]-*-gnu_ilp32) with -target.
Diff Detail
Event TimelineComment Actions The linux kernel uses a build time invocation of the compiler for feature detection of the -mabi=lp64 command line flag, which clang-16 currently doesn't support. Looking at https://gcc.gnu.org/onlinedocs/gcc/AArch64-Options.html, it looks like an alternate value of -mabi=ilp32. Should this patch wire that up in clang? Comment Actions The situation around -mabi for AArch64 is a bit awkward: Clang uses it to select the ARM64 calling convention (-mabi=aapcs vs -mabi=darwinpcs) while GCC uses it to select between LP64 and ILP32. I'm not sure how we should be handling this. Comment Actions We need some tests. https://maskray.me/blog/2021-08-08-toolchain-testing#i-dont-know-whether-a-test-is-needed Adding some to clang/test/Preprocessor/init-aarch64.c should cover many changes, but we also need one to cover setDataLayout.
Revision Contents
Diff 354550 clang/lib/Basic/Targets/AArch64.cpp
|