diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index e1ee52746..22ced2e8f 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -2992,7 +2992,7 @@ void CX86RecompilerOps::LH_KnownAddress(CX86Ops::x86Reg Reg, uint32_t VAddr, boo { if (SignExtend) { - m_Assembler.MoveSxVariableToX86regHalf((PAddr ^ 2) + g_MMU->Rdram(), stdstr_f("RDRAM + (%X ^ 2)", PAddr).c_str(), Reg); + m_Assembler.MoveSxVariableToX86regHalf(Reg, (PAddr ^ 2) + g_MMU->Rdram(), stdstr_f("RDRAM + (%X ^ 2)", PAddr).c_str()); } else { diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp index d3a25ecd2..09b1f3a62 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp @@ -1038,7 +1038,7 @@ void CX86Ops::MoveSxVariableToX86regByte(x86Reg Reg, void * Variable, const char AddCode32((uint32_t)Variable); } -void CX86Ops::MoveSxVariableToX86regHalf(void * Variable, const char * VariableName, x86Reg Reg) +void CX86Ops::MoveSxVariableToX86regHalf(x86Reg Reg, void * Variable, const char * VariableName) { CodeLog(" movsx %s, word ptr [%s]", x86_Name(Reg), VariableName); diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h index 34378fc6e..6969739fd 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h @@ -139,7 +139,7 @@ public: void MoveSxByteX86regPointerToX86reg(x86Reg Reg, x86Reg AddrReg1, x86Reg AddrReg2); void MoveSxHalfX86regPointerToX86reg(x86Reg Reg, x86Reg AddrReg1, x86Reg AddrReg2); void MoveSxVariableToX86regByte(x86Reg Reg, void * Variable, const char * VariableName); - void MoveSxVariableToX86regHalf(void * Variable, const char * VariableName, x86Reg Reg); + void MoveSxVariableToX86regHalf(x86Reg Reg, void * Variable, const char * VariableName); void MoveVariableDispToX86Reg(void * Variable, const char * VariableName, x86Reg Reg, x86Reg AddrReg, int32_t Multiplier); void MoveVariableToX86reg(x86Reg Reg, void * Variable, const char * VariableName); void MoveVariableToX86regByte(void * Variable, const char * VariableName, x86Reg Reg);