Skip to content

Commit

Permalink
Core: ignore memory stack pointer when stack pointer is reset
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed Nov 24, 2022
1 parent 1f2fe96 commit 1e3fff2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10964,6 +10964,12 @@ void CX86RecompilerOps::ResetMemoryStack()
m_Assembler.MoveX86regToVariable(&_GPR[MipsReg].UW[0], CRegName::GPR_Lo[MipsReg], GetMipsRegMapLo(MipsReg));
}

asmjit::x86::Gp MemoryStackReg = Get_MemoryStack();
if (MemoryStackReg.isValid())
{
m_CodeBlock.Log(" regcache: unallocate %s from memory stack", CX86Ops::x86_Name(MemoryStackReg));
m_RegWorkingSet.SetX86Mapped(GetIndexFromX86Reg(MemoryStackReg), CRegInfo::NotMapped);
}
m_RegWorkingSet.BeforeCallDirect();
m_Assembler.CallThis((uint32_t)g_Recompiler, AddressOf(&CRecompiler::ResetMemoryStackPos), "CRecompiler::ResetMemoryStackPos", 4);
m_RegWorkingSet.AfterCallDirect();
Expand Down

0 comments on commit 1e3fff2

Please sign in to comment.