Skip to content

Commit

Permalink
Core: Add CX86RegInfo::GetFPStatusReg
Browse files Browse the repository at this point in the history
  • Loading branch information
project64 committed May 16, 2024
1 parent 13bd420 commit 7f18773
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Source/Project64-core/N64System/Recompiler/x86/x86RegInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,18 @@ bool CX86RegInfo::IsFPStatusRegMapped()
return false;
}

asmjit::x86::Gp CX86RegInfo::GetFPStatusReg() const
{
for (int32_t i = 0, n = x86RegIndex_Size; i < n; i++)
{
if (GetX86Mapped((x86RegIndex)i) == FPStatusReg_Mapped)
{
return GetX86RegFromIndex((x86RegIndex)i);
}
}
return x86Reg_Unknown;
}

asmjit::x86::Gp CX86RegInfo::FreeX86Reg()
{
if (GetX86Mapped(x86RegIndex_EDI) == NotMapped && !GetX86Protected(x86RegIndex_EDI))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class CX86RegInfo :
const asmjit::x86::St & StackPosition(int32_t Reg);

bool IsFPStatusRegMapped();
asmjit::x86::Gp GetFPStatusReg() const;
asmjit::x86::Gp FreeX86Reg();
asmjit::x86::Gp Free8BitX86Reg();
void Map_GPR_32bit(int32_t MipsReg, bool SignValue, int32_t MipsRegToLoad);
Expand Down

0 comments on commit 7f18773

Please sign in to comment.