[Project64] Update Recompiler Class.cpp to use standard types

This commit is contained in:
zilmar 2015-11-10 07:19:27 +11:00
parent 0c00b90334
commit d06eae9457
2 changed files with 972 additions and 918 deletions

File diff suppressed because it is too large Load Diff

View File

@ -11,64 +11,65 @@
#pragma once #pragma once
class CRecompiler : class CRecompiler :
protected CDebugSettings, protected CDebugSettings,
public CRecompilerSettings, public CRecompilerSettings,
public CFunctionMap, public CFunctionMap,
private CRecompMemory, private CRecompMemory,
private CSystemRegisters private CSystemRegisters
{ {
public: public:
enum REMOVE_REASON { enum REMOVE_REASON
Remove_InitialCode, {
Remove_Cache, Remove_InitialCode,
Remove_ProtectedMem, Remove_Cache,
Remove_ValidateFunc, Remove_ProtectedMem,
Remove_TLB, Remove_ValidateFunc,
Remove_DMA, Remove_TLB,
Remove_StoreInstruc, Remove_DMA,
}; Remove_StoreInstruc,
};
typedef void (*DelayFunc)(); typedef void (*DelayFunc)();
public: public:
CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation); CRecompiler(CRegisters & Registers, CProfiling & Profile, bool & EndEmulation);
~CRecompiler(); ~CRecompiler();
void Run(); void Run();
void Reset(); void Reset();
void ResetRecompCode(bool bAllocate); void ResetRecompCode(bool bAllocate);
//Self modifying code methods //Self modifying code methods
void ClearRecompCode_Virt ( DWORD VirtualAddress, int length, REMOVE_REASON Reason ); void ClearRecompCode_Virt ( uint32_t VirtualAddress, int32_t length, REMOVE_REASON Reason );
void ClearRecompCode_Phys ( DWORD PhysicalAddress, int length, REMOVE_REASON Reason ); void ClearRecompCode_Phys ( uint32_t PhysicalAddress, int32_t length, REMOVE_REASON Reason );
void ResetMemoryStackPos(); void ResetMemoryStackPos();
DWORD& MemoryStackPos() { return m_MemoryStack; } uint32_t& MemoryStackPos() { return m_MemoryStack; }
private: private:
CRecompiler(); // Disable default constructor CRecompiler(); // Disable default constructor
CRecompiler(const CRecompiler&); // Disable copy constructor CRecompiler(const CRecompiler&); // Disable copy constructor
CRecompiler& operator=(const CRecompiler&); // Disable assignment CRecompiler& operator=(const CRecompiler&); // Disable assignment
CCompiledFunc * CompilerCode(); CCompiledFunc * CompilerCode();
// Main loops for the different look up methods // Main loops for the different look up methods
void RecompilerMain_VirtualTable(); void RecompilerMain_VirtualTable();
void RecompilerMain_VirtualTable_validate(); void RecompilerMain_VirtualTable_validate();
void RecompilerMain_ChangeMemory(); void RecompilerMain_ChangeMemory();
void RecompilerMain_Lookup(); void RecompilerMain_Lookup();
void RecompilerMain_Lookup_TLB(); void RecompilerMain_Lookup_TLB();
void RecompilerMain_Lookup_validate(); void RecompilerMain_Lookup_validate();
void RecompilerMain_Lookup_validate_TLB(); void RecompilerMain_Lookup_validate_TLB();
CCompiledFuncList m_Functions; CCompiledFuncList m_Functions;
CRegisters & m_Registers; CRegisters & m_Registers;
CProfiling & m_Profile; CProfiling & m_Profile;
bool & m_EndEmulation; bool & m_EndEmulation;
DWORD m_MemoryStack; uint32_t m_MemoryStack;
//Quick access to registers //Quick access to registers
uint32_t & PROGRAM_COUNTER; uint32_t & PROGRAM_COUNTER;
}; };