Skip to content
Snippets Groups Projects
Verified Commit 86ff777d authored by João Magalhães's avatar João Magalhães :rocket:
Browse files

fix: removed x86 CRC32 computation

Intel implementation uses a different polynomial (CRC-32/ISCSI or CRC32-C (Castagnoli)) so I had to remove the support.
parent 6d96fae5
No related branches found
No related tags found
No related merge requests found
Pipeline #4802 failed
......@@ -7,9 +7,6 @@
//! This implementation is optimized for modern CPUs by using hardware acceleration
//! when available.
#[cfg(target_arch = "x86_64")]
use std::arch::{is_x86_feature_detected, x86_64::_mm_crc32_u8};
#[cfg(target_arch = "aarch64")]
use std::arch::{aarch64::__crc32b, is_aarch64_feature_detected};
......@@ -78,16 +75,6 @@ impl Crc32 {
}
pub fn update(&mut self, bytes: &[u8]) {
#[cfg(target_arch = "x86_64")]
{
if is_x86_feature_detected!("sse4.2") {
unsafe {
self.update_hw_x86(bytes);
}
return;
}
}
#[cfg(target_arch = "aarch64")]
{
if is_aarch64_feature_detected!("crc") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment