project64/Source/Project64/N64System/Recompiler/FunctionInfo.h

54 lines
2.2 KiB
C
Raw Normal View History

2012-12-19 09:30:18 +00:00
/****************************************************************************
* *
2015-11-10 05:21:49 +00:00
* Project64 - A Nintendo 64 emulator. *
2012-12-19 09:30:18 +00:00
* http://www.pj64-emu.com/ *
* Copyright (C) 2012 Project64. All rights reserved. *
* *
* License: *
* GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html *
* *
****************************************************************************/
#pragma once
class CCompiledFunc
{
public:
CCompiledFunc(const CCodeBlock & CodeBlock);
typedef void (*Func)();
//Get Private Information
const uint32_t EnterPC () const { return m_EnterPC; }
const uint32_t MinPC () const { return m_MinPC; }
const uint32_t MaxPC () const { return m_MaxPC; }
const Func Function () const { return m_Function; }
const MD5Digest& Hash () const { return m_Hash; }
CCompiledFunc* Next () const { return m_Next; }
void SetNext(CCompiledFunc* Next) { m_Next = Next; }
2012-09-24 22:07:51 +00:00
uint64_t MemContents(int32_t i) { return m_MemContents[i]; }
uint64_t* MemLocation(int32_t i) { return m_MemLocation[i]; }
2012-09-24 22:07:51 +00:00
private:
CCompiledFunc(void); // Disable default constructor
CCompiledFunc(const CCompiledFunc&); // Disable copy constructor
CCompiledFunc& operator=(const CCompiledFunc&); // Disable assignment
//Information
uint32_t m_EnterPC; // The Entry PC
uint32_t m_MinPC; // The Lowest PC in the function
uint32_t m_MaxPC; // The Highest PC in the function
MD5Digest m_Hash;
//From querying the recompiler get information about the function
Func m_Function;
CCompiledFunc* m_Next;
//Validation
uint64_t m_MemContents[2], * m_MemLocation[2];
};
typedef std::map<uint32_t, CCompiledFunc *> CCompiledFuncList;