Skip to content

Commit

Permalink
Merge pull request #6251 from bobjrsenior/more-registers-on-register-…
Browse files Browse the repository at this point in the history
…window

DolphinWX: Add TB and GQRs to Register Window
  • Loading branch information
leoetlino committed Dec 15, 2017
2 parents 49a55e0 + 7589ade commit 2824454
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Source/Core/DolphinWX/Debugger/RegisterView.cpp
Expand Up @@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <cinttypes>
#include <wx/colour.h>
#include <wx/grid.h>
#include <wx/menu.h>
Expand Down Expand Up @@ -301,6 +302,9 @@ wxString CRegTable::GetValue(int row, int col)
if (row < 16)
return wxString::Format("IBAT%01d", row - 8);

if (row == 16)
return wxString::Format("TB");

break;
}
case 6:
Expand All @@ -324,20 +328,31 @@ wxString CRegTable::GetValue(int row, int col)
<< 32 |
PowerPC::ppcState.spr[SPR_IBAT4L + (row - 16) * 2]);

if (row == 16)
return wxString::Format("%016" PRIx64, static_cast<u64>(PowerPC::ppcState.spr[SPR_TU])
<< 32 |
PowerPC::ppcState.spr[SPR_TL]);

break;
}
case 7:
{
if (row < 16)
return wxString::Format("SR%02d", row);

if (row < 24)
return wxString::Format("GQR%01d", row - 16);

break;
}
case 8:
{
if (row < 16)
return wxString::Format("%08x", PowerPC::ppcState.sr[row]);

if (row < 24)
return wxString::Format("%08x", PowerPC::ppcState.spr[SPR_GQR0 + (row - 16)]);

break;
}
default:
Expand Down

0 comments on commit 2824454

Please sign in to comment.