rust/compiler/rustc_target/src
Michael Goulet 7b40a9b7c6
Rollup merge of #133102 - RalfJung:aarch64-softfloat, r=davidtwco,wesleywiser
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-22 21:07:39 -05:00
..
asm Auto merge of #132472 - taiki-e:sparc-asm, r=Amanieu 2024-11-07 21:07:06 +00:00
callconv Rollup merge of #133102 - RalfJung:aarch64-softfloat, r=davidtwco,wesleywiser 2024-11-22 21:07:39 -05:00
spec Rollup merge of #131586 - taiki-e:s390x-vector-abi, r=compiler-errors,uweigand 2024-11-21 11:58:38 +01:00
json.rs compiler: Move impl of ToJson for abi::Endian 2024-10-11 17:41:52 -07:00
lib.rs compiler: Wire {TyAnd,}Layout into rustc_abi 2024-10-11 17:41:52 -07:00
target_features.rs ABI checks: add support for some tier3 arches, warn on others. 2024-11-14 08:57:39 +01:00
tests.rs Use serde_json for target spec json 2022-06-03 16:46:19 +00:00