Skip to content

[AArch64] Add support for the GNU ILP32 ABI #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2021

Conversation

Amanieu
Copy link
Member

@Amanieu Amanieu commented Jan 20, 2021

Differential Revision: https://reviews.llvm.org/D94143

Add the aarch64[_be]-*-gnu_ilp32 targets to support the GNU ILP32 ABI for AArch64.

The needed codegen changes were mostly already implemented in D61259, which added support for the watchOS ILP32 ABI. The main changes are:
- Wiring up the new target to enable ILP32 codegen and MC.
- ILP32 va_list support.
- ILP32 TLSDESC relocation support.

There was existing MC support for ELF ILP32 relocations from D25159 which could be enabled by passing "-target-abi ilp32" to llvm-mc. This was changed to check for "gnu_ilp32" in the target triple instead. This shouldn't cause any issues since the existing support was slightly broken: it was generating ELF64 objects instead of the ELF32 object files expected by the GNU ILP32 toolchain.

This target has been tested by running the full rustc testsuite on a big-endian ILP32 system based on the GCC ILP32 toolchain.

Reviewed By: kristof.beyls

Differential Revision: https://reviews.llvm.org/D94143
@cuviper
Copy link
Member

cuviper commented Jan 20, 2021

Did you intentionally omit the changes to isAArch64 in Triple.h?

@Amanieu
Copy link
Member Author

Amanieu commented Jan 20, 2021

Yes, LLVM 11 doesn't have the isAArch64 overload that takes a pointer size argument. It's only used in Clang anyways.

@cuviper
Copy link
Member

cuviper commented Jan 20, 2021

Ah, I didn't notice there were multiple isAArch64 on main. LGTM!

@cuviper cuviper merged commit 70d09f2 into rust-lang:rustc/11.0-2021-01-05 Jan 20, 2021
vext01 added a commit to vext01/llvm-project that referenced this pull request Oct 5, 2023
88: Don't assume that there is a 1-1 mapping between LLVM an Yk IR instructions. r=ltratt a=vext01



Co-authored-by: Edd Barrett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants