Remove d32 feature from 32-bit Arm targets - #160911
Conversation
|
These commits modify compiler targets. |
|
r? @nnethercote rustbot has assigned @nnethercote. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| cfg_abi: CfgAbi::EabiHf, | ||
| llvm_floatabi: Some(FloatAbi::Hard), | ||
| features: "+vfp3d16,-neon,+strict-align".into(), | ||
| features: "-fpregs,+vfp3d16,+strict-align".into(), |
There was a problem hiding this comment.
Why are the T32 and A32 targets different? Could we leave a note here to explain that?
0fe7381 to
23bf4d0
Compare
What does neon have to do with d32? Is there some implication here? And does that mean disabling d32 also disables neon? |
This comment has been minimized.
This comment has been minimized.
23bf4d0 to
0d0e526
Compare
neon implies vfp3 implies d32. So yes |
|
Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb |
|
We can have "neon" imply "fpregs" on the Rust side I think, if the target maintainers think that's a good idea. (Or I guess it would be vfp2 -> fpregs?) |
|
I built the branch, and the cfg changes check out: $ diff <(RUSTUP_TOOLCHAIN=nightly rustc --print cfg --target armv7a-none-eabihf) <(RUSTUP_TOOLCHAIN=stage1 rustc --print cfg --target armv7a-none-eabihf)
11d10
< target_feature="d32"
23d21
< target_feature="vfp3"
$ diff <(RUSTUP_TOOLCHAIN=nightly rustc --print cfg --target thumbv7a-none-eabihf) <(RUSTUP_TOOLCHAIN=stage1 rustc --print cfg --target thumbv7a-none-eabihf)
11d10
< target_feature="d32"
24d22
< target_feature="vfp3"LGTM. |
vfp2 -> fpregs is probably what I'll do yeah - we're currently planning to look at arm target features next quarter. |
Fixes #159973
In #149512 I removed
-d32from some specs, but since LLVM enablesneonby default for v7 targetsd32was left enabled while it should be optional on this target. For a similar reason-d32was removed from some armv6 targets and has been readded.This PR adds a test to ensure this specific instance does not happen again and has been tested locally on armv7-unknown-linux-gnueabihf, armv7a-none-eabihf and arm-unknown-linux-gnueabihf.
It might be a good idea in general to have a test that runs
--print cfgand captures the set of rust target features enabled to show when PRs change them, but most of these targets are not run in Rust's CI so it's out of scope for this issue.For reference, here is the manually-expanded LLVM features and their implications - necessary as these targets rely on a feature from LLVM that Rust doesn't yet expose: