Commit 890708fc authored by Jean-Philip Desjardins's avatar Jean-Philip Desjardins
Browse files

Code style fixes.

parent 193e7263
......@@ -255,9 +255,8 @@ bool CBasicBlock::IsCompiled() const
bool CBasicBlock::IsEmpty() const
{
return
(m_begin == MIPS_INVALID_PC) &&
(m_end == MIPS_INVALID_PC);
return (m_begin == MIPS_INVALID_PC) &&
(m_end == MIPS_INVALID_PC);
}
void CBasicBlock::EmptyBlockHandler(CMIPS* context)
......
......@@ -138,7 +138,7 @@ public:
void* m_vuMem = nullptr;
std::function<void (CMIPS*)> m_emptyBlockHandler;
std::function<void(CMIPS*)> m_emptyBlockHandler;
CMIPSArchitecture* m_pArch = nullptr;
CMIPSCoprocessor* m_pCOP[4];
......
......@@ -15,7 +15,7 @@ public:
typedef CBasicBlock* BlockType;
BlockLookupOneWay(BlockType emptyBlock, uint32 maxAddress)
: m_emptyBlock(emptyBlock)
: m_emptyBlock(emptyBlock)
{
m_tableSize = maxAddress / INSTRUCTION_SIZE;
m_blockTable = new BlockType[m_tableSize];
......@@ -71,7 +71,7 @@ public:
typedef CBasicBlock* BlockType;
BlockLookupTwoWay(BlockType emptyBlock, uint32 maxAddress)
: m_emptyBlock(emptyBlock)
: m_emptyBlock(emptyBlock)
{
m_subTableCount = (maxAddress + SUBTABLE_MASK) / SUBTABLE_SIZE;
assert(m_subTableCount != 0);
......@@ -175,22 +175,21 @@ public:
};
CMipsExecutor(CMIPS& context, uint32 maxAddress)
: m_emptyBlock(std::make_shared<CBasicBlock>(context, MIPS_INVALID_PC, MIPS_INVALID_PC))
, m_context(context)
, m_maxAddress(maxAddress)
, m_blockLookup(m_emptyBlock.get(), maxAddress)
: m_emptyBlock(std::make_shared<CBasicBlock>(context, MIPS_INVALID_PC, MIPS_INVALID_PC))
, m_context(context)
, m_maxAddress(maxAddress)
, m_blockLookup(m_emptyBlock.get(), maxAddress)
{
m_emptyBlock->Compile();
assert(!context.m_emptyBlockHandler);
context.m_emptyBlockHandler =
[&] (CMIPS* context)
{
uint32 address = context->m_pAddrTranslator(&m_context, m_context.m_State.nPC);
PartitionFunction(address);
auto block = FindBlockStartingAt(address);
assert(!block->IsEmpty());
block->Execute();
};
context.m_emptyBlockHandler =
[&](CMIPS* context) {
uint32 address = context->m_pAddrTranslator(&m_context, m_context.m_State.nPC);
PartitionFunction(address);
auto block = FindBlockStartingAt(address);
assert(!block->IsEmpty());
block->Execute();
};
}
virtual ~CMipsExecutor() = default;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment