diff --git a/polyval/Cargo.toml b/polyval/Cargo.toml index ba07fa3..58d7c0d 100644 --- a/polyval/Cargo.toml +++ b/polyval/Cargo.toml @@ -32,7 +32,7 @@ std = ["universal-hash/std"] [lints.rust.unexpected_cfgs] level = "warn" -check-cfg = ["cfg(polyval_armv8)", "cfg(polyval_force_soft)"] +check-cfg = ["cfg(polyval_force_soft)"] [package.metadata.docs.rs] all-features = true diff --git a/polyval/src/backend.rs b/polyval/src/backend.rs index 208d8c1..4eb74ee 100644 --- a/polyval/src/backend.rs +++ b/polyval/src/backend.rs @@ -7,7 +7,7 @@ mod soft; use cfg_if::cfg_if; cfg_if! { - if #[cfg(all(target_arch = "aarch64", polyval_armv8, not(polyval_force_soft)))] { + if #[cfg(all(target_arch = "aarch64", not(polyval_force_soft)))] { mod autodetect; mod pmull; pub use crate::backend::autodetect::Polyval; diff --git a/polyval/src/backend/autodetect.rs b/polyval/src/backend/autodetect.rs index 4e0cd61..c084086 100644 --- a/polyval/src/backend/autodetect.rs +++ b/polyval/src/backend/autodetect.rs @@ -9,13 +9,13 @@ use universal_hash::{ KeyInit, Reset, UhfClosure, UniversalHash, }; -#[cfg(all(target_arch = "aarch64", polyval_armv8))] +#[cfg(target_arch = "aarch64")] use super::pmull as intrinsics; #[cfg(any(target_arch = "x86_64", target_arch = "x86"))] use super::clmul as intrinsics; -#[cfg(all(target_arch = "aarch64", polyval_armv8))] +#[cfg(target_arch = "aarch64")] cpufeatures::new!(mul_intrinsics, "aes"); // `aes` implies PMULL #[cfg(any(target_arch = "x86_64", target_arch = "x86"))] diff --git a/polyval/src/lib.rs b/polyval/src/lib.rs index 0682371..b054aff 100644 --- a/polyval/src/lib.rs +++ b/polyval/src/lib.rs @@ -30,16 +30,10 @@ //! ## ARMv8 intrinsics (`PMULL`, MSRV 1.61+) //! On `aarch64` targets including `aarch64-apple-darwin` (Apple M1) and Linux //! targets such as `aarch64-unknown-linux-gnu` and `aarch64-unknown-linux-musl`, -//! support for using the `PMULL` instructions in ARMv8's Cryptography Extensions -//! with the following `RUSTFLAGS`: +//! support for using the `PMULL` instructions in ARMv8's Cryptography Extensions. //! -//! ```text -//! --cfg polyval_armv8 -//! ``` -//! -//! On Linux and macOS when the ARMv8 features are enabled, support for `PMULL` -//! intrinsics is autodetected at runtime. On other platforms the `crypto` -//! target feature must be enabled via RUSTFLAGS. +//! On Linux and macOS, support for `PMULL` intrinsics is autodetected at runtime. +//! On other platforms the `crypto` target feature must be enabled via RUSTFLAGS. //! //! ## `x86`/`x86_64` intrinsics (`CMLMUL`) //! By default this crate uses runtime detection on `i686`/`x86_64` targets