From a8c8e751fc45c588c36afb0163838bcdc32dfd34 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 24 Oct 2024 12:11:15 +1030 Subject: [PATCH] Core: log the block code to the asm log file --- Source/Project64-core/N64System/Recompiler/CodeBlock.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp index 615d63afb..f800a1796 100644 --- a/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp +++ b/Source/Project64-core/N64System/Recompiler/CodeBlock.cpp @@ -904,6 +904,13 @@ uint32_t CCodeBlock::Finilize(CRecompMemory & RecompMem) Log("Native entry point: %X", m_CompiledLocation); Log("Start of block: %X", VAddrEnter()); Log("Number of sections: %d", NoOfSections()); + Log("====== Asm Code ======"); + for (uint32_t Addr = m_VAddrEnter; Addr < m_VAddrLast; Addr += 4) + { + R4300iOpcode Opcode; + g_MMU->MemoryValue32(Addr, Opcode.Value); + Log("%08X: %s", Addr, R4300iInstruction(Addr, Opcode.Value).NameAndParam().c_str()); + } Log("====== Recompiled code ======"); m_CodeLog += CodeLog; }