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: map aarch64 HWCAPs to target features; add crypto #456

Merged
merged 1 commit into from
Jun 3, 2021

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jun 2, 2021

Closes #395

The HWCAPs provided by Linux are finer-grained than LLVM target features. This crate is trying to detect the latter, so we need to group together these finer grained features detected via HWCAPs.

This commit attempts to group together finer grained HWCAPs into coarser grained target features, ensuring all of the relevant HWCAPs for a given target feature are available.

Additionally, this adds support for the crypto target feature, which implies aes (and with it PMULL), along with sha2 and neon (although the latter is always present on aarch64)

Closes #395

The HWCAPs provided by Linux are finer-grained than LLVM target
features. This crate is trying to detect the latter, so we need to group
together these finer grained features detected via HWCAPs.

This commit attempts to group together finer grained HWCAPs into coarser
grained target features, ensuring all of the relevant HWCAPs for a given
target feature are available.

Additionally, this adds support for the `crypto` target feature, which
implies `aes` (and with it PMULL), along with `sha2` and `neon`
(although the latter is always present on `aarch64`)
@tarcieri tarcieri requested a review from newpavlov June 2, 2021 15:21
@tarcieri tarcieri merged commit 0f4ccff into master Jun 3, 2021
@tarcieri tarcieri deleted the cpufeatures/map-hwcaps-to-target-features branch June 3, 2021 19:19
@jrose-signal
Copy link
Contributor

Looks like this is missing "crypto" for iOS?

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

Successfully merging this pull request may close these issues.

cpufeatures: incongruities between ARM64 hwcaps and Rust SHA* target features
2 participants