mirror of
https://github.com/jpd002/Play-.git
synced 2025-05-09 03:58:12 +03:00
Changes for Half-Life.
git-svn-id: http://svn.purei.org/purei/trunk@527 b36208d7-6611-0410-8bec-b1987f11c4a2
This commit is contained in:
parent
36656f025f
commit
1b07b4716d
21 changed files with 1277 additions and 101 deletions
|
@ -80,7 +80,7 @@ int CMipsExecutor::Execute(int cycles)
|
|||
return cycles;
|
||||
}
|
||||
|
||||
bool CMipsExecutor::MustBreak()
|
||||
bool CMipsExecutor::MustBreak() const
|
||||
{
|
||||
#ifdef DEBUGGER_INCLUDED
|
||||
#ifdef _PSX
|
||||
|
@ -103,7 +103,7 @@ bool CMipsExecutor::MustBreak()
|
|||
return false;
|
||||
}
|
||||
|
||||
CBasicBlock* CMipsExecutor::FindBlockAt(uint32 address)
|
||||
CBasicBlock* CMipsExecutor::FindBlockAt(uint32 address) const
|
||||
{
|
||||
BlockBeginMap::const_iterator beginIterator = m_blockBegin.lower_bound(address);
|
||||
if(beginIterator == m_blockBegin.end()) return NULL;
|
||||
|
@ -185,7 +185,7 @@ void CMipsExecutor::CreateBlock(uint32 start, uint32 end)
|
|||
}
|
||||
assert(FindBlockAt(end) == NULL);
|
||||
{
|
||||
CBasicBlock* block = new CBasicBlock(m_context, start, end);
|
||||
CBasicBlock* block = BlockFactory(m_context, start, end);
|
||||
m_blocks.push_back(block);
|
||||
m_blockBegin[start] = block;
|
||||
m_blockEnd[end] = block;
|
||||
|
@ -216,6 +216,11 @@ void CMipsExecutor::DeleteBlock(CBasicBlock* block)
|
|||
delete block;
|
||||
}
|
||||
|
||||
CBasicBlock* CMipsExecutor::BlockFactory(CMIPS& context, uint32 start, uint32 end)
|
||||
{
|
||||
return new CBasicBlock(context, start, end);
|
||||
}
|
||||
|
||||
void CMipsExecutor::PartitionFunction(uint32 functionAddress)
|
||||
{
|
||||
typedef std::set<uint32> PartitionPointSet;
|
||||
|
@ -271,7 +276,7 @@ void CMipsExecutor::PartitionFunction(uint32 functionAddress)
|
|||
CBasicBlock* possibleBlock = FindBlockStartingAt(address);
|
||||
if(possibleBlock != NULL)
|
||||
{
|
||||
assert(possibleBlock->GetEndAddress() <= endAddress);
|
||||
//assert(possibleBlock->GetEndAddress() <= endAddress);
|
||||
//Add its beginning and end in the partition points
|
||||
partitionPoints.insert(possibleBlock->GetBeginAddress());
|
||||
partitionPoints.insert(possibleBlock->GetEndAddress() + 4);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue