[Project64] get Code Block.cpp to use standard types
This commit is contained in:
parent
e85c1665b1
commit
a6d1722122
File diff suppressed because it is too large
Load Diff
|
@ -11,63 +11,63 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
class CCodeBlock :
|
class CCodeBlock :
|
||||||
private CRecompilerOps
|
private CRecompilerOps
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos );
|
CCodeBlock(uint32_t VAddrEnter, uint8_t * RecompPos );
|
||||||
~CCodeBlock();
|
~CCodeBlock();
|
||||||
|
|
||||||
bool Compile();
|
bool Compile();
|
||||||
|
|
||||||
DWORD VAddrEnter() const { return m_VAddrEnter; }
|
uint32_t VAddrEnter() const { return m_VAddrEnter; }
|
||||||
DWORD VAddrFirst() const { return m_VAddrFirst; }
|
uint32_t VAddrFirst() const { return m_VAddrFirst; }
|
||||||
DWORD VAddrLast() const { return m_VAddrLast; }
|
uint32_t VAddrLast() const { return m_VAddrLast; }
|
||||||
BYTE * CompiledLocation() const { return m_CompiledLocation; }
|
uint8_t * CompiledLocation() const { return m_CompiledLocation; }
|
||||||
int NoOfSections() const { return m_Sections.size(); }
|
int32_t NoOfSections() const { return m_Sections.size(); }
|
||||||
const CCodeSection & EnterSection() const { return *m_EnterSection; }
|
const CCodeSection & EnterSection() const { return *m_EnterSection; }
|
||||||
const MD5Digest & Hash() const { return m_Hash; }
|
const MD5Digest & Hash() const { return m_Hash; }
|
||||||
|
|
||||||
void SetVAddrFirst(DWORD VAddr) { m_VAddrFirst = VAddr; }
|
void SetVAddrFirst(uint32_t VAddr) { m_VAddrFirst = VAddr; }
|
||||||
void SetVAddrLast(DWORD VAddr) { m_VAddrLast = VAddr; }
|
void SetVAddrLast(uint32_t VAddr) { m_VAddrLast = VAddr; }
|
||||||
|
|
||||||
CCodeSection * ExistingSection(DWORD Addr) { return m_EnterSection->ExistingSection(Addr, NextTest()); }
|
CCodeSection * ExistingSection(uint32_t Addr) { return m_EnterSection->ExistingSection(Addr, NextTest()); }
|
||||||
bool SectionAccessible(DWORD m_SectionID) { return m_EnterSection->SectionAccessible(m_SectionID, NextTest()); }
|
bool SectionAccessible(uint32_t m_SectionID) { return m_EnterSection->SectionAccessible(m_SectionID, NextTest()); }
|
||||||
|
|
||||||
QWORD MemContents(int i) const { return m_MemContents[i]; }
|
uint64_t MemContents(int32_t i) const { return m_MemContents[i]; }
|
||||||
QWORD * MemLocation(int i) const { return m_MemLocation[i]; }
|
uint64_t * MemLocation(int32_t i) const { return m_MemLocation[i]; }
|
||||||
|
|
||||||
DWORD NextTest();
|
uint32_t NextTest();
|
||||||
|
|
||||||
EXIT_LIST m_ExitInfo;
|
EXIT_LIST m_ExitInfo;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CCodeBlock(); // Disable default constructor
|
CCodeBlock(); // Disable default constructor
|
||||||
CCodeBlock(const CCodeBlock&); // Disable copy constructor
|
CCodeBlock(const CCodeBlock&); // Disable copy constructor
|
||||||
CCodeBlock& operator=(const CCodeBlock&); // Disable assignment
|
CCodeBlock& operator=(const CCodeBlock&); // Disable assignment
|
||||||
|
|
||||||
bool AnalyseBlock();
|
bool AnalyseBlock();
|
||||||
void CompileExitCode();
|
void CompileExitCode();
|
||||||
|
|
||||||
bool CreateBlockLinkage ( CCodeSection * EnterSection );
|
bool CreateBlockLinkage ( CCodeSection * EnterSection );
|
||||||
void DetermineLoops ();
|
void DetermineLoops ();
|
||||||
void LogSectionInfo ();
|
void LogSectionInfo ();
|
||||||
bool SetSection ( CCodeSection * & Section, CCodeSection * CurrentSection, DWORD TargetPC, bool LinkAllowed, DWORD CurrentPC );
|
bool SetSection ( CCodeSection * & Section, CCodeSection * CurrentSection, uint32_t TargetPC, bool LinkAllowed, uint32_t CurrentPC );
|
||||||
bool AnalyzeInstruction ( DWORD PC, DWORD & TargetPC, DWORD & ContinuePC, bool & LikelyBranch, bool & IncludeDelaySlot,
|
bool AnalyzeInstruction ( uint32_t PC, uint32_t & TargetPC, uint32_t & ContinuePC, bool & LikelyBranch, bool & IncludeDelaySlot,
|
||||||
bool & EndBlock, bool & PermLoop );
|
bool & EndBlock, bool & PermLoop );
|
||||||
|
|
||||||
DWORD m_VAddrEnter;
|
uint32_t m_VAddrEnter;
|
||||||
DWORD m_VAddrFirst; // the address of the first opcode in the block
|
uint32_t m_VAddrFirst; // the address of the first opcode in the block
|
||||||
DWORD m_VAddrLast; // the address of the first opcode in the block
|
uint32_t m_VAddrLast; // the address of the first opcode in the block
|
||||||
BYTE* m_CompiledLocation; // What address is this compiled at
|
uint8_t* m_CompiledLocation; // What address is this compiled at
|
||||||
|
|
||||||
typedef std::map<DWORD,CCodeSection *> SectionMap;
|
|
||||||
typedef std::list<CCodeSection *> SectionList;
|
|
||||||
|
|
||||||
SectionMap m_SectionMap;
|
typedef std::map<uint32_t,CCodeSection *> SectionMap;
|
||||||
SectionList m_Sections;
|
typedef std::list<CCodeSection *> SectionList;
|
||||||
CCodeSection * m_EnterSection;
|
|
||||||
long m_Test;
|
SectionMap m_SectionMap;
|
||||||
MD5Digest m_Hash;
|
SectionList m_Sections;
|
||||||
QWORD m_MemContents[2];
|
CCodeSection * m_EnterSection;
|
||||||
QWORD * m_MemLocation[2];
|
int32_t m_Test;
|
||||||
|
MD5Digest m_Hash;
|
||||||
|
uint64_t m_MemContents[2];
|
||||||
|
uint64_t * m_MemLocation[2];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue