Core: CX86RegInfo::UnMap_X86reg should fail on a protected register

This commit is contained in:
zilmar 2024-04-18 16:41:03 +09:30
parent 79f7aa9927
commit 4071b52810
1 changed files with 8 additions and 7 deletions

View File

@ -1808,15 +1808,16 @@ bool CX86RegInfo::UnMap_X86reg(const asmjit::x86::Gp & Reg)
}
}
}
else if (GetX86Protected(RegIndex))
{
return false;
}
else if (GetX86Mapped(RegIndex) == CX86RegInfo::Temp_Mapped)
{
if (!GetX86Protected(RegIndex))
{
m_CodeBlock.Log(" regcache: unallocate %s from temp storage", CX86Ops::x86_Name(Reg));
SetX86Mapped(RegIndex, NotMapped);
SetX86Protected(RegIndex, false);
return true;
}
m_CodeBlock.Log(" regcache: unallocate %s from temp storage", CX86Ops::x86_Name(Reg));
SetX86Mapped(RegIndex, NotMapped);
SetX86Protected(RegIndex, false);
return true;
}
else if (GetX86Mapped(RegIndex) == CX86RegInfo::Stack_Mapped)
{