diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index 75b8bcd0a..3307f6df0 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -10076,7 +10076,7 @@ void CX86RecompilerOps::CompileStoreMemoryValue(CX86Ops::x86Reg AddressReg, CX86 m_Assembler.XorConstToX86Reg(AddressReg, 2); if (ValueReg == CX86Ops::x86_Unknown) { - m_Assembler.MoveConstHalfToX86regPointer((uint16_t)(Value & 0xFFFF), AddressReg, TempReg); + m_Assembler.MoveConstHalfToX86regPointer(AddressReg, TempReg, (uint16_t)(Value & 0xFFFF)); } else { diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp index 6ac1dc458..4b2eb171c 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp @@ -757,7 +757,7 @@ void CX86Ops::MoveConstHalfToVariable(void * Variable, const char * VariableName AddCode16(Const); } -void CX86Ops::MoveConstHalfToX86regPointer(uint16_t Const, x86Reg AddrReg1, x86Reg AddrReg2) +void CX86Ops::MoveConstHalfToX86regPointer(x86Reg AddrReg1, x86Reg AddrReg2, uint16_t Const) { uint8_t Param = 0; diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h index 88c876b7a..753cee486 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h @@ -130,7 +130,7 @@ public: void MoveConstByteToVariable(void * Variable, const char * VariableName, uint8_t Const); void MoveConstByteToX86regPointer(uint8_t Const, x86Reg AddrReg1, x86Reg AddrReg2); void MoveConstHalfToVariable(void * Variable, const char * VariableName, uint16_t Const); - void MoveConstHalfToX86regPointer(uint16_t Const, x86Reg AddrReg1, x86Reg AddrReg2); + void MoveConstHalfToX86regPointer(x86Reg AddrReg1, x86Reg AddrReg2, uint16_t Const); void MoveConstToMemoryDisp(uint32_t Const, x86Reg AddrReg, uint32_t Disp); void MoveConstToVariable(uint32_t Const, void * Variable, const char * VariableName); void MoveConstToX86Pointer(x86Reg X86Pointer, uint32_t Const);