summary refs log tree commit diff
path: root/compiler/rustc_target/src/callconv
AgeCommit message (Collapse)AuthorLines
2024-12-18make no-variant types a dedicated Variants variantRalf Jung-3/+3
2024-12-13Fix powerpc64 big-endian FreeBSD ABITaiki Endo-1/+1
2024-12-02rust_for_linux: -Zreg-struct-return commandline flag for X86 (#116973)Andrew Zhogin-2/+5
2024-11-22Rollup merge of #133102 - RalfJung:aarch64-softfloat, r=davidtwco,wesleywiserMichael Goulet-5/+58
aarch64 softfloat target: always pass floats in int registers This is a part of https://github.com/rust-lang/rust/issues/131058: on softfloat aarch64 targets, the float registers may be unavailable. And yet, LLVM will happily use them to pass float types if the corresponding target features are enabled. That's a problem as it means enabling/disabling `neon` instructions can change the ABI. Other targets have a `soft-float` target feature that forces the use of the soft-float ABI no matter whether float registers are enabled or not; aarch64 has nothing like that. So we follow the aarch64 [softfloat ABI](https://github.com/rust-lang/rust/issues/131058#issuecomment-2385027423) and treat floats like integers for `extern "C"` functions. For the "Rust" ABI, we do the same for scalars, and then just do something reasonable for ScalarPair that avoids the pointer indirection. Cc ```@workingjubilee```
2024-11-20aarch64 softfloat target: always pass floats in int registersRalf Jung-5/+58
2024-11-14Support s390x z13 vector ABITaiki Endo-8/+18
2024-11-08pointee_info_at: fix logic for recursing into enumsRalf Jung-1/+2
2024-10-29compiler: `rustc_abi::Abi` => `BackendRepr`Jubilee Young-65/+81
The initial naming of "Abi" was an awful mistake, conveying wrong ideas about how psABIs worked and even more about what the enum meant. It was only meant to represent the way the value would be described to a codegen backend as it was lowered to that intermediate representation. It was never meant to mean anything about the actual psABI handling! The conflation is because LLVM typically will associate a certain form with a certain ABI, but even that does not hold when the special cases that actually exist arise, plus the IR annotations that modify the ABI. Reframe `rustc_abi::Abi` as the `BackendRepr` of the type, and rename `BackendRepr::Aggregate` as `BackendRepr::Memory`. Unfortunately, due to the persistent misunderstandings, this too is now incorrect: - Scattered ABI-relevant code is entangled with BackendRepr - We do not always pre-compute a correct BackendRepr that reflects how we "actually" want this value to be handled, so we leave the backend interface to also inject various special-cases here - In some cases `BackendRepr::Memory` is a "real" aggregate, but in others it is in fact using memory, and in some cases it is a scalar! Our rustc-to-backend lowering code handles this sort of thing right now. That will eventually be addressed by lifting duplicated lowering code to either rustc_codegen_ssa or rustc_target as appropriate.
2024-10-23Set `signext` or `zeroext` for integer arguments on LoongArch64Asuna-0/+29
2024-10-23Set `signext` or `zeroext` for integer arguments on RISC-VAsuna-0/+28
2024-10-23Introduce `adjust_for_rust_abi` in `rustc_target`Asuna-3/+151
2024-10-18compiler: Revert -Zregparm handling for extern RustJubilee Young-22/+0
2024-10-18rust_for_linux: -Zregparm=<N> commandline flag for X86 (#116972)Andrew Zhogin-49/+99
2024-10-11compiler: Wire `{TyAnd,}Layout` into `rustc_abi`Jubilee Young-247/+2
This finally unites TyAndLayout, Layout, and LayoutS into the same crate, as one might imagine they would be placed. No functional changes.
2024-10-11compiler: Empty out rustc_target::abiJubilee Young-0/+3807