Add an invalidate all method to the jit.

This commit is contained in:
Unknown W. Brackets authored and greenbagels committed 2014-06-29 16:33:45 -04:00
1 parent d7f77dee72
commit da212fb33e
11 files changed
+30 -16

No files matched your search

+2 -2
View File
@@ -413,9 +413,9 @@ void CBreakPoints::Update(u32 addr)
// In case this is a delay slot, clear the previous instruction too.
if (addr != 0)
MIPSComp::jit->ClearCacheAt(addr - 4, 8);
MIPSComp::jit->InvalidateCacheAt(addr - 4, 8);
else
MIPSComp::jit->ClearCache();
MIPSComp::jit->InvalidateCache();
if (resume)
Core_EnableStepping(false);
+2 -5
View File
@@ -364,11 +364,8 @@ int sceKernelDcacheInvalidateRange(u32 addr, int size)
}
int sceKernelIcacheInvalidateRange(u32 addr, int size) {
DEBUG_LOG(CPU,"sceKernelIcacheInvalidateRange(%08x, %i)", addr, size);
// TODO: Make the JIT hash and compare the touched blocks.
if(MIPSComp::jit){
MIPSComp::jit->ClearCacheAt(addr, size);
}
DEBUG_LOG(CPU, "sceKernelIcacheInvalidateRange(%08x, %i)", addr, size);
currentMIPS->InvalidateICache(addr, size);
return 0;
}
+6 -1
View File
@@ -146,7 +146,12 @@ void Jit::ClearCache()
GenerateFixedCode();
}
void Jit::ClearCacheAt(u32 em_address, int length)
void Jit::InvalidateCache()
{
blocks.Clear();
}
void Jit::InvalidateCacheAt(u32 em_address, int length)
{
blocks.InvalidateICache(em_address, length);
}
+2 -1
View File
@@ -178,7 +178,8 @@ public:
JitBlockCache *GetBlockCache() { return &blocks; }
void ClearCache();
void ClearCacheAt(u32 em_address, int length = 4);
void InvalidateCache();
void InvalidateCacheAt(u32 em_address, int length = 4);
void EatPrefix() { js.EatPrefix(); }
+1 -1
View File
@@ -328,5 +328,5 @@ u32 MIPSState::ReadFCR(int reg) {
void MIPSState::InvalidateICache(u32 address, int length) {
// Only really applies to jit.
if (MIPSComp::jit)
MIPSComp::jit->ClearCacheAt(address, length);
MIPSComp::jit->InvalidateCacheAt(address, length);
}
+1 -1
View File
@@ -133,7 +133,7 @@ namespace MIPSInt
case 8:
// Invalidate the instruction cache at this address
if (MIPSComp::jit) {
MIPSComp::jit->ClearCacheAt(addr, 0x40);
MIPSComp::jit->InvalidateCacheAt(addr, 0x40);
}
break;
+5 -1
View File
@@ -217,7 +217,11 @@ void Jit::ClearCache() {
GenerateFixedCode();
}
void Jit::ClearCacheAt(u32 em_address, int length) {
void Jit::InvalidateCache() {
blocks.Clear();
}
void Jit::InvalidateCacheAt(u32 em_address, int length) {
blocks.InvalidateICache(em_address, length);
}
+2 -1
View File
@@ -286,7 +286,8 @@ namespace MIPSComp
void WriteSyscallExit();
void ClearCache();
void ClearCacheAt(u32 em_address, int length = 4);
void InvalidateCache();
void InvalidateCacheAt(u32 em_address, int length = 4);
void RunLoopUntil(u64 globalticks);
void GenerateFixedCode();
+6 -1
View File
@@ -218,7 +218,12 @@ void Jit::ClearCache()
ClearCodeSpace();
}
void Jit::ClearCacheAt(u32 em_address, int length)
void Jit::InvalidateCache()
{
blocks.Clear();
}
void Jit::InvalidateCacheAt(u32 em_address, int length)
{
blocks.InvalidateICache(em_address, length);
}
+2 -1
View File
@@ -168,7 +168,8 @@ public:
AsmRoutineManager &Asm() { return asm_; }
void ClearCache();
void ClearCacheAt(u32 em_address, int length = 4);
void InvalidateCache();
void InvalidateCacheAt(u32 em_address, int length = 4);
private:
void GetStateAndFlushAll(RegCacheState &state);
+1 -1
View File
@@ -298,7 +298,7 @@ void CtrlDisAsmView::assembleOpcode(u32 address, std::string defaultText)
Memory::Write_U32(encoded, address);
// In case this is a delay slot or combined instruction, clear cache above it too.
if (MIPSComp::jit)
MIPSComp::jit->ClearCacheAt(address - 4, 8);
MIPSComp::jit->InvalidateCacheAt(address - 4, 8);
scanFunctions();
if (address == curAddress)