-
Notifications
You must be signed in to change notification settings - Fork 13.3k
target_features for bit manipulation instruction sets #30462
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
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
Comments
Related to #29717. |
gnzlbg
added a commit
to gnzlbg/rust
that referenced
this issue
Jun 21, 2016
This commit adds support for detecting all of llc's target features for the x86/x86_64 architectures. Closes rust-lang#30462. Helps with rust-lang#29717 and rust-lang#34382.
This was referenced Jun 21, 2016
Triage: no idea what the status is here, honestly. |
Triage: no idea what the status is here, honestly. @gnzlbg any update? |
This was fixed ages ago, and is already available on stable, e.g., Thanks for the triage! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
There are currently no target features for bit manipulation instruction sets, in particular:
Since clang has macros to detect these I guess llvm offers the ability to obtain this functionality from the CPUID as well.
Wikipedia offers a pretty good and brief review of the situation. Basically all modern processors support ABM and BMI1. Modern Intel CPUs support BMI2, and next generation AMD CPUs will as well.
AMD also has TBM but these won't be supported anymore in future CPUs.
Huon's llvmin offers intrinsics for all these instruction sets but without a target config macro there is no way of wrapping these into a higher level safer abstraction portably.
So basically I would like to have target features to use in
#[cfg(_)]
for:amb
,bmi1
,bmi2
, andtmb
.The text was updated successfully, but these errors were encountered: