[Project64] update Code Section to use standard types

This commit is contained in:
zilmar 2015-11-09 17:55:16 +11:00
parent 898f1da74d
commit 0f4be7ffa6
2 changed files with 1063 additions and 879 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,38 +18,38 @@ class CCodeSection :
public: public:
typedef std::list<CCodeSection *> SECTION_LIST; typedef std::list<CCodeSection *> SECTION_LIST;
CCodeSection( CCodeBlock * CodeBlock, DWORD EnterPC, DWORD ID, bool LinkAllowed); CCodeSection(CCodeBlock * CodeBlock, uint32_t EnterPC, uint32_t ID, bool LinkAllowed);
~CCodeSection(); ~CCodeSection();
void SetDelaySlot (); void SetDelaySlot();
void SetJumpAddress ( DWORD JumpPC, DWORD TargetPC, bool PermLoop ); void SetJumpAddress(uint32_t JumpPC, uint32_t TargetPC, bool PermLoop);
void SetContinueAddress ( DWORD JumpPC, DWORD TargetPC ); void SetContinueAddress(uint32_t JumpPC, uint32_t TargetPC);
void CompileCop1Test (); void CompileCop1Test();
bool GenerateX86Code ( DWORD Test ); bool GenerateX86Code(uint32_t Test);
void GenerateSectionLinkage (); void GenerateSectionLinkage();
void CompileExit ( DWORD JumpPC, DWORD TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void (*x86Jmp)(const char * Label, uint32_t Value)); void CompileExit(uint32_t JumpPC, uint32_t TargetPC, CRegInfo &ExitRegSet, CExitInfo::EXIT_REASON reason, bool CompileNow, void(*x86Jmp)(const char * Label, uint32_t Value));
void DetermineLoop ( DWORD Test, DWORD Test2, DWORD TestID ); void DetermineLoop(uint32_t Test, uint32_t Test2, uint32_t TestID);
bool FixConstants ( DWORD Test ); bool FixConstants(uint32_t Test);
CCodeSection * ExistingSection ( DWORD Addr, DWORD Test ); CCodeSection * ExistingSection(uint32_t Addr, uint32_t Test);
bool SectionAccessible ( DWORD SectionId, DWORD Test ); bool SectionAccessible(uint32_t SectionId, uint32_t Test);
bool DisplaySectionInformation ( DWORD ID, DWORD Test ); bool DisplaySectionInformation(uint32_t ID, uint32_t Test);
void DisplaySectionInformation (); void DisplaySectionInformation();
void AddParent ( CCodeSection * Parent ); void AddParent(CCodeSection * Parent);
void SwitchParent ( CCodeSection * OldParent, CCodeSection * NewParent ); void SwitchParent(CCodeSection * OldParent, CCodeSection * NewParent);
/* Block Connection info */ /* Block Connection info */
SECTION_LIST m_ParentSection; SECTION_LIST m_ParentSection;
CCodeBlock * const m_BlockInfo; CCodeBlock * const m_BlockInfo;
const DWORD m_SectionID; const uint32_t m_SectionID;
const DWORD m_EnterPC; const uint32_t m_EnterPC;
DWORD m_EndPC; uint32_t m_EndPC;
CCodeSection * m_ContinueSection; CCodeSection * m_ContinueSection;
CCodeSection * m_JumpSection; CCodeSection * m_JumpSection;
bool m_EndSection; // if this section does not link bool m_EndSection; // if this section does not link
bool m_LinkAllowed; // are other sections allowed to find block to link to it bool m_LinkAllowed; // are other sections allowed to find block to link to it
DWORD m_Test; uint32_t m_Test;
DWORD m_Test2; uint32_t m_Test2;
BYTE * m_CompiledLocation; uint8_t * m_CompiledLocation;
bool m_InLoop; bool m_InLoop;
bool m_DelaySlot; bool m_DelaySlot;
@ -61,13 +61,16 @@ public:
CJumpInfo m_Cont; CJumpInfo m_Cont;
private: private:
void UnlinkParent ( CCodeSection * Parent, bool ContinueSection ); CCodeSection(void); // Disable default constructor
void InheritConstants (); CCodeSection(const CCodeSection&); // Disable copy constructor
void TestRegConstantStates ( CRegInfo & Base, CRegInfo & Reg ); CCodeSection& operator=(const CCodeSection&); // Disable assignment
void SyncRegState ( const CRegInfo & SyncTo );
bool IsAllParentLoops ( CCodeSection * Parent, bool IgnoreIfCompiled, DWORD Test );
bool ParentContinue ();
bool InheritParentInfo ();
bool SetupRegisterForLoop ();
};
void UnlinkParent(CCodeSection * Parent, bool ContinueSection);
void InheritConstants();
void TestRegConstantStates(CRegInfo & Base, CRegInfo & Reg);
void SyncRegState(const CRegInfo & SyncTo);
bool IsAllParentLoops(CCodeSection * Parent, bool IgnoreIfCompiled, uint32_t Test);
bool ParentContinue();
bool InheritParentInfo();
bool SetupRegisterForLoop();
};