diff options
| author | Mai M <mathew1800@gmail.com> | 2021-09-08 04:00:23 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-08 04:00:23 -0400 |
| commit | 8809d8eb61a05c2e1f689be40fee3855c5fa5eb0 (patch) | |
| tree | 5b4300260f6d3dc4adebef37c536f0e2c78b0abb /Source | |
| parent | 5538e90ebf52645bf7389ad6b3e487b6d9e1b82b (diff) | |
| parent | 34992f52c796ae9f62e0abfc9f088138e87bd72a (diff) | |
Merge pull request #10089 from AdmiralCurtiss/jit-cache-valid-block-clear
PowerPC/JitCache: Clear valid_block bits for long invalidations.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/PowerPC/JitCommon/JitCache.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp index 1e0e512bd4..febc4373fd 100644 --- a/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp +++ b/Source/Core/Core/PowerPC/JitCommon/JitCache.cpp @@ -234,6 +234,16 @@ void JitBaseBlockCache::InvalidateICacheInternal(u32 physical_address, u32 addre else valid_block.Clear(physical_address / 32); } + else if (length > 32) + { + // Even if we can't check the set for optimization, we still want to remove all fully covered + // cache lines from the valid_block set so that later calls don't try to invalidate already + // cleared regions. + const u32 covered_block_start = (physical_address + 0x1f) / 32; + const u32 covered_block_end = (physical_address + length) / 32; + for (u32 i = covered_block_start; i < covered_block_end; ++i) + valid_block.Clear(i); + } if (destroy_block) { |
