summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Hash.cpp
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2014-10-20 14:50:21 +1100
committerskidau <skidau@gmail.com>2014-10-20 14:50:21 +1100
commite8da34ef253329df72d5cb9bed12eec42c3a1d3d (patch)
tree269b8e9af6e643bf10179905dfdfe3faa6805c92 /Source/Core/Common/Hash.cpp
parenta4be65094f326537821e6bab73ec6f35772bde5b (diff)
parentd2e004fa9e8b4f331e7e241645e47211e93686eb (diff)
Merge pull request #1320 from FioraAeterna/hash64bitcrc
Use CRC to output 64 bits instead of 32
Diffstat (limited to 'Source/Core/Common/Hash.cpp')
-rw-r--r--Source/Core/Common/Hash.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Common/Hash.cpp b/Source/Core/Common/Hash.cpp
index 6cdd1e6a7a..f9a3737d34 100644
--- a/Source/Core/Common/Hash.cpp
+++ b/Source/Core/Common/Hash.cpp
@@ -254,7 +254,8 @@ u64 GetCRC32(const u8 *src, int len, u32 samples)
const u8 *data2 = (const u8*)end;
// FIXME: is there a better way to combine these partial hashes?
- return _mm_crc32_u64(h[0] + h[1] + h[2] + h[3], u64(data2[0]));
+ h[0] = _mm_crc32_u64(h[0], u64(data2[0]));
+ return h[0] + (h[1] << 10) + (h[2] << 21) + (h[3] << 32);
#else
return 0;
#endif