Skip to content

Commit

Permalink
Cherry-pick BoringSSL 3599db2: sha: Add SSSE3 check to SHAEXT SHA-256…
Browse files Browse the repository at this point in the history
… implementation.

The implementation does use SSSE3 (palignr, pshufb).

Change-Id: I86a44c1dc505b27b87fdc3cc7f6e8115abb3dcc9
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/64567
Reviewed-by: David Benjamin <[email protected]>
Reviewed-by: Bob Beck <[email protected]>
Commit-Queue: Bob Beck <[email protected]>
  • Loading branch information
briansmith committed Jan 14, 2025
1 parent 7ba9429 commit 303ca7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/digest/sha2/sha2_32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub(crate) fn block_data_order_32(
} else if #[cfg(target_arch = "x86_64")] {
use cpu::{GetFeature as _, intel::{Sha, Avx, Ssse3 }};
if let Some(cpu) = cpu.get_feature() {
sha2_32_ffi!(unsafe { Sha => sha256_block_data_order_hw }, state, data, cpu)
sha2_32_ffi!(unsafe { (Sha, Ssse3) => sha256_block_data_order_hw }, state, data, cpu)
} else if let Some(cpu) = cpu.get_feature() {
sha2_32_ffi!(unsafe { Avx => sha256_block_data_order_avx }, state, data, cpu)
} else if let Some(cpu) = cpu.get_feature() {
Expand Down

0 comments on commit 303ca7e

Please sign in to comment.