JIT: make backpatch handle sign-extend from 8 bits correctly.

I don't think this is actually possible to trigger at the moment... but
it matches the implementation of SafeLoadToReg.
This commit is contained in:
magumagu 2014-05-26 01:45:07 -07:00
parent 010ca048df
commit 2599cd545e
1 changed files with 6 additions and 1 deletions

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