summaryrefslogtreecommitdiff
path: root/Source/Core/Common/Hash.cpp
diff options
context:
space:
mode:
authorTilka <tilkax@gmail.com>2023-11-28 13:45:13 +0000
committerGitHub <noreply@github.com>2023-11-28 13:45:13 +0000
commit5d9838548bd04f5dbd73f597a4c3c29aee1c2625 (patch)
tree1a5b1b9544ccd05796c5ff7552f6eb005b09393d /Source/Core/Common/Hash.cpp
parent69fc7bbdad2a6b41a9cce99a61fd25c0fc166a41 (diff)
parent481bc76d8e1c37d7722471311eb010df2b238f34 (diff)
Merge pull request #10965 from Zopolis4/hex86
Remove _M_X86 in favour of _M_X86_64
Diffstat (limited to 'Source/Core/Common/Hash.cpp')
-rw-r--r--Source/Core/Common/Hash.cpp26
1 files changed, 1 insertions, 25 deletions
diff --git a/Source/Core/Common/Hash.cpp b/Source/Core/Common/Hash.cpp
index 51182a0463..8cb697b695 100644
--- a/Source/Core/Common/Hash.cpp
+++ b/Source/Core/Common/Hash.cpp
@@ -359,30 +359,6 @@ static u64 GetHash64_SSE42_CRC32(const u8* src, u32 len, u32 samples)
return h[0] + (h[1] << 10) + (h[2] << 21) + (h[3] << 32);
}
-#elif defined(_M_X86)
-
-FUNCTION_TARGET_SSE42
-static u64 GetHash64_SSE42_CRC32(const u8* src, u32 len, u32 samples)
-{
- u32 h = len;
- u32 Step = (len / 4);
- const u32* data = (const u32*)src;
- const u32* end = data + Step;
- if (samples == 0)
- samples = std::max(Step, 1u);
- Step = Step / samples;
- if (Step < 1)
- Step = 1;
- while (data < end)
- {
- h = _mm_crc32_u32(h, data[0]);
- data += Step;
- }
-
- const u8* data2 = (const u8*)end;
- return (u64)_mm_crc32_u32(h, u32(data2[0]));
-}
-
#elif defined(_M_ARM_64)
static u64 GetHash64_ARMv8_CRC32(const u8* src, u32 len, u32 samples)
@@ -433,7 +409,7 @@ static u64 SetHash64Function(const u8* src, u32 len, u32 samples)
{
if (cpu_info.bCRC32)
{
-#if defined(_M_X86_64) || defined(_M_X86)
+#if defined(_M_X86_64)
s_texture_hash_func = &GetHash64_SSE42_CRC32;
#elif defined(_M_ARM_64)
s_texture_hash_func = &GetHash64_ARMv8_CRC32;