Skip to content

Commit e27a3e7

Browse files
committed
add vpclmulqdq implementation
1 parent a83478c commit e27a3e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

zlib-rs/src/crc32/pclmulqdq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,6 @@ impl Accumulator {
248248
// bytes of input is needed for the aligning load that occurs. If there's an initial CRC, to
249249
// carry it forward through the folded CRC there must be 16 - src % 16 + 16 bytes available, which
250250
// by definition can be up to 15 bytes + one full vector load. */
251-
let xmm_initial = reg([init_crc, 0, 0, 0]);
252251
let first = init_crc != CRC32_INITIAL_VALUE;
253252
assert!(src.len() >= 31 || !first);
254253

@@ -280,6 +279,7 @@ impl Accumulator {
280279
let is_initial = init_crc == CRC32_INITIAL_VALUE;
281280

282281
if !is_initial {
282+
let xmm_initial = reg([init_crc, 0, 0, 0]);
283283
xmm_crc_part = unsafe { _mm_xor_si128(xmm_crc_part, xmm_initial) };
284284
init_crc = CRC32_INITIAL_VALUE;
285285
}

0 commit comments

Comments
 (0)