diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp index 218501098..8be1d2761 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86RecompilerOps.cpp @@ -10531,7 +10531,7 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr) } if (ModValue != 0) { - m_Assembler.OrConstToVariable(ModValue, &g_Reg->MI_MODE_REG, "MI_MODE_REG"); + m_Assembler.OrConstToVariable(&g_Reg->MI_MODE_REG, "MI_MODE_REG", ModValue); } if ((Value & MI_CLR_DP_INTR) != 0) { @@ -10600,7 +10600,7 @@ void CX86RecompilerOps::SW_Const(uint32_t Value, uint32_t VAddr) } if (ModValue != 0) { - m_Assembler.OrConstToVariable(ModValue, &g_Reg->MI_INTR_MASK_REG, "MI_INTR_MASK_REG"); + m_Assembler.OrConstToVariable(&g_Reg->MI_INTR_MASK_REG, "MI_INTR_MASK_REG", ModValue); } break; } diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp index 70b9e605f..0e4a84e96 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.cpp @@ -1773,7 +1773,7 @@ void CX86Ops::NotX86Reg(x86Reg Reg) } } -void CX86Ops::OrConstToVariable(uint32_t Const, void * Variable, const char * VariableName) +void CX86Ops::OrConstToVariable(void * Variable, const char * VariableName, uint32_t Const) { CodeLog(" or dword ptr [%s], 0x%X", VariableName, Const); AddCode16(0x0D81); diff --git a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h index 3bf921e45..3493a1015 100644 --- a/Source/Project64-core/N64System/Recompiler/x86/x86ops.h +++ b/Source/Project64-core/N64System/Recompiler/x86/x86ops.h @@ -161,7 +161,7 @@ public: void MoveZxVariableToX86regHalf(x86Reg Reg, void * Variable, const char * VariableName); void MulX86reg(x86Reg Reg); void NotX86Reg(x86Reg Reg); - void OrConstToVariable(uint32_t Const, void * Variable, const char * VariableName); + void OrConstToVariable(void * Variable, const char * VariableName, uint32_t Const); void OrConstToX86Reg(uint32_t Const, x86Reg Reg); void OrVariableToX86Reg(void * Variable, const char * VariableName, x86Reg Reg); void OrX86RegToVariable(void * Variable, const char * VariableName, x86Reg Reg);