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:
parent
010ca048df
commit
2599cd545e
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue