Skip to content

Commit

Permalink
Core: CX86RecompilerOps::BaseOffsetAddress should not unprotect unles…
Browse files Browse the repository at this point in the history
…s it actually protected
  • Loading branch information
project64 committed Sep 5, 2022
1 parent e8adf78 commit a5c6f25
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -9526,10 +9526,14 @@ CX86Ops::x86Reg CX86RecompilerOps::BaseOffsetAddress(bool UseBaseRegister)
{
if (m_Opcode.offset != 0)
{
bool UnProtect = m_RegWorkingSet.GetX86Protected(GetIndexFromX86Reg(GetMipsRegMapLo(m_Opcode.base)));
ProtectGPR(m_Opcode.base);
AddressReg = Map_TempReg(CX86Ops::x86_Any, -1, false);
m_Assembler.LeaSourceAndOffset(AddressReg, GetMipsRegMapLo(m_Opcode.base), (int16_t)m_Opcode.offset);
UnProtectGPR(m_Opcode.base);
if (!UnProtect)
{
UnProtectGPR(m_Opcode.base);
}
}
else if (UseBaseRegister)
{
Expand Down

0 comments on commit a5c6f25

Please sign in to comment.