Core: Remove helper functions from x86 Recompiler Ops

This commit is contained in:
zilmar 2023-05-02 10:50:49 +09:30
parent 5cfb80fcfc
commit 02a48566c0
2 changed files with 1714 additions and 1877 deletions

View File

@ -253,169 +253,6 @@ public:
return m_Assembler;
}
// Helper functions
typedef CRegInfo::REG_STATE REG_STATE;
REG_STATE GetMipsRegState(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegState(Reg);
}
uint64_t GetMipsReg(int32_t Reg)
{
return m_RegWorkingSet.GetMipsReg(Reg);
}
int64_t GetMipsReg_S(int32_t Reg)
{
return m_RegWorkingSet.GetMipsReg_S(Reg);
}
uint32_t GetMipsRegLo(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegLo(Reg);
}
int32_t GetMipsRegLo_S(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegLo_S(Reg);
}
uint32_t GetMipsRegHi(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegHi(Reg);
}
int32_t GetMipsRegHi_S(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegHi_S(Reg);
}
asmjit::x86::Gp GetMipsRegMapLo(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegMapLo(Reg);
}
asmjit::x86::Gp GetMipsRegMapHi(int32_t Reg)
{
return m_RegWorkingSet.GetMipsRegMapHi(Reg);
}
bool IsKnown(int32_t Reg)
{
return m_RegWorkingSet.IsKnown(Reg);
}
bool IsUnknown(int32_t Reg)
{
return m_RegWorkingSet.IsUnknown(Reg);
}
bool IsMapped(int32_t Reg)
{
return m_RegWorkingSet.IsMapped(Reg);
}
bool IsConst(int32_t Reg)
{
return m_RegWorkingSet.IsConst(Reg);
}
bool IsSigned(int32_t Reg)
{
return m_RegWorkingSet.IsSigned(Reg);
}
bool IsUnsigned(int32_t Reg)
{
return m_RegWorkingSet.IsUnsigned(Reg);
}
bool Is32Bit(int32_t Reg)
{
return m_RegWorkingSet.Is32Bit(Reg);
}
bool Is64Bit(int32_t Reg)
{
return m_RegWorkingSet.Is64Bit(Reg);
}
bool Is32BitMapped(int32_t Reg)
{
return m_RegWorkingSet.Is32BitMapped(Reg);
}
bool Is64BitMapped(int32_t Reg)
{
return m_RegWorkingSet.Is64BitMapped(Reg);
}
void FixRoundModel(CRegInfo::FPU_ROUND RoundMethod)
{
m_RegWorkingSet.FixRoundModel(RoundMethod);
}
void ChangeFPURegFormat(int32_t Reg, CRegInfo::FPU_STATE OldFormat, CRegInfo::FPU_STATE NewFormat, CRegInfo::FPU_ROUND RoundingModel)
{
m_RegWorkingSet.ChangeFPURegFormat(Reg, OldFormat, NewFormat, RoundingModel);
}
void Load_FPR_ToTop(int32_t Reg, int32_t RegToLoad, CRegInfo::FPU_STATE Format)
{
m_RegWorkingSet.Load_FPR_ToTop(Reg, RegToLoad, Format);
}
bool RegInStack(int32_t Reg, CRegInfo::FPU_STATE Format)
{
return m_RegWorkingSet.RegInStack(Reg, Format);
}
const asmjit::x86::St & StackPosition(int32_t Reg)
{
return m_RegWorkingSet.StackPosition(Reg);
}
void UnMap_AllFPRs()
{
m_RegWorkingSet.UnMap_AllFPRs();
}
void UnMap_FPR(uint32_t Reg, bool WriteBackValue)
{
m_RegWorkingSet.UnMap_FPR(Reg, WriteBackValue);
}
const asmjit::x86::Gp & FreeX86Reg()
{
return m_RegWorkingSet.FreeX86Reg();
}
const asmjit::x86::Gp & Free8BitX86Reg()
{
return m_RegWorkingSet.Free8BitX86Reg();
}
void Map_GPR_32bit(int32_t Reg, bool SignValue, int32_t MipsRegToLoad)
{
m_RegWorkingSet.Map_GPR_32bit(Reg, SignValue, MipsRegToLoad);
}
void Map_GPR_64bit(int32_t Reg, int32_t MipsRegToLoad)
{
m_RegWorkingSet.Map_GPR_64bit(Reg, MipsRegToLoad);
}
asmjit::x86::Gp Get_MemoryStack()
{
return m_RegWorkingSet.Get_MemoryStack();
}
asmjit::x86::Gp Map_MemoryStack(const asmjit::x86::Gp & Reg, bool bMapRegister, bool LoadValue = true)
{
return m_RegWorkingSet.Map_MemoryStack(Reg, bMapRegister, LoadValue);
}
asmjit::x86::Gp Map_TempReg(const asmjit::x86::Gp & Reg, int32_t MipsReg, bool LoadHiWord, bool Reg8Bit)
{
return m_RegWorkingSet.Map_TempReg(Reg, MipsReg, LoadHiWord, Reg8Bit);
}
void ProtectGPR(uint32_t Reg)
{
m_RegWorkingSet.ProtectGPR(Reg);
}
void UnProtectGPR(uint32_t Reg)
{
m_RegWorkingSet.UnProtectGPR(Reg);
}
void ResetX86Protection()
{
m_RegWorkingSet.ResetX86Protection();
}
const asmjit::x86::Gp & UnMap_TempReg()
{
return m_RegWorkingSet.UnMap_TempReg();
}
void UnMap_GPR(uint32_t Reg, bool WriteBackValue)
{
m_RegWorkingSet.UnMap_GPR(Reg, WriteBackValue);
}
bool UnMap_X86reg(const asmjit::x86::Gp & Reg)
{
return m_RegWorkingSet.UnMap_X86reg(Reg);
}
public:
uint32_t CompilePC()
{