2012-12-19 09:30:18 +00:00
|
|
|
#pragma once
|
2016-01-13 11:15:30 +00:00
|
|
|
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
|
2012-12-19 09:30:18 +00:00
|
|
|
|
2010-05-25 09:15:19 +00:00
|
|
|
class CCompiledFunc
|
|
|
|
{
|
2008-09-18 03:15:49 +00:00
|
|
|
public:
|
2015-11-09 20:07:54 +00:00
|
|
|
CCompiledFunc(const CCodeBlock & CodeBlock);
|
2008-09-18 03:15:49 +00:00
|
|
|
|
2015-11-09 20:07:54 +00:00
|
|
|
typedef void (*Func)();
|
2010-05-25 09:15:19 +00:00
|
|
|
|
2022-10-10 00:22:17 +00:00
|
|
|
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;
|
|
|
|
}
|
2010-05-25 09:15:19 +00:00
|
|
|
|
2022-10-10 00:22:17 +00:00
|
|
|
CCompiledFunc * Next() const
|
|
|
|
{
|
|
|
|
return m_Next;
|
|
|
|
}
|
|
|
|
void SetNext(CCompiledFunc * Next)
|
|
|
|
{
|
|
|
|
m_Next = Next;
|
|
|
|
}
|
2012-09-24 22:07:51 +00:00
|
|
|
|
2022-10-10 00:22:17 +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
|
|
|
|
2010-05-30 01:54:42 +00:00
|
|
|
private:
|
2021-04-13 00:07:11 +00:00
|
|
|
CCompiledFunc(void);
|
2022-10-10 00:22:17 +00:00
|
|
|
CCompiledFunc(const CCompiledFunc &);
|
|
|
|
CCompiledFunc & operator=(const CCompiledFunc &);
|
2015-11-09 20:07:54 +00:00
|
|
|
|
2021-04-13 00:07:11 +00:00
|
|
|
uint32_t m_EnterPC;
|
|
|
|
uint32_t m_MinPC;
|
|
|
|
uint32_t m_MaxPC;
|
2015-11-09 20:07:54 +00:00
|
|
|
|
|
|
|
MD5Digest m_Hash;
|
2021-04-13 00:07:11 +00:00
|
|
|
Func m_Function;
|
2015-11-09 20:07:54 +00:00
|
|
|
|
2022-10-10 00:22:17 +00:00
|
|
|
CCompiledFunc * m_Next;
|
|
|
|
uint64_t m_MemContents[2], *m_MemLocation[2];
|
2008-09-18 03:15:49 +00:00
|
|
|
};
|
2010-06-04 06:25:07 +00:00
|
|
|
|
2015-11-09 20:07:54 +00:00
|
|
|
typedef std::map<uint32_t, CCompiledFunc *> CCompiledFuncList;
|