mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 15:19:42 -06:00
PowerPC: Fast path in InvalidateICache is only valid if the address is 32-byte aligned.
This commit is contained in:
@ -190,9 +190,11 @@ void JitBaseBlockCache::InvalidateICache(u32 address, u32 length, bool forced)
|
|||||||
return;
|
return;
|
||||||
const u32 physical_address = translated.address;
|
const u32 physical_address = translated.address;
|
||||||
|
|
||||||
// Optimize the common case of length == 32 which is used by Interpreter::dcb*
|
// Optimization for the case of invalidating a single cache line, which is used by the dcb*
|
||||||
|
// instructions. If the valid_block bit for that cacheline is not set, we can safely skip
|
||||||
|
// the remaining invalidation logic.
|
||||||
bool destroy_block = true;
|
bool destroy_block = true;
|
||||||
if (length == 32)
|
if (length == 32 && (physical_address & 0x1fu) == 0)
|
||||||
{
|
{
|
||||||
if (!valid_block.Test(physical_address / 32))
|
if (!valid_block.Test(physical_address / 32))
|
||||||
destroy_block = false;
|
destroy_block = false;
|
||||||
|
Reference in New Issue
Block a user