-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.18.0 armv7 regression: extern-fn-struct-passing-abi assertion failed, passed in 1.17.0 #43329
Comments
Can you try with |
I added this flag to I didn't recompile rustc itself with the flag that you mentioned, however. Did you want me to try that too? |
Hm, no. I think you just proved this is not due to field reordering. |
Those tests look like they are only for x86, so I wonder why they are being run now on arm. |
Oh actually, looking more closely they are just commented for x86 but should always be valid. |
This Anyway, it seems this is not strictly a regression, but rather something that never worked, just wasn't tested until @eddyb, since you added that, any idea what could be missing on ARM? |
The only way to really know is to read the clang source. |
Looking at disassembly, the C side is expecting the The ARM Procedure Call Standard 6.1.2.1 describes the homogeneous aggregate conditions for using VFP, and I found where clang checks for that. We're also already doing this for AArch64 per #24181. I'll work on adding this for ARM hf targets. |
Ah, missing homogenous aggregates would explain it, and adding support for it is fine as long as there is no old version it would break for. |
What's the right way for |
cc @alexcrichton @michaelwoerister for #43329 (comment) - I don't think we have a way to tell, other than by matching on the target triple or something. Maybe there's a target feature? |
AFAIK it's related to the target today, but I'll admit that my knowledge of VFP and ARM things is tenuous at best. My understand though is that:
In that, I think "hf" at the end of the target indicates VFP which I'm taking as transitively implying "hard float" |
Shouldn't it be on a per-function basis? What if someone used LLVM has three ARM-specific /// ARM_APCS - ARM Procedure Calling Standard calling convention (obsolete,
/// but still used on some targets).
ARM_APCS = 66,
/// ARM_AAPCS - ARM Architecture Procedure Calling Standard calling
/// convention (aka EABI). Soft float variant.
ARM_AAPCS = 67,
/// ARM_AAPCS_VFP - Same as ARM_AAPCS, but uses hard floating point ABI.
ARM_AAPCS_VFP = 68, AFAICS Rust only explicitly sets cc @TimNN and @japaric, as I know you two have dealt with ARM ABIs in the past... |
@alexcrichton @cuviper Yeah that's right, if it's |
OK, so for now it's roughly |
Hard-float ARM targets use the AACPS-VFP ABI, which passes and returns homogeneous float/vector aggregates in the VFP registers. Fixes rust-lang#43329.
Same errors on both Debian and Fedora:
The corresponding test succeeded in 1.17 on Debian, though it appears Fedora did not run this test (and ran fewer tests overall) for 1.17 and earlier.
cc @cuviper
The text was updated successfully, but these errors were encountered: