Core: Reorder AddConstToVariable parameters

This commit is contained in:
zilmar 2022-11-07 09:29:06 +10:30
parent 6a69e2e86a
commit dbd20dd993
3 changed files with 7 additions and 7 deletions

View File

@ -9825,7 +9825,7 @@ void CX86RecompilerOps::CompileLoadMemoryValue(CX86Ops::x86Reg AddressReg, CX86O
}
if (OpsExecuted != 0)
{
m_Assembler.AddConstToVariable(OpsExecuted, g_NextTimer, "g_NextTimer");
m_Assembler.AddConstToVariable(g_NextTimer, "g_NextTimer", OpsExecuted);
}
m_CodeBlock.Log("");
m_CodeBlock.Log(stdstr_f(" MemoryReadMap_%X_Found:", m_CompilePC).c_str());
@ -9963,7 +9963,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
m_Assembler.CallThis((uint32_t)&m_MMU, AddressOf(&CMipsMemoryVM::SB_NonMemory), "CMipsMemoryVM::SB_NonMemory", 12);
if (OpsExecuted != 0)
{
m_Assembler.AddConstToVariable(OpsExecuted, g_NextTimer, "g_NextTimer");
m_Assembler.AddConstToVariable(g_NextTimer, "g_NextTimer", OpsExecuted);
}
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
m_RegWorkingSet.AfterCallDirect();
@ -9986,7 +9986,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
m_Assembler.CallThis((uint32_t)&m_MMU, AddressOf(&CMipsMemoryVM::SH_NonMemory), "CMipsMemoryVM::SH_NonMemory", 12);
if (OpsExecuted != 0)
{
m_Assembler.AddConstToVariable(OpsExecuted, g_NextTimer, "g_NextTimer");
m_Assembler.AddConstToVariable(g_NextTimer, "g_NextTimer", OpsExecuted);
}
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
m_RegWorkingSet.AfterCallDirect();
@ -10009,7 +10009,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
m_Assembler.CallThis((uint32_t)&m_MMU, AddressOf(&CMipsMemoryVM::SW_NonMemory), "CMipsMemoryVM::SW_NonMemory", 12);
if (OpsExecuted != 0)
{
m_Assembler.AddConstToVariable(OpsExecuted, g_NextTimer, "g_NextTimer");
m_Assembler.AddConstToVariable(g_NextTimer, "g_NextTimer", OpsExecuted);
}
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
m_RegWorkingSet.AfterCallDirect();
@ -10034,7 +10034,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86
m_Assembler.CallThis((uint32_t)&m_MMU, AddressOf(&CMipsMemoryVM::SD_NonMemory), "CMipsMemoryVM::SD_NonMemory", 12);
if (OpsExecuted != 0)
{
m_Assembler.AddConstToVariable(OpsExecuted, g_NextTimer, "g_NextTimer");
m_Assembler.AddConstToVariable(g_NextTimer, "g_NextTimer", OpsExecuted);
}
m_Assembler.TestX86ByteRegToX86Reg(CX86Ops::x86_AL, CX86Ops::x86_AL);
m_RegWorkingSet.AfterCallDirect();

View File

@ -65,7 +65,7 @@ void CX86Ops::AdcX86RegToX86Reg(x86Reg Destination, x86Reg Source)
AddCode16((uint16_t)(0xC013 + (Source * 0x100) + (Destination * 0x800)));
}
void CX86Ops::AddConstToVariable(uint32_t Const, void * Variable, const char * VariableName)
void CX86Ops::AddConstToVariable(void * Variable, const char * VariableName, uint32_t Const)
{
CodeLog(" add dword ptr [%s], 0x%X", VariableName, Const);
AddCode16(0x0581);

View File

@ -68,7 +68,7 @@ public:
void AdcConstToX86Reg(x86Reg Reg, uint32_t Const);
void AdcVariableToX86reg(x86Reg reg, void * Variable, const char * VariableName);
void AdcX86RegToX86Reg(x86Reg Destination, x86Reg Source);
void AddConstToVariable(uint32_t Const, void * Variable, const char * VariableName);
void AddConstToVariable(void * Variable, const char * VariableName, uint32_t Const);
void AddConstToX86Reg(x86Reg Reg, uint32_t Const, bool NeedCarry = false);
void AddVariableToX86reg(x86Reg reg, void * Variable, const char * VariableName);
void AddX86regToVariable(x86Reg reg, void * Variable, const char * VariableName);