[Project64] Update Recompiler Ops.cpp to use standard types
This commit is contained in:
parent
c33e7e7958
commit
23210e759a
|
@ -612,7 +612,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
{
|
||||
JumpInfo[i]->FallThrough = false;
|
||||
JmpLabel32(JumpInfo[i]->BranchLabel.c_str(), 0);
|
||||
JumpInfo[i]->LinkLocation = (DWORD*)(m_RecompPos - 4);
|
||||
JumpInfo[i]->LinkLocation = (uint32_t*)(m_RecompPos - 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -638,7 +638,7 @@ void CCodeSection::GenerateSectionLinkage()
|
|||
{
|
||||
JumpInfo[i]->FallThrough = false;
|
||||
JmpLabel32(JumpInfo[i]->BranchLabel.c_str(), 0);
|
||||
JumpInfo[i]->LinkLocation = (DWORD *)(m_RecompPos - 4);
|
||||
JumpInfo[i]->LinkLocation = (uint32_t *)(m_RecompPos - 4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2141,7 +2141,7 @@ bool CCodeSection::InheritParentInfo()
|
|||
Parent = ParentList[CurrentParent].Parent;
|
||||
JumpInfo = ParentList[CurrentParent].JumpInfo;
|
||||
JmpLabel32(Label.c_str(), 0);
|
||||
JumpInfo->LinkLocation = (DWORD *)(m_RecompPos - 4);
|
||||
JumpInfo->LinkLocation = (uint32_t *)(m_RecompPos - 4);
|
||||
JumpInfo->LinkLocation2 = NULL;
|
||||
|
||||
CurrentParent = i;
|
||||
|
|
|
@ -10,17 +10,16 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
class CJumpInfo
|
||||
struct CJumpInfo
|
||||
{
|
||||
typedef CExitInfo::EXIT_REASON EXIT_REASON;
|
||||
public:
|
||||
CJumpInfo();
|
||||
|
||||
DWORD TargetPC;
|
||||
DWORD JumpPC;
|
||||
uint32_t TargetPC;
|
||||
uint32_t JumpPC;
|
||||
stdstr BranchLabel;
|
||||
DWORD * LinkLocation;
|
||||
DWORD * LinkLocation2;
|
||||
uint32_t * LinkLocation;
|
||||
uint32_t * LinkLocation2;
|
||||
bool FallThrough;
|
||||
bool PermLoop;
|
||||
bool DoneDelaySlot; //maybe deletable
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -10,6 +10,7 @@
|
|||
****************************************************************************/
|
||||
#pragma once
|
||||
|
||||
|
||||
class CCodeSection;
|
||||
|
||||
class CRecompilerOps :
|
||||
|
@ -51,32 +52,32 @@ protected:
|
|||
static void XORI ();
|
||||
static void LUI ();
|
||||
static void DADDIU ();
|
||||
// static void LDL ();
|
||||
// static void LDR ();
|
||||
// static void LB ();
|
||||
// static void LH ();
|
||||
// static void LWL ();
|
||||
// static void LW ();
|
||||
// static void LBU ();
|
||||
// static void LHU ();
|
||||
// static void LWR ();
|
||||
// static void LWU (); //added by Witten
|
||||
// static void SB ();
|
||||
// static void SH ();
|
||||
// static void SWL ();
|
||||
// static void SW ();
|
||||
// static void SWR ();
|
||||
// static void SDL ();
|
||||
// static void SDR ();
|
||||
// static void LDL ();
|
||||
// static void LDR ();
|
||||
// static void LB ();
|
||||
// static void LH ();
|
||||
// static void LWL ();
|
||||
// static void LW ();
|
||||
// static void LBU ();
|
||||
// static void LHU ();
|
||||
// static void LWR ();
|
||||
// static void LWU (); //added by Witten
|
||||
// static void SB ();
|
||||
// static void SH ();
|
||||
// static void SWL ();
|
||||
// static void SW ();
|
||||
// static void SWR ();
|
||||
// static void SDL ();
|
||||
// static void SDR ();
|
||||
static void CACHE ();
|
||||
// static void LL ();
|
||||
// static void LWC1 ();
|
||||
// static void LDC1 ();
|
||||
// static void LD ();
|
||||
// static void SC ();
|
||||
// static void SWC1 ();
|
||||
// static void SDC1 ();
|
||||
// static void SD ();
|
||||
// static void LL ();
|
||||
// static void LWC1 ();
|
||||
// static void LDC1 ();
|
||||
// static void LD ();
|
||||
// static void SC ();
|
||||
// static void SWC1 ();
|
||||
// static void SDC1 ();
|
||||
// static void SD ();
|
||||
|
||||
/********************** R4300i OpCodes: Special **********************/
|
||||
static void SPECIAL_SLL ();
|
||||
|
@ -196,70 +197,67 @@ protected:
|
|||
/************************** Other functions **************************/
|
||||
static void UnknownOpcode ();
|
||||
|
||||
|
||||
static void BeforeCallDirect(CRegInfo & RegSet);
|
||||
static void AfterCallDirect(CRegInfo & RegSet);
|
||||
static void EnterCodeBlock();
|
||||
static void ExitCodeBlock();
|
||||
static void CompileReadTLBMiss(DWORD VirtualAddress, x86Reg LookUpReg);
|
||||
static void CompileReadTLBMiss(uint32_t VirtualAddress, x86Reg LookUpReg);
|
||||
static void CompileReadTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
|
||||
static void CompileWriteTLBMiss(x86Reg AddressReg, x86Reg LookUpReg);
|
||||
static void UpdateSyncCPU(CRegInfo & RegSet, DWORD Cycles);
|
||||
static void UpdateSyncCPU(CRegInfo & RegSet, uint32_t Cycles);
|
||||
static void UpdateCounters(CRegInfo & RegSet, bool CheckTimer, bool ClearValues = false);
|
||||
static void CompileSystemCheck(DWORD TargetPC, const CRegInfo & RegSet);
|
||||
static void CompileSystemCheck(uint32_t TargetPC, const CRegInfo & RegSet);
|
||||
static void ChangeDefaultRoundingModel();
|
||||
static void OverflowDelaySlot(bool TestTimer);
|
||||
|
||||
|
||||
|
||||
static STEP_TYPE m_NextInstruction;
|
||||
static DWORD m_CompilePC;
|
||||
static uint32_t m_CompilePC;
|
||||
static OPCODE m_Opcode;
|
||||
static CRegInfo m_RegWorkingSet;
|
||||
static DWORD m_BranchCompare;
|
||||
static uint32_t m_BranchCompare;
|
||||
static CCodeSection * m_Section;
|
||||
|
||||
/********* Helper Functions *********/
|
||||
typedef CRegInfo::REG_STATE REG_STATE;
|
||||
|
||||
static REG_STATE GetMipsRegState ( int Reg ) { return m_RegWorkingSet.GetMipsRegState(Reg); }
|
||||
static unsigned __int64 GetMipsReg ( int Reg ) { return m_RegWorkingSet.GetMipsReg(Reg); }
|
||||
static __int64 GetMipsReg_S ( int Reg ) { return m_RegWorkingSet.GetMipsReg_S(Reg); }
|
||||
static DWORD GetMipsRegLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo(Reg); }
|
||||
static long GetMipsRegLo_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegLo_S(Reg); }
|
||||
static DWORD GetMipsRegHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi(Reg); }
|
||||
static long GetMipsRegHi_S ( int Reg ) { return m_RegWorkingSet.GetMipsRegHi_S(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapLo ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapLo(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapHi ( int Reg ) { return m_RegWorkingSet.GetMipsRegMapHi(Reg); }
|
||||
static REG_STATE GetMipsRegState ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegState(Reg); }
|
||||
static uint64_t GetMipsReg ( int32_t Reg ) { return m_RegWorkingSet.GetMipsReg(Reg); }
|
||||
static int64_t GetMipsReg_S ( int32_t Reg ) { return m_RegWorkingSet.GetMipsReg_S(Reg); }
|
||||
static uint32_t GetMipsRegLo ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegLo(Reg); }
|
||||
static int32_t GetMipsRegLo_S ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegLo_S(Reg); }
|
||||
static uint32_t GetMipsRegHi ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegHi(Reg); }
|
||||
static int32_t GetMipsRegHi_S ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegHi_S(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapLo ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegMapLo(Reg); }
|
||||
static CX86Ops::x86Reg GetMipsRegMapHi ( int32_t Reg ) { return m_RegWorkingSet.GetMipsRegMapHi(Reg); }
|
||||
|
||||
static bool IsKnown ( int Reg ) { return m_RegWorkingSet.IsKnown(Reg); }
|
||||
static bool IsUnknown ( int Reg ) { return m_RegWorkingSet.IsUnknown(Reg); }
|
||||
static bool IsMapped ( int Reg ) { return m_RegWorkingSet.IsMapped(Reg); }
|
||||
static bool IsConst ( int Reg ) { return m_RegWorkingSet.IsConst(Reg); }
|
||||
static bool IsSigned ( int Reg ) { return m_RegWorkingSet.IsSigned(Reg); }
|
||||
static bool IsUnsigned ( int Reg ) { return m_RegWorkingSet.IsUnsigned(Reg); }
|
||||
static bool Is32Bit ( int Reg ) { return m_RegWorkingSet.Is32Bit(Reg); }
|
||||
static bool Is64Bit ( int Reg ) { return m_RegWorkingSet.Is64Bit(Reg); }
|
||||
static bool Is32BitMapped ( int Reg ) { return m_RegWorkingSet.Is32BitMapped(Reg); }
|
||||
static bool Is64BitMapped ( int Reg ) { return m_RegWorkingSet.Is64BitMapped(Reg); }
|
||||
static bool IsKnown ( int32_t Reg ) { return m_RegWorkingSet.IsKnown(Reg); }
|
||||
static bool IsUnknown ( int32_t Reg ) { return m_RegWorkingSet.IsUnknown(Reg); }
|
||||
static bool IsMapped ( int32_t Reg ) { return m_RegWorkingSet.IsMapped(Reg); }
|
||||
static bool IsConst ( int32_t Reg ) { return m_RegWorkingSet.IsConst(Reg); }
|
||||
static bool IsSigned ( int32_t Reg ) { return m_RegWorkingSet.IsSigned(Reg); }
|
||||
static bool IsUnsigned ( int32_t Reg ) { return m_RegWorkingSet.IsUnsigned(Reg); }
|
||||
static bool Is32Bit ( int32_t Reg ) { return m_RegWorkingSet.Is32Bit(Reg); }
|
||||
static bool Is64Bit ( int32_t Reg ) { return m_RegWorkingSet.Is64Bit(Reg); }
|
||||
static bool Is32BitMapped ( int32_t Reg ) { return m_RegWorkingSet.Is32BitMapped(Reg); }
|
||||
static bool Is64BitMapped ( int32_t Reg ) { return m_RegWorkingSet.Is64BitMapped(Reg); }
|
||||
|
||||
static void FixRoundModel ( CRegInfo::FPU_ROUND RoundMethod )
|
||||
{
|
||||
m_RegWorkingSet.FixRoundModel(RoundMethod);
|
||||
}
|
||||
static void ChangeFPURegFormat ( int Reg, CRegInfo::FPU_STATE OldFormat, CRegInfo::FPU_STATE NewFormat, CRegInfo::FPU_ROUND RoundingModel )
|
||||
static void ChangeFPURegFormat ( int32_t Reg, CRegInfo::FPU_STATE OldFormat, CRegInfo::FPU_STATE NewFormat, CRegInfo::FPU_ROUND RoundingModel )
|
||||
{
|
||||
m_RegWorkingSet.ChangeFPURegFormat(Reg,OldFormat,NewFormat,RoundingModel);
|
||||
}
|
||||
static void Load_FPR_ToTop ( int Reg, int RegToLoad, CRegInfo::FPU_STATE Format)
|
||||
static void Load_FPR_ToTop ( int32_t Reg, int32_t RegToLoad, CRegInfo::FPU_STATE Format)
|
||||
{
|
||||
m_RegWorkingSet.Load_FPR_ToTop(Reg,RegToLoad,Format);
|
||||
}
|
||||
static bool RegInStack ( int Reg, CRegInfo::FPU_STATE Format )
|
||||
static bool RegInStack ( int32_t Reg, CRegInfo::FPU_STATE Format )
|
||||
{
|
||||
return m_RegWorkingSet.RegInStack(Reg,Format);
|
||||
}
|
||||
static x86FpuValues StackPosition ( int Reg )
|
||||
static x86FpuValues StackPosition ( int32_t Reg )
|
||||
{
|
||||
return m_RegWorkingSet.StackPosition(Reg);
|
||||
}
|
||||
|
@ -267,7 +265,7 @@ protected:
|
|||
{
|
||||
m_RegWorkingSet.UnMap_AllFPRs();
|
||||
}
|
||||
static void UnMap_FPR ( DWORD Reg, bool WriteBackValue )
|
||||
static void UnMap_FPR ( uint32_t Reg, bool WriteBackValue )
|
||||
{
|
||||
m_RegWorkingSet.UnMap_FPR(Reg,WriteBackValue);
|
||||
}
|
||||
|
@ -280,11 +278,11 @@ protected:
|
|||
{
|
||||
return m_RegWorkingSet.Free8BitX86Reg();
|
||||
}
|
||||
static void Map_GPR_32bit ( int Reg, bool SignValue, int MipsRegToLoad )
|
||||
static void Map_GPR_32bit ( int32_t Reg, bool SignValue, int32_t MipsRegToLoad )
|
||||
{
|
||||
m_RegWorkingSet.Map_GPR_32bit(Reg,SignValue,MipsRegToLoad);
|
||||
}
|
||||
static void Map_GPR_64bit ( int Reg, int MipsRegToLoad )
|
||||
static void Map_GPR_64bit ( int32_t Reg, int32_t MipsRegToLoad )
|
||||
{
|
||||
m_RegWorkingSet.Map_GPR_64bit(Reg,MipsRegToLoad);
|
||||
}
|
||||
|
@ -296,15 +294,15 @@ protected:
|
|||
{
|
||||
return m_RegWorkingSet.Map_MemoryStack(Reg,bMapRegister,LoadValue);
|
||||
}
|
||||
static x86Reg Map_TempReg ( x86Reg Reg, int MipsReg, bool LoadHiWord )
|
||||
static x86Reg Map_TempReg ( x86Reg Reg, int32_t MipsReg, bool LoadHiWord )
|
||||
{
|
||||
return m_RegWorkingSet.Map_TempReg(Reg,MipsReg,LoadHiWord);
|
||||
}
|
||||
static void ProtectGPR ( DWORD Reg )
|
||||
static void ProtectGPR ( uint32_t Reg )
|
||||
{
|
||||
m_RegWorkingSet.ProtectGPR(Reg);
|
||||
}
|
||||
static void UnProtectGPR ( DWORD Reg )
|
||||
static void UnProtectGPR ( uint32_t Reg )
|
||||
{
|
||||
m_RegWorkingSet.UnProtectGPR(Reg);
|
||||
}
|
||||
|
@ -316,7 +314,7 @@ protected:
|
|||
{
|
||||
return m_RegWorkingSet.UnMap_TempReg();
|
||||
}
|
||||
static void UnMap_GPR ( DWORD Reg, bool WriteBackValue )
|
||||
static void UnMap_GPR ( uint32_t Reg, bool WriteBackValue )
|
||||
{
|
||||
m_RegWorkingSet.UnMap_GPR(Reg,WriteBackValue);
|
||||
}
|
||||
|
@ -326,5 +324,5 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
static DWORD CompilePC() { return m_CompilePC; }
|
||||
static uint32_t CompilePC() { return m_CompilePC; }
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue