Fix CRC32 using ARM SIMD being reversed when not needed.

This commit is contained in:
2021-10-01 03:40:29 +01:00
parent 33abe35273
commit f425cb6f24

View File

@@ -11,7 +11,7 @@
TARGET_ARMV8_WITH_CRC uint32_t armv8_crc32_little(uint32_t crc, const unsigned char* buf, uint32_t len)
{
uint32_t c = (uint32_t)~crc;
uint32_t c = (uint32_t)crc;
#if defined(__aarch64__) || defined(_M_ARM64)
while(len && ((uintptr_t)buf & 7))
@@ -68,6 +68,6 @@ TARGET_ARMV8_WITH_CRC uint32_t armv8_crc32_little(uint32_t crc, const unsigned c
#endif
while(len--) { c = __crc32b(c, *buf++); }
return ~c;
return c;
}
#endif