diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-26 09:40:39 +0200 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-05-26 13:04:32 +0200 |
commit | 2fb026d58b45f50ed7d5666de58c9184e81bbc60 (patch) | |
tree | ad1a80d7e2579899c55fce7771472a7d9176af0e /src/corelib/tools/qhash.cpp | |
parent | 184b2ea4ea9c3e4ad735ff67c5a399e9613da8ab (diff) | |
parent | 540978288ea0f6ed0b166bb9207f427a4c825ab6 (diff) |
Merge remote-tracking branch 'origin/5.6.1' into 5.7.0
Conflicts:
src/corelib/tools/qsimd_p.h
src/network/socket/qnativesocketengine_winrt.cpp
Change-Id: I2765b671664c2a84839b2f88ba724fdf0c1fa7c6
Diffstat (limited to 'src/corelib/tools/qhash.cpp')
-rw-r--r-- | src/corelib/tools/qhash.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp index 2f0886edce..593a87e65d 100644 --- a/src/corelib/tools/qhash.cpp +++ b/src/corelib/tools/qhash.cpp @@ -58,6 +58,7 @@ #include <qbytearray.h> #include <qdatetime.h> #include <qbasicatomic.h> +#include <qendian.h> #include <private/qsimd_p.h> #ifndef QT_BOOTSTRAPPED @@ -112,24 +113,24 @@ static uint crc32(const Char *ptr, size_t len, uint h) p += 8; for ( ; p <= e; p += 8) - h2 = _mm_crc32_u64(h2, qUnalignedLoad<qlonglong>(p - 8)); + h2 = _mm_crc32_u64(h2, qFromUnaligned<qlonglong>(p - 8)); h = h2; p -= 8; len = e - p; if (len & 4) { - h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p)); + h = _mm_crc32_u32(h, qFromUnaligned<uint>(p)); p += 4; } # else p += 4; for ( ; p <= e; p += 4) - h = _mm_crc32_u32(h, qUnalignedLoad<uint>(p - 4)); + h = _mm_crc32_u32(h, qFromUnaligned<uint>(p - 4)); p -= 4; len = e - p; # endif if (len & 2) { - h = _mm_crc32_u16(h, qUnalignedLoad<ushort>(p)); + h = _mm_crc32_u16(h, qFromUnaligned<ushort>(p)); p += 2; } if (sizeof(Char) == 1 && len & 1) |