-
Notifications
You must be signed in to change notification settings - Fork 275
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
Expose is_x86_feature_detected to libcore #464
Comments
This is the correct issue tracker. Since
You could provide it as an independent crate, so that others can use it. Just keep in mind that not all |
I did not realize the feature needed extra support, thank you for the informative reply. |
Appears to be similar to Just keep in mind that a |
I'm currently using code like if cfg!(feature = "use_std") {
is_x86_feature_detected!("sse4.2")
} else {
cfg!(target_feature = "sse4.2")
} to work around this. I wonder if it would make sense for |
We actually want to be able to use full run-time feature detection from |
@RReverser in the mean time, if you end up doing that a lot, it would make sense to just write your own macro to abstract it away. |
@gnzlbg I'm a bit confused by this. For x86, all features are detected via CPUID or via XCR0 (which requires the OS to enable osxsave), both of which are available in usersapce. This means that while OS support is needed to enable these features, no OS support is needed to detect these features. The
Both ring (see the linked issue) and getrandom (for the RDRAND implementation) have had to work around this by duplicating parts of I know the story for other arches is different, but it seems like nothing is preventing providing |
(not sure if this is the correct issue tracker)
This would be useful for Nebulet, which compiles as no_std.
The text was updated successfully, but these errors were encountered: