Libcall calling convention mismatch on 32-bit arm hardfloat
Discovered by @Shnatsel at https://github.com/rust-lang/compiler-builtins/pull/1270.
On arm32 we use `aapcs_on_arm` for all float intrinsics so f16/f32/f64 get passed in GPRs. However, it looks like on hardfloat targets LLVM is expecting them to be passed in float registers - at least for `__extenddftf2`. This hasn't been noticed before because the libcalls aren't typically needed on armhf, but they are with f128.
I'm actually not sure why we need to use `extern "aapcs"` at all: If aapcs is the default on softfloat targets and hardfloat targets want floats in fpregs, could we just delete `aapcs_on_arm` and use `extern "C"`?
Extremely long example showing all our libcalls https://rust.godbolt.org/z/rqx8v88bq
10 条评论