[Project64] Some code clean up of x86RecompilerOps.cpp

This commit is contained in:
zilmar 2016-11-21 18:14:47 +11:00
parent d2232f9150
commit e6200faba1
1 changed files with 75 additions and 73 deletions

View File

@ -2871,9 +2871,7 @@ void CX86RecompilerOps::LW(bool ResultSigned, bool bRecordLLBit)
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
} }
} }
else else if (IsConst(m_Opcode.base))
{
if (IsConst(m_Opcode.base))
{ {
uint32_t Address = GetMipsRegLo(m_Opcode.base) + (int16_t)m_Opcode.offset; uint32_t Address = GetMipsRegLo(m_Opcode.base) + (int16_t)m_Opcode.offset;
Map_GPR_32bit(m_Opcode.rt, ResultSigned, -1); Map_GPR_32bit(m_Opcode.rt, ResultSigned, -1);
@ -2883,9 +2881,7 @@ void CX86RecompilerOps::LW(bool ResultSigned, bool bRecordLLBit)
g_Notify->BreakPoint(__FILE__, __LINE__); g_Notify->BreakPoint(__FILE__, __LINE__);
} }
} }
else else if (g_System->bUseTlb())
{
if (g_System->bUseTlb())
{ {
if (IsMapped(m_Opcode.rt)) if (IsMapped(m_Opcode.rt))
{ {
@ -2955,8 +2951,6 @@ void CX86RecompilerOps::LW(bool ResultSigned, bool bRecordLLBit)
MoveConstToVariable(1, _LLBit, "LLBit"); MoveConstToVariable(1, _LLBit, "LLBit");
} }
} }
}
}
if (g_System->bFastSP() && m_Opcode.rt == 29) if (g_System->bFastSP() && m_Opcode.rt == 29)
{ {
ResetX86Protection(); ResetX86Protection();
@ -3240,8 +3234,12 @@ void CX86RecompilerOps::LW_KnownAddress(x86Reg Reg, uint32_t VAddr)
g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str()); g_Notify->DisplayError(stdstr_f("%s\nFailed to translate address: %08X", __FUNCTION__, VAddr).c_str());
} }
} }
break;
} }
else
{
MoveConstToX86reg((uint32_t)((PAddr & 0xFFFF) << 16) | (PAddr & 0xFFFF), Reg);
}
break;
case 0x1FC00000: case 0x1FC00000:
sprintf(VarName, "RDRAM + %X", PAddr); sprintf(VarName, "RDRAM + %X", PAddr);
MoveVariableToX86reg(PAddr + g_MMU->Rdram(), VarName, Reg); MoveVariableToX86reg(PAddr + g_MMU->Rdram(), VarName, Reg);
@ -10974,9 +10972,10 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
switch (PAddr) switch (PAddr)
{ {
case 0x04300000: case 0x04300000:
MoveX86regToVariable(Reg, &CMipsMemoryVM::RegModValue, "CMipsMemoryVM::RegModValue"); MoveX86regToVariable(Reg, &CMipsMemoryVM::m_MemLookupValue.UW[0], "CMipsMemoryVM::m_MemLookupValue.UW[0]");
MoveConstToVariable(PAddr, &CMipsMemoryVM::m_MemLookupAddress, "m_MemLookupAddress");
m_RegWorkingSet.BeforeCallDirect(); m_RegWorkingSet.BeforeCallDirect();
Call_Direct((void *)CMipsMemoryVM::ChangeMiIntrMask, "CMipsMemoryVM::ChangeMiModeReg"); Call_Direct((void *)CMipsMemoryVM::Write32MIPSInterface, "CMipsMemoryVM::Write32MIPSInterface");
m_RegWorkingSet.AfterCallDirect(); m_RegWorkingSet.AfterCallDirect();
break; break;
case 0x0430000C: case 0x0430000C:
@ -11219,6 +11218,9 @@ void CX86RecompilerOps::SW_Register(x86Reg Reg, uint32_t VAddr)
case 0x04700000: case 0x04700000:
switch (PAddr) switch (PAddr)
{ {
case 0x04700000: MoveX86regToVariable(Reg, &g_Reg->RI_MODE_REG, "RI_MODE_REG"); break;
case 0x04700004: MoveX86regToVariable(Reg, &g_Reg->RI_CONFIG_REG, "RI_CONFIG_REG"); break;
case 0x0470000C: MoveX86regToVariable(Reg, &g_Reg->RI_SELECT_REG, "RI_SELECT_REG"); break;
case 0x04700010: MoveX86regToVariable(Reg, &g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG"); break; case 0x04700010: MoveX86regToVariable(Reg, &g_Reg->RI_REFRESH_REG, "RI_REFRESH_REG"); break;
default: default:
if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory)) if (g_Settings->LoadBool(Debugger_ShowUnhandledMemory))