Merge pull request #10044 from AdmiralCurtiss/invalidate-icache-lines-fix

PowerPC: Fix for calling InvalidateICacheLines() with a count of 1 causing a (harmless) second invalidation.
This commit is contained in:
Mai M 2021-08-19 19:23:11 -04:00 committed by GitHub
commit 17a01c894b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -240,7 +240,7 @@ void InvalidateICacheLines(u32 address, u32 count)
// with an extra optimization for the case of a single cache line invalidation
if (count == 1)
InvalidateICacheLine(address);
if (count == 0 || count >= static_cast<u32>(0x1'0000'0000 / 32))
else if (count == 0 || count >= static_cast<u32>(0x1'0000'0000 / 32))
InvalidateICache(address & ~0x1f, 0xffffffff, false);
else
InvalidateICache(address & ~0x1f, 32 * count, false);