Fix regression in CRecompilerOps::SPECIAL_DADDU()

It should only add carry if GetMipsRegLo(source2) != 0
This commit is contained in:
LegendOfDragoon 2016-01-23 02:18:08 -08:00
parent 20163e76c1
commit 392d63a0de
1 changed files with 10 additions and 2 deletions

View File

@ -4875,8 +4875,16 @@ void CRecompilerOps::SPECIAL_DADDU()
Map_GPR_64bit(m_Opcode.rd, source1);
if (IsConst(source2))
{
AddConstToX86Reg(GetMipsRegMapLo(m_Opcode.rd), GetMipsRegLo(source2));
AdcConstToX86Reg(GetMipsRegMapHi(m_Opcode.rd), GetMipsRegHi(source2));
DWORD LoReg = GetMipsRegLo(source2);
AddConstToX86Reg(GetMipsRegMapLo(m_Opcode.rd), LoReg);
if(LoReg != 0)
{
AdcConstToX86Reg(GetMipsRegMapHi(m_Opcode.rd), GetMipsRegHi(source2));
}
else
{
AddConstToX86Reg(GetMipsRegMapHi(m_Opcode.rd), GetMipsRegHi(source2));
}
}
else if (IsMapped(source2))
{