mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-26 09:59:15 +00:00
MMU: Use templates for Read/Write functions
This commit is contained in:
parent
03ef9b4995
commit
8a97ce9124
32 changed files with 487 additions and 775 deletions
|
|
@ -277,7 +277,7 @@ void ThreadWidget::Update()
|
|||
};
|
||||
const auto format_hex_from = [&format_hex](const Core::CPUThreadGuard& guard, u32 addr) {
|
||||
addr =
|
||||
PowerPC::MMU::HostIsRAMAddress(guard, addr) ? PowerPC::MMU::HostRead_U32(guard, addr) : 0;
|
||||
PowerPC::MMU::HostIsRAMAddress(guard, addr) ? PowerPC::MMU::HostRead<u32>(guard, addr) : 0;
|
||||
return format_hex(addr);
|
||||
};
|
||||
const auto get_state = [](u16 thread_state) {
|
||||
|
|
@ -463,7 +463,7 @@ void ThreadWidget::UpdateThreadCallstack(const Core::CPUThreadGuard& guard,
|
|||
m_callstack_table->setItem(i, 0, new QTableWidgetItem(format_hex(sp)));
|
||||
if (PowerPC::MMU::HostIsRAMAddress(guard, sp + 4))
|
||||
{
|
||||
const u32 lr_save = PowerPC::MMU::HostRead_U32(guard, sp + 4);
|
||||
const u32 lr_save = PowerPC::MMU::HostRead<u32>(guard, sp + 4);
|
||||
m_callstack_table->setItem(i, 2, new QTableWidgetItem(format_hex(lr_save)));
|
||||
m_callstack_table->setItem(
|
||||
i, 3,
|
||||
|
|
@ -474,7 +474,7 @@ void ThreadWidget::UpdateThreadCallstack(const Core::CPUThreadGuard& guard,
|
|||
{
|
||||
m_callstack_table->setItem(i, 2, new QTableWidgetItem(QStringLiteral("--------")));
|
||||
}
|
||||
sp = PowerPC::MMU::HostRead_U32(guard, sp);
|
||||
sp = PowerPC::MMU::HostRead<u32>(guard, sp);
|
||||
m_callstack_table->setItem(i, 1, new QTableWidgetItem(format_hex(sp)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue