add ppc disassembly to jit results viewer windowTurn the JIT into a class. Indentation cleanup will be in a separate CL, and the block cache will later be split out into its own class. Cannot detect any speed difference whatsoever - the games spend 99.9% of their time in already jitted code anyway. I have a good reason for doing this - see upcoming changes.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1585 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard
2008-12-18 13:21:02 +00:00
parent 74c1950495
commit b8f619550d
35 changed files with 604 additions and 746 deletions

View File

@ -125,7 +125,9 @@ void CJitWindow::OnRefresh(wxCommandEvent& /*event*/) {
void CJitWindow::ViewAddr(u32 em_address)
{
the_jit_window->Show(true);
the_jit_window->Compare(em_address);
the_jit_window->SetFocus();
}
void CJitWindow::Compare(u32 em_address)
@ -136,14 +138,14 @@ void CJitWindow::Compare(u32 em_address)
disassembler x64disasm;
x64disasm.set_syntax_intel();
int block_num = Jit64::GetBlockNumberFromAddress(em_address);
int block_num = jit.GetBlockNumberFromAddress(em_address);
if (block_num < 0)
{
ppc_box->SetValue(wxString::FromAscii(StringFromFormat("(non-code address: %08x)", em_address).c_str()));
x86_box->SetValue(wxString::FromAscii(StringFromFormat("(no translation)").c_str()));
return;
}
Jit64::JitBlock *block = Jit64::GetBlock(block_num);
Jit64::JitBlock *block = jit.GetBlock(block_num);
// == Fill in ppc box
u32 ppc_addr = block->originalAddress;
@ -152,7 +154,8 @@ void CJitWindow::Compare(u32 em_address)
PPCAnalyst::BlockStats st;
PPCAnalyst::BlockRegStats gpa;
PPCAnalyst::BlockRegStats fpa;
if (PPCAnalyst::Flatten(ppc_addr, &size, &st, &gpa, &fpa, &code_buffer)) {
if (PPCAnalyst::Flatten(ppc_addr, &size, &st, &gpa, &fpa, &code_buffer))
{
char *sptr = (char*)xDis;
for (int i = 0; i < size; i++)
{
@ -169,7 +172,7 @@ void CJitWindow::Compare(u32 em_address)
// == Fill in x86 box
memset(xDis, 0, 65536);
const u8 *code = (const u8 *)Jit64::GetCompiledCodeFromBlock(block_num);
const u8 *code = (const u8 *)jit.GetCompiledCodeFromBlock(block_num);
u64 disasmPtr = (u64)code;
size = block->codeSize;
const u8 *end = code + size;