Skip to content

Conversation

@RalfJung
Copy link
Member

This currently fails... not sure if that is a regression, but it might be the same as rust-lang/rust#149314.
@bjorn3 do you think your PR will fix this?

@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2025

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Nov 27, 2025
@RalfJung
Copy link
Member Author

I could just test this, I still have your PR checked out after all... no, turns out it does not fix this.

$ ./x run miri --target armv7-unknown-linux-gnueabihf -- ../miri/tests/pass/target-spec-implies-target-feature.rs
thread 'main' (1000) panicked at ../miri/tests/pass/target-spec-implies-target-feature.rs:6:5:
assertion failed: cfg!(target_feature = "vfp3")

@RalfJung
Copy link
Member Author

However it also already fails before #4648. So we probably need a different test.

@bjorn3
Copy link
Member

bjorn3 commented Nov 27, 2025

My PR should fix this for v7 and thumb2. vfp3 is not a target feature recognized by rustc.

warning: unstable feature specified for `-Ctarget-feature`: `vfp3`
  |
  = note: this feature is not stably supported; its behavior can change in the future

@RalfJung
Copy link
Member Author

vfp3 is missing due to rust-lang/rust#149399.

@RalfJung RalfJung force-pushed the target-spec-features branch from 489cef7 to 65ac530 Compare November 27, 2025 19:35
@RalfJung
Copy link
Member Author

RalfJung commented Nov 27, 2025

FWIW I also tried std::arch::is_arm_feature_detected and that still fails even when I set the LLVM backend. Not sure what is up with that.

error: "v7" feature cannot be detected at run-time
 --> ../miri/tests/pass/target-spec-implies-target-feature.rs:7:13
  |
7 |     assert!(std::arch::is_arm_feature_detected!("v7"));
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |

The macro docs make it sound like if the feature is available at compile time, the macro will work. Maybe I am misunderstanding the comment.

EDIT: I just misunderstood the code, these never work.

@RalfJung RalfJung added S-blocked Status: blocked on something happening somewhere else and removed S-waiting-on-review Status: Waiting for a review to complete labels Nov 27, 2025
@RalfJung
Copy link
Member Author

My PR should fix this for v7 and thumb2

Indeed it does, I confirmed that locally. Great!

@RalfJung
Copy link
Member Author

I integrated this test into #4730.

@RalfJung RalfJung closed this Nov 28, 2025
@RalfJung RalfJung deleted the target-spec-features branch November 28, 2025 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-blocked Status: blocked on something happening somewhere else

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants