Skip to content
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

cpufeatures: requesting support for x86-64 microarchitecture levels #735

Open
indygreg opened this issue Feb 13, 2022 · 1 comment
Open

Comments

@indygreg
Copy link

There are now well-defined microarchitecture levels for x86-64: x86-64-v2, x86-64-v3, and x86-64-v4 (https://gitlab.com/x86-psABIs/x86-64-ABI/-/blob/master/x86-64-ABI/low-level-sys-info.tex).

Each level is effectively a test for presence of various x86-64 CPU features.

Do you think it makes sense for cpufeatures to gain functionality for testing whether the current machine meets a given x86-64 microarchitecture level and/or resolving the current microarchitecture levels supported by the host CPU?

Thanks for this easy-to-use crate!

@newpavlov
Copy link
Member

We could add it as a convenience shortcut for a set of features. But you still would have to list all features manually in your code using #[target_feature(enable = "..")], which is far from being ergonomic, so personally I think we should wait until support of microarchitecture levels will be added to Rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants