diff --git a/sha2/src/sha512/x86.rs b/sha2/src/sha512/x86.rs index bb7904088..b80cfc1ae 100644 --- a/sha2/src/sha512/x86.rs +++ b/sha2/src/sha512/x86.rs @@ -11,7 +11,9 @@ use core::arch::x86_64::*; use crate::consts::K64; -cpufeatures::new!(avx2_cpuid, "avx2"); +// We need to check availability of both AVX and AVX2, see: +// https://github.com/RustCrypto/hashes/pull/386 +cpufeatures::new!(avx2_cpuid, "avx", "avx2"); pub fn compress(state: &mut [u64; 8], blocks: &[[u8; 128]]) { // TODO: Replace with https://github.com/rust-lang/rfcs/pull/2725