JIT: get rid of useless code in JitCache.cpp.

This commit is contained in:
magumagu 2014-04-19 17:39:42 -07:00
parent 440246a190
commit 6bb08de8a0
3 changed files with 6 additions and 24 deletions

View File

@ -116,24 +116,6 @@ using namespace Gen;
memset(blockCodePointers, 0, sizeof(u8*)*MAX_NUM_BLOCKS);
}
void JitBaseBlockCache::ClearSafe()
{
memset(iCache, JIT_ICACHE_INVALID_BYTE, JIT_ICACHE_SIZE);
memset(iCacheEx, JIT_ICACHE_INVALID_BYTE, JIT_ICACHEEX_SIZE);
memset(iCacheVMEM, JIT_ICACHE_INVALID_BYTE, JIT_ICACHE_SIZE);
}
/*void JitBaseBlockCache::DestroyBlocksWithFlag(BlockFlag death_flag)
{
for (int i = 0; i < num_blocks; i++)
{
if (blocks[i].flags & death_flag)
{
DestroyBlock(i, false);
}
}
}*/
void JitBaseBlockCache::Reset()
{
Shutdown();

View File

@ -96,7 +96,6 @@ public:
void FinalizeBlock(int block_num, bool block_link, const u8 *code_ptr);
void Clear();
void ClearSafe();
void Init();
void Shutdown();
void Reset();
@ -122,9 +121,6 @@ public:
// DOES NOT WORK CORRECTLY WITH INLINING
void InvalidateICache(u32 address, const u32 length);
void DestroyBlock(int block_num, bool invalidate);
// Not currently used
//void DestroyBlocksWithFlag(BlockFlag death_flag);
};
// x86 BlockCache

View File

@ -39,7 +39,7 @@ namespace JitInterface
void DoState(PointerWrap &p)
{
if (jit && p.GetMode() == PointerWrap::MODE_READ)
jit->GetBlockCache()->ClearSafe();
jit->GetBlockCache()->Clear();
}
CPUCoreBase *InitJitCore(int core)
{
@ -199,8 +199,12 @@ namespace JitInterface
}
void ClearSafe()
{
// This clear is "safe" in the sense that it's okay to run from
// inside a JIT'ed block: it clears the instruction cache, but not
// the JIT'ed code.
// TODO: There's probably a better way to handle this situation.
if (jit)
jit->GetBlockCache()->ClearSafe();
jit->GetBlockCache()->Clear();
}
void InvalidateICache(u32 address, u32 size)