2013-04-12 02:35:55 +00:00
|
|
|
#pragma once
|
2007-12-01 04:08:34 +00:00
|
|
|
|
|
|
|
#include "MIPS.h"
|
2010-08-11 03:47:19 +00:00
|
|
|
#include "MemoryFunction.h"
|
2007-12-01 04:08:34 +00:00
|
|
|
|
2010-08-11 03:47:19 +00:00
|
|
|
namespace Jitter
|
|
|
|
{
|
|
|
|
class CJitter;
|
|
|
|
};
|
2009-06-06 15:38:03 +00:00
|
|
|
|
2007-12-01 04:08:34 +00:00
|
|
|
class CBasicBlock
|
|
|
|
{
|
|
|
|
public:
|
2010-08-11 03:47:19 +00:00
|
|
|
CBasicBlock(CMIPS&, uint32, uint32);
|
2012-04-15 22:00:47 +00:00
|
|
|
virtual ~CBasicBlock();
|
|
|
|
unsigned int Execute();
|
|
|
|
void Compile();
|
2010-08-11 03:47:19 +00:00
|
|
|
|
2012-04-15 22:00:47 +00:00
|
|
|
uint32 GetBeginAddress() const;
|
|
|
|
uint32 GetEndAddress() const;
|
|
|
|
bool IsCompiled() const;
|
|
|
|
unsigned int GetSelfLoopCount() const;
|
|
|
|
void SetSelfLoopCount(unsigned int);
|
2007-12-01 04:08:34 +00:00
|
|
|
|
2009-06-06 15:38:03 +00:00
|
|
|
protected:
|
2012-04-15 22:00:47 +00:00
|
|
|
uint32 m_begin;
|
|
|
|
uint32 m_end;
|
|
|
|
CMIPS& m_context;
|
2009-06-06 15:38:03 +00:00
|
|
|
|
2010-08-11 03:47:19 +00:00
|
|
|
virtual void CompileRange(CMipsJitter*);
|
2009-06-06 15:38:03 +00:00
|
|
|
|
|
|
|
private:
|
2013-04-12 02:35:55 +00:00
|
|
|
CMemoryFunction m_function;
|
2012-04-15 22:00:47 +00:00
|
|
|
unsigned int m_selfLoopCount;
|
2007-12-01 04:08:34 +00:00
|
|
|
};
|