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:
2023-09-23 00:53:23 +01:00
parent c392dfa682
commit d4a607345e
4 changed files with 11 additions and 5 deletions

View File

@@ -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);