about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-11-22 21:07:39 -0500
committerGitHub <noreply@github.com>2024-11-22 21:07:39 -0500
commit7b40a9b7c62878cb9cb7cc8e80d23c819b2d6c8f (patch)
treef8125ef3e15c832abf41e7c93c42b93f66f12818 /compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp
parent2a94e1c2e049bc284497c570a3c1f6080886b030 (diff)
parent666bcbdb2edb829b76d9c2a4447562b397040f36 (diff)
downloadrust-7b40a9b7c62878cb9cb7cc8e80d23c819b2d6c8f.tar.gz
rust-7b40a9b7c62878cb9cb7cc8e80d23c819b2d6c8f.zip
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```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/SymbolWrapper.cpp')
0 files changed, 0 insertions, 0 deletions