From eb40f765c2bf42a1b57c964262dfff439b6dbaa6 Mon Sep 17 00:00:00 2001 From: skidau Date: Sat, 28 Aug 2010 00:37:27 +0000 Subject: [PATCH] Bugfix for the TLB cache used by the MMU. Thanks to drkIIRaziel for spotting it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6138 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/MemmapFunctions.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/Core/Core/Src/HW/MemmapFunctions.cpp b/Source/Core/Core/Src/HW/MemmapFunctions.cpp index 10b4f35276..c32e5d5e3b 100644 --- a/Source/Core/Core/Src/HW/MemmapFunctions.cpp +++ b/Source/Core/Core/Src/HW/MemmapFunctions.cpp @@ -697,9 +697,8 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr) { if ((_Address & ~0xfff) == (PowerPC::ppcState.itlb_va[i & 127])) { - u32 result = PowerPC::ppcState.itlb_pa[i & 127] | (_Address & 0xfff); + *paddr = PowerPC::ppcState.itlb_pa[i & 127] | (_Address & 0xfff); PowerPC::ppcState.itlb_last = i; - paddr = &result; return 1; } } @@ -710,9 +709,8 @@ u32 LookupTLBPageAddress(const XCheckTLBFlag _Flag, const u32 vpa, u32 *paddr) { if ((_Address & ~0xfff) == (PowerPC::ppcState.dtlb_va[i & 127])) { - u32 result = PowerPC::ppcState.dtlb_pa[i & 127] | (_Address & 0xfff); + *paddr = PowerPC::ppcState.dtlb_pa[i & 127] | (_Address & 0xfff); PowerPC::ppcState.dtlb_last = i; - paddr = &result; return 1; } }