2013-08-15 08:54:25 +02:00
|
|
|
// vim: set ts=8 ts=2 sw=2 tw=99 et:
|
2008-08-15 07:22:26 +02:00
|
|
|
#include "jit_function.h"
|
|
|
|
#include "sp_vm_engine.h"
|
|
|
|
#include "jit_x86.h"
|
|
|
|
|
2013-08-15 08:54:25 +02:00
|
|
|
JitFunction::JitFunction(void *entry_addr, cell_t pcode_offs, LoopEdge *edges, uint32_t nedges)
|
|
|
|
: m_pEntryAddr(entry_addr),
|
|
|
|
m_PcodeOffs(pcode_offs),
|
|
|
|
edges_(edges),
|
|
|
|
nedges_(nedges)
|
2008-08-15 07:22:26 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
JitFunction::~JitFunction()
|
|
|
|
{
|
2013-08-15 08:54:25 +02:00
|
|
|
delete [] edges_;
|
|
|
|
g_Jit.FreeCode(m_pEntryAddr);
|
2008-08-15 07:22:26 +02:00
|
|
|
}
|
|
|
|
|
2013-08-15 08:54:25 +02:00
|
|
|
void *
|
|
|
|
JitFunction::GetEntryAddress() const
|
2008-08-15 07:22:26 +02:00
|
|
|
{
|
2013-08-15 08:54:25 +02:00
|
|
|
return m_pEntryAddr;
|
2008-08-15 07:22:26 +02:00
|
|
|
}
|
|
|
|
|
2013-08-15 08:54:25 +02:00
|
|
|
cell_t
|
|
|
|
JitFunction::GetPCodeAddress() const
|
2008-08-15 07:22:26 +02:00
|
|
|
{
|
2013-08-15 08:54:25 +02:00
|
|
|
return m_PcodeOffs;
|
2008-08-15 07:22:26 +02:00
|
|
|
}
|
2013-08-15 08:54:25 +02:00
|
|
|
|