mirror of
https://github.com/aaru-dps/Aaru.Checksums.Native.git
synced 2025-12-16 19:24:29 +00:00
Fix CRC32 using ARM SIMD being reversed when not needed.
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
TARGET_ARMV8_WITH_CRC uint32_t armv8_crc32_little(uint32_t crc, const unsigned char* buf, uint32_t len)
|
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)
|
#if defined(__aarch64__) || defined(_M_ARM64)
|
||||||
while(len && ((uintptr_t)buf & 7))
|
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
|
#endif
|
||||||
|
|
||||||
while(len--) { c = __crc32b(c, *buf++); }
|
while(len--) { c = __crc32b(c, *buf++); }
|
||||||
return ~c;
|
return c;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user