diff options
| author | magumagu <magumagu9@gmail.com> | 2015-01-17 13:17:36 -0800 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2015-02-11 13:56:22 -0800 |
| commit | ac54c6a4e2f6790f628f8a8112ff1940732f5068 (patch) | |
| tree | 096df265a2517bc5d1e4215e7445ebc7851ad6d8 /Source/Core/DolphinWX/Debugger/CodeWindow.cpp | |
| parent | d9988ee9b5d89b4ac5905dfffabb8ccae2d78a76 (diff) | |
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.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeWindow.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |
