Skip to content

Commit

Permalink
Merge pull request #420 from magumagu/backpatch-s8
Browse files Browse the repository at this point in the history
JIT: make backpatch handle sign-extend from 8 bits correctly.
  • Loading branch information
shuffle2 committed May 29, 2014
2 parents 329fcad + 2599cd5 commit 3b23f4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Source/Core/Core/PowerPC/JitCommon/JitBackpatch.cpp
Expand Up @@ -86,7 +86,12 @@ const u8 *TrampolineCache::GetReadTrampoline(const InstructionInfo &info, u32 re
break;
}

if (dataReg != EAX)
if (info.signExtend && info.operandSize == 1)
{
// Need to sign extend value from Read_U8.
MOVSX(32, 8, dataReg, R(EAX));
}
else if (dataReg != EAX)
{
MOV(32, R(dataReg), R(EAX));
}
Expand Down

0 comments on commit 3b23f4b

Please sign in to comment.