mirror of
https://github.com/aaru-dps/Aaru.Checksums.Native.git
synced 2025-12-16 19:24:29 +00:00
Lower ARM architecture requirement for CRC32 instructions.
The changes ensure compatibility with compilers targeting ARMv7. 32-bit processors of architecture 8 and higher, or 64-bit processors running in 32-bit mode can have the CRC32 instructions. With this change we will query the processor instead of the compiler architecture.
This commit is contained in:
2
crc32.c
2
crc32.c
@@ -48,7 +48,7 @@ AARU_EXPORT int AARU_CALL crc32_update(crc32_ctx* ctx, const uint8_t* data, uint
|
||||
#endif
|
||||
|
||||
#if defined(__aarch64__) || defined(_M_ARM64) || defined(__arm__) || defined(_M_ARM)
|
||||
#if __ARM_ARCH >= 8
|
||||
#if __ARM_ARCH >= 7
|
||||
if(have_arm_crc32())
|
||||
{
|
||||
ctx->crc = armv8_crc32_little(ctx->crc, data, len);
|
||||
|
||||
Reference in New Issue
Block a user