On armv8-a platforms if --acle is enabled, zlib-ng will use crc32_acle
instead of the default crc32. However, in crc32_acle the __crc32b() is
used to calculate the crc result of two variables with types uint32_t
and uint64_t, which gives an error result.The correct function used
should be __crc32d().
Signed-off-by: Richael Zhuang <richael.zhuang@arm.com>
#ifndef UNROLL_LESS
while (len >= 32) {
- c = __crc32b(c, *buf8++);
- c = __crc32b(c, *buf8++);
- c = __crc32b(c, *buf8++);
- c = __crc32b(c, *buf8++);
+ c = __crc32d(c, *buf8++);
+ c = __crc32d(c, *buf8++);
+ c = __crc32d(c, *buf8++);
+ c = __crc32d(c, *buf8++);
len -= 32;
}
#endif
while (len >= 8) {
- c = __crc32b(c, *buf8++);
+ c = __crc32d(c, *buf8++);
len -= 8;
}