-
Notifications
You must be signed in to change notification settings - Fork 352
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
Support is_x86_feature_detected!()
#932
Comments
Yeah inline assembly won't happen any time soon... Do you know where |
The macro first checks if it is enabled for the whole crate using |
So maybe we could convince the stdarch maintainers to add a |
ideally we could add a |
Should address rust-lang/miri#932
Or actually in the function calling it :) |
Should address rust-lang/miri#932
rust-lang/stdarch#803 landed. What does that mean for this issue? Can we land a new test in Miri for this? |
You may have to wait until the change enters libstd, I'm afraid. |
So the way This means that, if This implementation of From a language spec perspective, a user cannot use This would mean that targeting, e.g., (cc @bjorn3 - this doesn't solve the related Cranelift issue at all which from this perspective is more complicated to solve I think, but it would be better to discuss how to solve that in a different issue). |
@gnzlbg That all makes a lot of sense, thank you. |
This should also allow This wouldn't be of much practical use right now, since there aren't many features that the " However, there are some things that the " |
Miri for me is choking on usages of
is_x86_feature_detected!()
(specifically the inline assembly it uses to invokecpuid
) in two different crates:These crates of course can be patched to use
#[cfg(miri)]
but it seems to me like Miri could also just override the internals ofis_x86_feature_detected!()
to return false for all features it doesn't support, so these crates automatically fall back to implementations that Miri may already be able to evaluate. memchr may need further patching to work correctly in Miri but I think this would be worth the effort anyway.The text was updated successfully, but these errors were encountered: