CRC_DO1;
}
- /* Return the CRC, post-conditioned. */
return c;
}
Z_INTERNAL uint32_t crc32_braid(uint32_t crc, const uint8_t *buf, size_t len) {
- crc = (~crc) & 0xffffffff;
-
- crc = crc32_braid_internal(crc, buf, len);
-
- /* Return the CRC, post-conditioned. */
- return crc ^ 0xffffffff;
+ return ~crc32_braid_internal(~crc, buf, len);
}
Z_INTERNAL uint32_t crc32_copy_braid(uint32_t crc, uint8_t *dst, const uint8_t *src, size_t len) {
Z_INTERNAL uint32_t crc32_chorba(uint32_t crc, const uint8_t *buf, size_t len) {
uint64_t *aligned_buf;
- uint32_t c = (~crc) & 0xffffffff;
+ uint32_t c = ~crc;
uintptr_t align_diff = ALIGN_DIFF(buf, 8);
if (len > align_diff + CHORBA_SMALL_THRESHOLD) {
}
/* Return the CRC, post-conditioned. */
- return c ^ 0xffffffff;
+ return ~c;
}
uint32_t crc32_copy_chorba(uint32_t crc, uint8_t *dst, const uint8_t *src, size_t len) {
aligned = len & ~VX_ALIGN_MASK;
remaining = len & VX_ALIGN_MASK;
- crc = crc32_le_vgfm_16(crc ^ 0xffffffff, buf, aligned) ^ 0xffffffff;
+ crc = ~crc32_le_vgfm_16(~crc, buf, aligned);
if (remaining)
crc = crc32_braid(crc, buf + aligned, remaining);
Z_INTERNAL uint32_t crc32_chorba_sse2(uint32_t crc, const uint8_t *buf, size_t len) {
uint64_t *aligned_buf;
- uint32_t c = (~crc) & 0xffffffff;
+ uint32_t c = ~crc;
uintptr_t align_diff = ALIGN_DIFF(buf, 16);
if (len > align_diff + CHORBA_SMALL_THRESHOLD_64BIT) {
}
/* Return the CRC, post-conditioned. */
- return c ^ 0xffffffff;
+ return ~c;
}
Z_INTERNAL uint32_t crc32_copy_chorba_sse2(uint32_t crc, uint8_t *dst, const uint8_t *src, size_t len) {
Z_INTERNAL uint32_t crc32_chorba_sse41(uint32_t crc, const uint8_t *buf, size_t len) {
uint64_t *aligned_buf;
- uint32_t c = (~crc) & 0xffffffff;
+ uint32_t c = ~crc;
uintptr_t align_diff = ALIGN_DIFF(buf, 16);
if (len > align_diff + CHORBA_SMALL_THRESHOLD_64BIT) {
}
/* Return the CRC, post-conditioned. */
- return c ^ 0xffffffff;
+ return ~c;
}
Z_INTERNAL uint32_t crc32_copy_chorba_sse41(uint32_t crc, uint8_t *dst, const uint8_t *src, size_t len) {
}
static inline uint32_t crc32_copy_small(uint32_t crc, uint8_t *dst, const uint8_t *buf, size_t len, const int COPY) {
- uint32_t c = (~crc) & 0xffffffff;
+ uint32_t c = ~crc;
while (len) {
len--;
CRC_DO1;
}
- return c ^ 0xffffffff;
+ return ~c;
}
static inline uint32_t fold_final(__m128i *xmm_crc0, __m128i *xmm_crc1, __m128i *xmm_crc2, __m128i *xmm_crc3) {