2010-05-31 00:21:08 +00:00
|
|
|
class CCodeBlock :
|
|
|
|
private CRecompilerOps
|
2010-05-30 01:54:42 +00:00
|
|
|
{
|
|
|
|
public:
|
2010-06-07 02:23:58 +00:00
|
|
|
CCodeBlock(DWORD VAddrEnter, BYTE * RecompPos, bool bDelaySlot );
|
2010-05-30 01:54:42 +00:00
|
|
|
|
|
|
|
bool Compile ( void );
|
|
|
|
|
|
|
|
inline DWORD VAddrEnter ( void ) const { return m_VAddrEnter; }
|
|
|
|
inline DWORD VAddrFirst ( void ) const { return m_VAddrFirst; }
|
|
|
|
inline DWORD VAddrLast ( void ) const { return m_VAddrLast; }
|
|
|
|
inline BYTE * CompiledLocation ( void ) const { return m_CompiledLocation; }
|
|
|
|
inline int NoOfSections ( void ) const { return m_NoOfSections; }
|
|
|
|
inline const CCodeSection & EnterSection ( void ) const { return m_EnterSection; }
|
2010-05-31 00:21:08 +00:00
|
|
|
inline DWORD NextTest ( void ) const { return m_EnterSection.m_Test + 1; }
|
2010-06-07 02:23:58 +00:00
|
|
|
inline bool bDelaySlot ( void ) const { return m_bDelaySlot; }
|
2010-05-30 01:54:42 +00:00
|
|
|
|
|
|
|
inline void SetVAddrFirst ( DWORD VAddr ) { m_VAddrFirst = VAddr; }
|
|
|
|
inline void SetVAddrLast ( DWORD VAddr ) { m_VAddrLast = VAddr; }
|
|
|
|
|
|
|
|
EXIT_LIST m_ExitInfo;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void AnalyseBlock ( void );
|
2010-06-04 06:25:07 +00:00
|
|
|
void CompileExitCode ( void );
|
2010-05-30 01:54:42 +00:00
|
|
|
|
|
|
|
DWORD m_VAddrEnter;
|
|
|
|
DWORD m_VAddrFirst; // the address of the first opcode in the block
|
|
|
|
DWORD m_VAddrLast; // the address of the first opcode in the block
|
|
|
|
BYTE * m_CompiledLocation; // What address is this compiled at
|
|
|
|
int m_NoOfSections; // The number of sections this block uses
|
2010-06-07 02:23:58 +00:00
|
|
|
bool m_bDelaySlot;
|
|
|
|
CCodeSection m_EnterSection;
|
2010-05-30 01:54:42 +00:00
|
|
|
};
|