Merge pull request #420 from magumagu/backpatch-s8

JIT: make backpatch handle sign-extend from 8 bits correctly.
This commit is contained in:
shuffle2 2014-05-29 14:09:59 -07:00
commit 3b23f4bbd6

View File

@ -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));
}