ARMv8: fix crc intrinsic usage.
ARMv8 defines the crc32 instructions as optional features. Even though the target might be ARMv8, the compiler might have been told that the target CPU doesn't support it, in which case __ARM_FEATURE_CRC32 is not defined. Subsequently, the arm_acle.h header might only define the intrinsics when __ARM_FEATURE_CRC32 is defined. Change-Id: I85efcf9efdd2e152e3f3e72310122eebf543ca3b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
This commit is contained in:
parent
37cfcfb2b5
commit
15ddb7f841
@ -137,7 +137,7 @@ static uint crc32(const Char *ptr, size_t len, uint h)
|
||||
h = _mm_crc32_u8(h, *p);
|
||||
return h;
|
||||
}
|
||||
#elif defined(Q_PROCESSOR_ARM_V8)
|
||||
#elif defined(__ARM_FEATURE_CRC32)
|
||||
static inline bool hasFastCrc32()
|
||||
{
|
||||
return qCpuHasFeature(CRC32);
|
||||
|
Loading…
x
Reference in New Issue
Block a user