From 15ddb7f841f2fccbe854ada9f61a8243e35a4e05 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Thu, 25 Feb 2016 09:59:15 +0100 Subject: ARMv8: fix crc intrinsic usage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- src/corelib/tools/qhash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib') diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index b49c9d683a..1001f2a06c 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -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); -- cgit v1.2.3