Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a check for a redundant mov in the fastmem writes code.
Fixes issue 6905.
  • Loading branch information
skidau committed Jan 13, 2014
1 parent e00c3ce commit 8b53385
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp
Expand Up @@ -117,13 +117,17 @@ const u8 *TrampolineCache::GetWriteTrampoline(const InstructionInfo &info, u32 r
PanicAlert("Incorrect use of SafeWriteRegToReg");
if (addrReg != ABI_PARAM1)
{
MOV(64, R(ABI_PARAM1), R((X64Reg)dataReg));
MOV(64, R(ABI_PARAM2), R((X64Reg)addrReg));
if (ABI_PARAM1 != dataReg)
MOV(64, R(ABI_PARAM1), R((X64Reg)dataReg));
if (ABI_PARAM2 != addrReg)
MOV(64, R(ABI_PARAM2), R((X64Reg)addrReg));
}
else
{
MOV(64, R(ABI_PARAM2), R((X64Reg)addrReg));
MOV(64, R(ABI_PARAM1), R((X64Reg)dataReg));
if (ABI_PARAM2 != addrReg)
MOV(64, R(ABI_PARAM2), R((X64Reg)addrReg));
if (ABI_PARAM1 != dataReg)
MOV(64, R(ABI_PARAM1), R((X64Reg)dataReg));
}

if (info.displacement)
Expand Down

0 comments on commit 8b53385

Please sign in to comment.