diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index 4161cc665..fccdae8bd 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -5580,13 +5580,13 @@ void CX86RecompilerOps::SPECIAL_AND() if (Is64Bit(KnownReg) || !g_System->b32BitCore()) { Map_GPR_64bit(m_Opcode.rd, KnownReg); - m_Assembler.AndVariableToX86Reg(&_GPR[UnknownReg].W[1], CRegName::GPR_Hi[UnknownReg], GetMipsRegMapHi(m_Opcode.rd)); - m_Assembler.AndVariableToX86Reg(&_GPR[UnknownReg].W[0], CRegName::GPR_Lo[UnknownReg], GetMipsRegMapLo(m_Opcode.rd)); + m_Assembler.AndVariableToX86Reg(GetMipsRegMapHi(m_Opcode.rd), &_GPR[UnknownReg].W[1], CRegName::GPR_Hi[UnknownReg]); + m_Assembler.AndVariableToX86Reg(GetMipsRegMapLo(m_Opcode.rd), &_GPR[UnknownReg].W[0], CRegName::GPR_Lo[UnknownReg]); } else { Map_GPR_32bit(m_Opcode.rd, IsSigned(KnownReg), KnownReg); - m_Assembler.AndVariableToX86Reg(&_GPR[UnknownReg].W[0], CRegName::GPR_Lo[UnknownReg], GetMipsRegMapLo(m_Opcode.rd)); + m_Assembler.AndVariableToX86Reg(GetMipsRegMapLo(m_Opcode.rd), &_GPR[UnknownReg].W[0], CRegName::GPR_Lo[UnknownReg]); } } else @@ -5614,9 +5614,9 @@ void CX86RecompilerOps::SPECIAL_AND() else { Map_GPR_64bit(m_Opcode.rd, m_Opcode.rt); - m_Assembler.AndVariableToX86Reg(&_GPR[m_Opcode.rs].W[1], CRegName::GPR_Hi[m_Opcode.rs], GetMipsRegMapHi(m_Opcode.rd)); + m_Assembler.AndVariableToX86Reg(GetMipsRegMapHi(m_Opcode.rd), &_GPR[m_Opcode.rs].W[1], CRegName::GPR_Hi[m_Opcode.rs]); } - m_Assembler.AndVariableToX86Reg(&_GPR[m_Opcode.rs].W[0], CRegName::GPR_Lo[m_Opcode.rs], GetMipsRegMapLo(m_Opcode.rd)); + m_Assembler.AndVariableToX86Reg(GetMipsRegMapLo(m_Opcode.rd), &_GPR[m_Opcode.rs].W[0], CRegName::GPR_Lo[m_Opcode.rs]); } } diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp index fc4add11a..b18b978e8 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp @@ -152,7 +152,7 @@ void CX86Ops::AndVariableDispToX86Reg(x86Reg Reg, void * Variable, const char * AddCode32((uint32_t)(Variable)); } -void CX86Ops::AndVariableToX86Reg(void * Variable, const char * VariableName, x86Reg Reg) +void CX86Ops::AndVariableToX86Reg(x86Reg Reg, void * Variable, const char * VariableName) { CodeLog(" and %s, dword ptr [%s]", x86_Name(Reg), VariableName); AddCode16((uint16_t)(0x0523 + (Reg * 0x800))); diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h index fc22ee263..b4826298f 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h @@ -75,7 +75,7 @@ public: void AddX86RegToX86Reg(x86Reg Destination, x86Reg Source); void AndConstToVariable(void * Variable, const char * VariableName, uint32_t Const); void AndConstToX86Reg(x86Reg Reg, uint32_t Const); - void AndVariableToX86Reg(void * Variable, const char * VariableName, x86Reg Reg); + void AndVariableToX86Reg(x86Reg Reg, void * Variable, const char * VariableName); void AndVariableDispToX86Reg(x86Reg Reg, void * Variable, const char * VariableName, x86Reg AddrReg, Multipler Multiply); void AndX86RegToX86Reg(x86Reg Destination, x86Reg Source); void X86HardBreakPoint();