summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2010-01-18 04:39:01 +0000
committerskidau <skidau@gmail.com>2010-01-18 04:39:01 +0000
commit9df31a9747deb29ca220230c2fae6c0c7e2e552b (patch)
treea7db423291932500f74a4dc128292b83652cd806 /Source/Core
parent8245e4115d47394e408cebfb9c3a0c953db06b0d (diff)
Implemented tlbie instruction
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4875 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp
index e09dfbf5f5..6b4d2b558a 100644
--- a/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp
+++ b/Source/Core/Core/Src/PowerPC/Interpreter/Interpreter_LoadStore.cpp
@@ -665,10 +665,16 @@ void tlbia(UGeckoInstruction _inst)
void tlbie(UGeckoInstruction _inst)
{
- // invalid entry
- // int entry = _inst.RB;
-
- //MessageBox(0,"TLBIE","TLBIE",0);
+ // Invalidate TLB entry
+ u32 _Address = m_GPR[_inst.RB];
+ for (int i = 0; i < 16; i++)
+ {
+ if ((_Address & ~0xfff) == (PowerPC::ppcState.tlb_va[(PowerPC::ppcState.tlb_last + i) & 15]))
+ {
+ PowerPC::ppcState.tlb_pa[(PowerPC::ppcState.tlb_last + i) & 15] = 0;
+ PowerPC::ppcState.tlb_va[(PowerPC::ppcState.tlb_last + i) & 15] = 0;
+ }
+ }
}
void tlbsync(UGeckoInstruction _inst)