Skip to content

Commit

Permalink
sha1+sha2: switch from cpuid-bool to cpufeatures (#263)
Browse files Browse the repository at this point in the history
Renamed in this PR:

RustCrypto/utils#381
  • Loading branch information
tarcieri committed May 5, 2021
1 parent 1e775ed commit bf761ed
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sha1/Cargo.toml
Expand Up @@ -22,7 +22,7 @@ cfg-if = "1.0"
sha1-asm = { version = "0.4", optional = true }

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
cpuid-bool = "0.2"
cpufeatures = "0.1"

[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies]
libc = { version = "0.2.93", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion sha1/src/compress/x86.rs
Expand Up @@ -95,7 +95,7 @@ unsafe fn digest_blocks(state: &mut [u32; 5], blocks: &[[u8; 64]]) {
state[4] = _mm_extract_epi32(state_e, 3) as u32;
}

cpuid_bool::new!(shani_cpuid, "sha", "sse2", "ssse3", "sse4.1");
cpufeatures::new!(shani_cpuid, "sha", "sse2", "ssse3", "sse4.1");

pub fn compress(state: &mut [u32; 5], blocks: &[[u8; 64]]) {
// TODO: Replace with https://github.com/rust-lang/rfcs/pull/2725
Expand Down
2 changes: 1 addition & 1 deletion sha2/Cargo.toml
Expand Up @@ -22,7 +22,7 @@ cfg-if = "1.0"
sha2-asm = { version = "0.6.1", optional = true }

[target.'cfg(any(target_arch = "x86", target_arch = "x86_64"))'.dependencies]
cpuid-bool = "0.2"
cpufeatures = "0.1"

[target.'cfg(all(target_arch = "aarch64", target_os = "linux"))'.dependencies]
libc = { version = "0.2.93", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion sha2/src/sha256/x86.rs
Expand Up @@ -95,7 +95,7 @@ unsafe fn digest_blocks(state: &mut [u32; 8], blocks: &[[u8; 64]]) {
_mm_storeu_si128(state_ptr_mut.add(1), hgef);
}

cpuid_bool::new!(shani_cpuid, "sha", "sse2", "ssse3", "sse4.1");
cpufeatures::new!(shani_cpuid, "sha", "sse2", "ssse3", "sse4.1");

pub fn compress(state: &mut [u32; 8], blocks: &[[u8; 64]]) {
// TODO: Replace with https://github.com/rust-lang/rfcs/pull/2725
Expand Down

0 comments on commit bf761ed

Please sign in to comment.