From ac54c6a4e2f6790f628f8a8112ff1940732f5068 Mon Sep 17 00:00:00 2001 From: magumagu Date: Sat, 17 Jan 2015 13:17:36 -0800 Subject: Make address translation respect the CPU translation mode. The PowerPC CPU has bits in MSR (DR and IR) which control whether addresses are translated. We should respect these instead of mixing physical addresses and translated addresses into the same address space. This is mostly mass-renaming calls to memory accesses APIs from places which expect address translation to use a different version from those which do not expect address translation. This does very little on its own, but it's the first step to a correct BAT implementation. --- Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp') diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp index 8d5137430e..fcf42756ca 100644 --- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp @@ -298,7 +298,7 @@ void CCodeWindow::StepOver() { if (CCPU::IsStepping()) { - UGeckoInstruction inst = Memory::Read_Instruction(PC); + UGeckoInstruction inst = PowerPC::HostRead_Instruction(PC); if (inst.LK) { PowerPC::breakpoints.ClearAllTemporary(); @@ -329,7 +329,7 @@ void CCodeWindow::StepOut() u64 steps = 0; PowerPC::CoreMode oldMode = PowerPC::GetMode(); PowerPC::SetMode(PowerPC::MODE_INTERPRETER); - UGeckoInstruction inst = Memory::Read_Instruction(PC); + UGeckoInstruction inst = PowerPC::HostRead_Instruction(PC); while (inst.hex != 0x4e800020 && steps < timeout) // check for blr { if (inst.LK) @@ -347,7 +347,7 @@ void CCodeWindow::StepOut() PowerPC::SingleStep(); ++steps; } - inst = Memory::Read_Instruction(PC); + inst = PowerPC::HostRead_Instruction(PC); } PowerPC::SingleStep(); @@ -604,7 +604,7 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event) bool found = false; for (u32 addr = 0x80000000; addr < 0x80180000; addr += 4) { - const char *name = PPCTables::GetInstructionName(Memory::ReadUnchecked_U32(addr)); + const char *name = PPCTables::GetInstructionName(PowerPC::HostRead_U32(addr)); if (name && (wx_name == name)) { NOTICE_LOG(POWERPC, "Found %s at %08x", wx_name.c_str(), addr); -- cgit v1.2.3