Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes ZeroFrog's "optimized" memcpy and memcmp functions. #370

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/Software/BPMemLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ void SWBPWritten(int address, int newvalue)
ptr = Memory::GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);

if (ptr)
memcpy_gc(texMem + tlutTMemAddr, ptr, tlutXferCount);
memcpy(texMem + tlutTMemAddr, ptr, tlutXferCount);
else
PanicAlert("Invalid palette pointer %08x %08x %08x", bpmem.tmem_config.tlut_src, bpmem.tmem_config.tlut_src << 5, (bpmem.tmem_config.tlut_src & 0xFFFFF)<< 5);
break;
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoBackends/Software/XFMemLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void SWLoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
// write to XF regs
if (transferSize > 0)
{
memcpy_gc((u32*)(&xfmem) + baseAddress, pData, transferSize * 4);
memcpy((u32*)(&xfmem) + baseAddress, pData, transferSize * 4);
XFWritten(transferSize, baseAddress);
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/VideoCommon/BPStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ void BPWritten(const BPCmd& bp)
ptr = GetPointer((bpmem.tmem_config.tlut_src & 0xFFFFF) << 5);

if (ptr)
memcpy_gc(texMem + tlutTMemAddr, ptr, tlutXferCount);
memcpy(texMem + tlutTMemAddr, ptr, tlutXferCount);
else
PanicAlert("Invalid palette pointer %08x %08x %08x", bpmem.tmem_config.tlut_src, bpmem.tmem_config.tlut_src << 5, (bpmem.tmem_config.tlut_src & 0xFFFFF)<< 5);

Expand Down
3 changes: 1 addition & 2 deletions Source/Core/VideoCommon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ set(SRCS BPFunctions.cpp
VideoConfig.cpp
VideoState.cpp
XFMemory.cpp
XFStructs.cpp
memcpy_amd.cpp)
XFStructs.cpp)
set(LIBS core png)

if(NOT _M_GENERIC)
Expand Down
10 changes: 0 additions & 10 deletions Source/Core/VideoCommon/VideoCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
#include "Common/MathUtil.h"
#include "VideoCommon/VideoBackendBase.h"

#if defined(_MSC_VER) && _M_X86_32
void * memcpy_amd(void *dest, const void *src, size_t n);
unsigned char memcmp_mmx(const void* src1, const void* src2, int cmpsize);
#define memcpy_gc memcpy_amd
#define memcmp_gc memcmp_mmx
#else
#define memcpy_gc memcpy
#define memcmp_gc memcmp
#endif

// These are accurate (disregarding AA modes).
enum
{
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/VideoCommon/VideoCommon.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
<ClCompile Include="ImageWrite.cpp" />
<ClCompile Include="IndexGenerator.cpp" />
<ClCompile Include="MainBase.cpp" />
<ClCompile Include="memcpy_amd.cpp" />
<ClCompile Include="OnScreenDisplay.cpp" />
<ClCompile Include="OpcodeDecoding.cpp" />
<ClCompile Include="PerfQueryBase.cpp" />
Expand Down Expand Up @@ -159,4 +158,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>
1 change: 0 additions & 1 deletion Source/Core/VideoCommon/VideoCommon.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<ItemGroup>
<ClCompile Include="CommandProcessor.cpp" />
<ClCompile Include="DriverDetails.cpp" />
<ClCompile Include="memcpy_amd.cpp" />
<ClCompile Include="PixelEngine.cpp" />
<ClCompile Include="VideoBackendBase.cpp" />
<ClCompile Include="VideoConfig.cpp" />
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/VideoCommon/XFStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
}

XFMemWritten(xfMemTransferSize, xfMemBase);
memcpy_gc((u32*)(&xfmem) + xfMemBase, pData, xfMemTransferSize * 4);
memcpy((u32*)(&xfmem) + xfMemBase, pData, xfMemTransferSize * 4);

pData += xfMemTransferSize;
}
Expand All @@ -237,7 +237,7 @@ void LoadXFReg(u32 transferSize, u32 baseAddress, u32 *pData)
if (transferSize > 0)
{
XFRegWritten(transferSize, baseAddress, pData);
memcpy_gc((u32*)(&xfmem) + baseAddress, pData, transferSize * 4);
memcpy((u32*)(&xfmem) + baseAddress, pData, transferSize * 4);
}
}

Expand Down
Loading