diff --git a/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp b/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp index 2ee9aff19..d10ff6a6f 100644 --- a/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp +++ b/Source/Project64/N64 System/Recompiler/Recompiler Ops.cpp @@ -2633,6 +2633,10 @@ void CRecompilerOps::SPECIAL_ADD (void) { } else { AddVariableToX86reg(cMipsRegMapLo(m_Opcode.rd),&_GPR[source2].W[0],CRegName::GPR_Lo[source2]); } + if (bFastSP() && m_Opcode.rd == 29) + { + _MMU->ResetMemoryStack(); + } } void CRecompilerOps::SPECIAL_ADDU (void) { @@ -2658,6 +2662,10 @@ void CRecompilerOps::SPECIAL_ADDU (void) { } else { AddVariableToX86reg(cMipsRegMapLo(m_Opcode.rd),&_GPR[source2].W[0],CRegName::GPR_Lo[source2]); } + if (bFastSP() && m_Opcode.rd == 29) + { + _MMU->ResetMemoryStack(); + } } void CRecompilerOps::SPECIAL_SUB (void) { @@ -2685,6 +2693,10 @@ void CRecompilerOps::SPECIAL_SUB (void) { SubVariableFromX86reg(cMipsRegMapLo(m_Opcode.rd),&_GPR[m_Opcode.rt].W[0],CRegName::GPR_Lo[m_Opcode.rt]); } } + if (bFastSP() && m_Opcode.rd == 29) + { + _MMU->ResetMemoryStack(); + } } void CRecompilerOps::SPECIAL_SUBU (void) {