diff options
| author | magumagu <magumagu9@gmail.com> | 2014-04-19 17:39:42 -0700 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2014-05-24 11:04:24 -0700 |
| commit | 6bb08de8a04097ec609dd7e893918f6ac096aea8 (patch) | |
| tree | e522b43b3877f1ce1ee5fed80b4469cc4ff67401 /Source/Core | |
| parent | 440246a19059f54f4b88ce011095d24f7fb53f8b (diff) | |
JIT: get rid of useless code in JitCache.cpp.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitCommon/JitCache.cpp | 18 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/JitCommon/JitCache.h | 4 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/JitInterface.cpp | 8 |
3 files changed, 6 insertions, 24 deletions
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 71143fc955..2c9a4afeb5 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -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(); diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h index 0837dd371a..ada410a420 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h @@ -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 diff --git a/Source/Core/Core/PowerPC/JitInterface.cpp b/Source/Core/Core/PowerPC/JitInterface.cpp index 281f853911..f959564d51 100644 --- a/Source/Core/Core/PowerPC/JitInterface.cpp +++ b/Source/Core/Core/PowerPC/JitInterface.cpp @@ -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) |
