Skip to content

Conversation

@adamgemmell
Copy link
Contributor

@adamgemmell adamgemmell commented Dec 1, 2025

Fixes #149399 - this implication was likely a mistake and isn't enforced by LLVM. This is is a breaking change and any users specifying vfp2/3/4 via -Ctarget-features or the target_feature attribute will need to add d32 in to get the same behaviour. The target features are unstable so this is ok for Rust, and this is necessary as otherwise there's no way to specify a vfp2-d16 configuration, for example.

I expect these targets would have been broken by #149173 as -d32 would have disabled any +vfpX feature before it. With the removal of the implication the -d32 went back to being unnecessary, but I've removed it anyway.

As @RalfJung pointed out, thumbv7a-nuttx-eabihf looks to have been relying on this implication so I've added +d32 to it's target spec.

-neon might be unnecessary too in many of these cases, but some default CPUs that Rust specifies will turn Neon on so that needs a bit more care. I can't see any LLVM cpus that enable D32.

@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 1, 2025
@rustbot
Copy link
Collaborator

rustbot commented Dec 1, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@adamgemmell
Copy link
Contributor Author

r? compiler

Rerolling my boss

@rustbot rustbot assigned nnethercote and unassigned davidtwco Dec 1, 2025
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's also compiler/rustc_target/src/spec/targets/armv7a_nuttx_eabihf.rs which doesn't have a comment like this but maybe should be consistent in terms of target features?

Cc @no1wudi

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then there are thumbv7em_none_eabihf and thumbv7em_nuttx_eabihf which currently use the vfp4d16sp target feature which doesn't even exist as a Rust feature... no idea what to do with those, should that just become vfp4 since d16 is the default? Does the sp part mean there's something extra special going on here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vfp4d16sp in thumbv7em_nuttx_eabihf is derived from thumbv7em_none_eabihf , I guess this is from clang?

@nnethercote
Copy link
Contributor

@rustbot rustbot assigned RalfJung and unassigned nnethercote Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

6 participants