diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 265bef38d9..9ef3e7786e 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -269,9 +269,8 @@ void JitBaseBlockCache::WriteDestroyBlock(const JitBlock& block) // Can be faster by doing a queue for blocks to link up, and only process those // Should probably be done -void JitBaseBlockCache::LinkBlockExits(int i) +void JitBaseBlockCache::LinkBlockExits(JitBlock& b) { - JitBlock& b = blocks[i]; if (b.invalid) { // This block is dead. Don't relink it. @@ -296,15 +295,15 @@ void JitBaseBlockCache::LinkBlockExits(int i) void JitBaseBlockCache::LinkBlock(int i) { - LinkBlockExits(i); - const JitBlock& b = blocks[i]; + JitBlock& b = blocks[i]; + LinkBlockExits(b); auto ppp = links_to.equal_range(b.effectiveAddress); for (auto iter = ppp.first; iter != ppp.second; ++iter) { - const JitBlock& b2 = blocks[iter->second]; + JitBlock& b2 = blocks[iter->second]; if (b.msrBits == b2.msrBits) - LinkBlockExits(iter->second); + LinkBlockExits(b2); } } diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/PowerPC/JitCommon/JitCache.h index 0b1f23482e..b3d7527e3c 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.h +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.h @@ -155,7 +155,7 @@ private: virtual void WriteLinkBlock(const JitBlock::LinkData& source, const JitBlock* dest) = 0; virtual void WriteDestroyBlock(const JitBlock& block); - void LinkBlockExits(int i); + void LinkBlockExits(JitBlock& b); void LinkBlock(int i); void UnlinkBlock(int i); void DestroyBlock(int block_num, bool invalidate);