Skip to content

Commit

Permalink
Remove redundant 32-bit code
Browse files Browse the repository at this point in the history
  • Loading branch information
Zopolis4 committed Dec 14, 2022
1 parent 0d6c75c commit ca8b6e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
24 changes: 0 additions & 24 deletions Source/Core/Common/Hash.cpp
Expand Up @@ -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_64)

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)
Expand Down
2 changes: 1 addition & 1 deletion Source/VSProps/Base.Dolphin.props
Expand Up @@ -33,7 +33,7 @@
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;%(PreprocessorDefinitions)</PreprocessorDefinitions>

<!--Dolphin-specific definitions-->
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">_ARCH_64=1;_M_X86=1;_M_X86_64=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='x64'">_ARCH_64=1;_M_X86_64=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(Platform)'=='ARM64'">_ARCH_64=1;_M_ARM_64=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_UPNP;__LIBUSB__;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>USE_ANALYTICS=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
Expand Down

0 comments on commit ca8b6e0

Please sign in to comment.