Bug
In compiler/rustc_target/src/callconv/arm.rs line 96, VFP (hardware floating-point) calling convention detection uses cx.target_spec().llvm_target.ends_with("hf") as a proxy for hard-float ABI. Apple ARM targets (armv7s-apple-ios, armv7k-apple-watchos) set llvm_floatabi: Some(FloatAbi::Hard) via the base spec (line 130-131 of spec/base/apple/mod.rs), but their LLVM triples end with "-ios" or "-watchos", not "hf".
This causes HFA (Homogeneous Floating-point Aggregate) arguments to be passed on the stack instead of in VFP registers on these targets, breaking ABI compatibility with C.
Impact
FFI functions on Apple 32-bit ARM targets may use wrong calling convention for structs like struct { f32, f32, f32, f32 }. These are Tier 3 targets.
Fix
PR #474
Bug
In
compiler/rustc_target/src/callconv/arm.rsline 96, VFP (hardware floating-point) calling convention detection usescx.target_spec().llvm_target.ends_with("hf")as a proxy for hard-float ABI. Apple ARM targets (armv7s-apple-ios,armv7k-apple-watchos) setllvm_floatabi: Some(FloatAbi::Hard)via the base spec (line 130-131 ofspec/base/apple/mod.rs), but their LLVM triples end with "-ios" or "-watchos", not "hf".This causes HFA (Homogeneous Floating-point Aggregate) arguments to be passed on the stack instead of in VFP registers on these targets, breaking ABI compatibility with C.
Impact
FFI functions on Apple 32-bit ARM targets may use wrong calling convention for structs like
struct { f32, f32, f32, f32 }. These are Tier 3 targets.Fix
PR #474