[Project64] Rename x86CodeLog.cpp to RecompilerCodeLog.cpp

This commit is contained in:
zilmar 2016-06-27 17:26:35 +10:00
parent 562f791f37
commit 11be52a917
16 changed files with 142 additions and 164 deletions

View File

@ -62,12 +62,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginRSP", "Source\Android
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JniBridge", "Source\Android\Bridge\Bridge.vcxproj", "{593B00E6-1987-415D-A62C-26533FC3E95C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginAudio", "Source\Android\PluginAudio\PluginAudio.vcxproj", "{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PluginInput", "Source\Android\PluginInput\PluginInput.vcxproj", "{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JniBridge", "Source\Android\Bridge\Bridge.vcxproj", "{2607037A-ADEE-4C8D-9761-17E7823A9E61}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -132,8 +126,11 @@ Global
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|Win32.Build.0 = Release|Win32
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|x64.ActiveCfg = Release|x64
{731BD205-2826-4631-B7AF-117658E88DBC}.Release|x64.Build.0 = Release|x64
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Debug|x64.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.ActiveCfg = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|Win32.Build.0 = Release|Win32
{360A34F3-3172-4B09-8BC9-B3FBEE677863}.Release|x64.ActiveCfg = Release|Win32
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.ActiveCfg = Debug|Win32
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|Win32.Build.0 = Debug|Win32
{A4D13408-A794-4199-8FC7-4A9A32505005}.Debug|x64.ActiveCfg = Debug|x64
@ -214,30 +211,6 @@ Global
{593B00E6-1987-415D-A62C-26533FC3E95C}.Release|Win32.Build.0 = Release|Win32
{593B00E6-1987-415D-A62C-26533FC3E95C}.Release|x64.ActiveCfg = Release|x64
{593B00E6-1987-415D-A62C-26533FC3E95C}.Release|x64.Build.0 = Release|x64
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|Win32.ActiveCfg = Debug|Win32
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|Win32.Build.0 = Debug|Win32
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|x64.ActiveCfg = Debug|x64
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Debug|x64.Build.0 = Debug|x64
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|Win32.ActiveCfg = Release|Win32
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|Win32.Build.0 = Release|Win32
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|x64.ActiveCfg = Release|x64
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE}.Release|x64.Build.0 = Release|x64
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|Win32.ActiveCfg = Debug|Win32
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|Win32.Build.0 = Debug|Win32
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|x64.ActiveCfg = Debug|x64
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Debug|x64.Build.0 = Debug|x64
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|Win32.ActiveCfg = Release|Win32
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|Win32.Build.0 = Release|Win32
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|x64.ActiveCfg = Release|x64
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1}.Release|x64.Build.0 = Release|x64
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|Win32.ActiveCfg = Debug|Win32
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|Win32.Build.0 = Debug|Win32
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|x64.ActiveCfg = Debug|x64
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Debug|x64.Build.0 = Debug|x64
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|Win32.ActiveCfg = Release|Win32
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|Win32.Build.0 = Release|Win32
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|x64.ActiveCfg = Release|x64
{2607037A-ADEE-4C8D-9761-17E7823A9E61}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -251,8 +224,8 @@ Global
{462C2608-182F-452C-944F-AF201E19300B} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
{2DADDAA5-0F57-46ED-A974-747908DDC7F3} = {9FE699A5-41C3-4441-92AB-639B3D77DE26}
{B685BB34-D700-4FCC-8503-9B6AA1A0C95D} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{FEEA1071-2F0A-4436-A698-D0AF8CF79CFE} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{694F79A3-70F8-49F5-9287-8C38E1C8B6B1} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{2607037A-ADEE-4C8D-9761-17E7823A9E61} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{593B00E6-1987-415D-A62C-26533FC3E95C} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{D233025A-231F-4A43-92B6-E87193C60ACC} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
{1133A1CC-A9E5-4026-B20D-6A2987130D4E} = {0E0FCAC2-E128-4886-8EE6-1BCA84551F58}
EndGlobalSection
EndGlobal

View File

@ -14,7 +14,7 @@
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/N64RomClass.h>
#include <Project64-core/N64System/N64Class.h>
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/Mips/OpcodeName.h>
#include <Project64-core/N64System/Mips/Disk.h>
#include <Project64-core/ExceptionHandler.h>

View File

@ -11,7 +11,7 @@
#include "stdafx.h"
#include "N64Class.h"
#include <Project64-core/3rdParty/zip.h>
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Mips/Mempak.H>
#include <Project64-core/N64System/Mips/Transferpak.h>
@ -947,11 +947,8 @@ void CN64System::ExecuteCPU()
switch ((CPU_TYPE)g_Settings->LoadDword(Game_CpuType))
{
// Currently the compiler is 32-bit only. We might have to ignore that RDB setting for now.
#ifdef _WIN32
case CPU_Recompiler: ExecuteRecompiler(); break;
case CPU_SyncCores: ExecuteSyncCPU(); break;
#endif
default: ExecuteInterpret(); break;
}
WriteTrace(TraceN64System, TraceDebug, "CPU finished executing");
@ -1838,8 +1835,8 @@ bool CN64System::LoadState(const char * FileName)
WriteTrace(TraceN64System, TraceDebug, "9");
if (bLogX86Code())
{
Stop_x86_Log();
Start_x86_Log();
Start_Recompiler_Log();
Stop_Recompiler_Log();
}
WriteTrace(TraceN64System, TraceDebug, "Done");

View File

@ -11,7 +11,7 @@
#include "stdafx.h"
#include <string.h>
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
#include "x86CodeLog.h"
#include "RecompilerCodeLog.h"
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Mips/TranslateVaddr.h>
#include <Project64-core/N64System/N64Class.h>

View File

@ -13,7 +13,7 @@
#include <Project64-core/N64System/Mips/OpCode.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
#include <Project64-core/N64System/N64Class.h>
#include <Project64-core/N64System/Interpreter/InterpreterCPU.h>
@ -2217,7 +2217,7 @@ bool CCodeSection::InheritParentInfo()
bool CCodeSection::DisplaySectionInformation(uint32_t ID, uint32_t Test)
{
if (!bX86Logging)
if (!g_bRecompilerLogging)
{
return false;
}
@ -2243,9 +2243,12 @@ void CCodeSection::DisplaySectionInformation()
CPU_Message("====== Section %d ======", m_SectionID);
CPU_Message("Start PC: %X", m_EnterPC);
if (g_System->bLinkBlocks())
{
CPU_Message("End PC: %X", m_EndPC);
}
CPU_Message("CompiledLocation: %X", m_CompiledLocation);
if (!m_ParentSection.empty())
if (g_System->bLinkBlocks() && !m_ParentSection.empty())
{
stdstr ParentList;
for (SECTION_LIST::iterator iter = m_ParentSection.begin(); iter != m_ParentSection.end(); iter++)
@ -2260,6 +2263,8 @@ void CCodeSection::DisplaySectionInformation()
CPU_Message("Number of parents: %d (%s)", m_ParentSection.size(), ParentList.c_str());
}
if (g_System->bLinkBlocks())
{
CPU_Message("Jump Address: 0x%08X", m_Jump.JumpPC);
CPU_Message("Jump Target Address: 0x%08X", m_Jump.TargetPC);
if (m_JumpSection != NULL)
@ -2280,5 +2285,6 @@ void CCodeSection::DisplaySectionInformation()
CPU_Message("Continue Section: None");
}
CPU_Message("In Loop: %s", m_InLoop ? "Yes" : "No");
}
CPU_Message("=======================");
}

View File

@ -14,7 +14,7 @@
#include <Project64-core/N64System/N64Types.h>
#include <Project64-core/N64System/Recompiler/CodeBlock.h>
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
#include <Project64-core/N64System/Mips/OpcodeName.h>

View File

@ -11,7 +11,7 @@
#include "stdafx.h"
#include <Project64-core/N64System/Recompiler/RecompilerClass.h>
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Recompiler/x86CodeLog.h>
#include <Project64-core/N64System/Recompiler/RecompilerCodeLog.h>
#include <Project64-core/N64System/N64Class.h>
#include <Project64-core/N64System/Interpreter/InterpreterCPU.h>
#include <Project64-core/ExceptionHandler.h>
@ -35,9 +35,11 @@ CRecompiler::~CRecompiler()
void CRecompiler::Run()
{
WriteTrace(TraceRecompiler, TraceDebug, "Start");
if (bLogX86Code())
{
Start_x86_Log();
Start_Recompiler_Log();
}
if (!CRecompMemory::AllocateMemory())
@ -102,6 +104,8 @@ void CRecompiler::Run()
{
g_Notify->DisplayError(MSG_UNKNOWN_MEM_ACTION);
}
WriteTrace(TraceRecompiler, TraceDebug, "Done");
}
void CRecompiler::RecompilerMain_VirtualTable()
@ -633,6 +637,7 @@ void CRecompiler::RecompilerMain_Lookup_validate()
void CRecompiler::RecompilerMain_Lookup_validate_TLB()
{
WriteTrace(TraceRecompiler, TraceDebug, "Start");
uint32_t PhysicalAddr;
while (!m_EndEmulation)
@ -705,6 +710,7 @@ void CRecompiler::RecompilerMain_Lookup_validate_TLB()
}
}
}
WriteTrace(TraceRecompiler, TraceDebug, "Done");
}
void CRecompiler::Reset()
@ -948,8 +954,8 @@ CCompiledFunc * CRecompiler::CompilerCode()
{
Func->SetNext(ret.first->second->Next());
ret.first->second->SetNext(Func);
return Func;
}
WriteTrace(TraceRecompiler, TraceVerbose, "Done");
return Func;
}

View File

@ -9,14 +9,14 @@
* *
****************************************************************************/
#include "stdafx.h"
#include "x86CodeLog.h"
#include "RecompilerCodeLog.h"
#include <Common/path.h>
#include <Common/Platform.h>
static CLog * g_CPULogFile = NULL;
bool bX86Logging = false;
bool g_bRecompilerLogging = false;
void x86_Log_Message(const char * strFormat, ...)
void Recompiler_Log_Message(const char * strFormat, ...)
{
va_list args;
va_start(args, strFormat);
@ -32,12 +32,12 @@ void x86_Log_Message(const char * strFormat, ...)
va_end(args);
}
void Start_x86_Log (void)
void Start_Recompiler_Log (void)
{
CPath LogFileName(g_Settings->LoadStringVal(Directory_Log).c_str(), "CPUoutput.log");
if (g_CPULogFile != NULL)
{
Stop_x86_Log();
Stop_Recompiler_Log();
}
g_CPULogFile = new CLog();
if (g_CPULogFile)
@ -45,7 +45,7 @@ void Start_x86_Log (void)
if (g_CPULogFile->Open(LogFileName))
{
g_CPULogFile->SetMaxFileSize(300 * CLog::MB);
bX86Logging = true;
g_bRecompilerLogging = true;
}
else
{
@ -55,9 +55,9 @@ void Start_x86_Log (void)
}
}
void Stop_x86_Log (void)
void Stop_Recompiler_Log (void)
{
bX86Logging = false;
g_bRecompilerLogging = false;
if (g_CPULogFile != NULL)
{
delete g_CPULogFile;

View File

@ -14,10 +14,10 @@
#include <stdio.h>
#include <stdarg.h>
#define CPU_Message(Message,... ) if (bX86Logging) { x86_Log_Message(Message,## __VA_ARGS__); }
#define CPU_Message(Message,... ) if (g_bRecompilerLogging) { Recompiler_Log_Message(Message,## __VA_ARGS__); }
void x86_Log_Message (const char * Message, ...);
void Start_x86_Log (void);
void Stop_x86_Log (void);
void Recompiler_Log_Message (const char * Message, ...);
void Start_Recompiler_Log (void);
void Stop_Recompiler_Log (void);
extern bool bX86Logging;
extern bool g_bRecompilerLogging;

View File

@ -19,7 +19,7 @@
#include <Project64-core/N64System/Recompiler/RecompilerOps.h>
#include <Project64-core/N64System/N64Class.h>
#include <stdio.h>
#include "x86CodeLog.h"
#include "RecompilerCodeLog.h"
CCodeSection * CRecompilerOps::m_Section = NULL;
CRegInfo CRecompilerOps::m_RegWorkingSet;

View File

@ -17,7 +17,7 @@
#include <stdio.h>
#include <string.h>
#include <float.h>
#include "x86CodeLog.h"
#include "RecompilerCodeLog.h"
uint32_t CRegInfo::m_fpuControl = 0;

View File

@ -12,7 +12,7 @@
#include <Project64-core/N64System/SystemGlobals.h>
#include <Project64-core/N64System/Mips/MemoryVirtualMem.h>
#include <Project64-core/N64System/Recompiler/X86ops.h>
#include "x86CodeLog.h"
#include "RecompilerCodeLog.h"
#define PUTDST8(dest,value) (*((uint8_t *)(dest))=(uint8_t)(value)); dest += 1;
#define PUTDST16(dest,value) (*((uint16_t *)(dest))=(uint16_t)(value)); dest += 2;

View File

@ -460,6 +460,10 @@
RelativePath=".\N64System\Recompiler\RecompilerClass.cpp"
>
</File>
<File
RelativePath=".\N64System\Recompiler\RecompilerCodeLog.cpp"
>
</File>
<File
RelativePath=".\N64System\Recompiler\RecompilerMemory.cpp"
>
@ -476,10 +480,6 @@
RelativePath=".\N64System\Recompiler\SectionInfo.cpp"
>
</File>
<File
RelativePath=".\N64System\Recompiler\x86CodeLog.cpp"
>
</File>
<File
RelativePath=".\N64System\Recompiler\X86ops.cpp"
>

View File

@ -72,11 +72,11 @@
<ClCompile Include="N64System\Recompiler\FunctionMapClass.cpp" />
<ClCompile Include="N64System\Recompiler\LoopAnalysis.cpp" />
<ClCompile Include="N64System\Recompiler\RecompilerClass.cpp" />
<ClCompile Include="N64System\Recompiler\RecompilerCodeLog.cpp" />
<ClCompile Include="N64System\Recompiler\RecompilerMemory.cpp" />
<ClCompile Include="N64System\Recompiler\RecompilerOps.cpp" />
<ClCompile Include="N64System\Recompiler\RegInfo.cpp" />
<ClCompile Include="N64System\Recompiler\SectionInfo.cpp" />
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp" />
<ClCompile Include="N64System\Recompiler\X86ops.cpp" />
<ClCompile Include="N64System\SpeedLimiterClass.cpp" />
<ClCompile Include="N64System\SystemGlobals.cpp" />
@ -166,11 +166,11 @@
<ClInclude Include="N64System\Recompiler\JumpInfo.h" />
<ClInclude Include="N64System\Recompiler\LoopAnalysis.h" />
<ClInclude Include="N64System\Recompiler\RecompilerClass.h" />
<ClInclude Include="N64System\Recompiler\RecompilerCodeLog.h" />
<ClInclude Include="N64System\Recompiler\RecompilerMemory.h" />
<ClInclude Include="N64System\Recompiler\RecompilerOps.h" />
<ClInclude Include="N64System\Recompiler\RegInfo.h" />
<ClInclude Include="N64System\Recompiler\SectionInfo.h" />
<ClInclude Include="N64System\Recompiler\X86CodeLog.h" />
<ClInclude Include="N64System\Recompiler\X86ops.h" />
<ClInclude Include="N64System\SpeedLimiterClass.h" />
<ClInclude Include="N64System\SystemGlobals.h" />

View File

@ -150,9 +150,6 @@
<ClCompile Include="3rdParty\7zip.cpp">
<Filter>Source Files\3rd Party</Filter>
</ClCompile>
<ClCompile Include="N64System\Recompiler\x86CodeLog.cpp">
<Filter>Source Files\N64 System\Recompiler</Filter>
</ClCompile>
<ClCompile Include="N64System\Recompiler\X86ops.cpp">
<Filter>Source Files\N64 System\Recompiler</Filter>
</ClCompile>
@ -318,6 +315,9 @@
<ClCompile Include="RomList\RomList.cpp">
<Filter>Source Files\Rom List</Filter>
</ClCompile>
<ClCompile Include="N64System\Recompiler\RecompilerCodeLog.cpp">
<Filter>Source Files\N64 System\Recompiler</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
@ -518,9 +518,6 @@
<ClInclude Include="N64System\Recompiler\SectionInfo.h">
<Filter>Header Files\N64 System\Recompiler</Filter>
</ClInclude>
<ClInclude Include="N64System\Recompiler\X86CodeLog.h">
<Filter>Header Files\N64 System\Recompiler</Filter>
</ClInclude>
<ClInclude Include="N64System\Recompiler\X86ops.h">
<Filter>Header Files\N64 System\Recompiler</Filter>
</ClInclude>
@ -611,5 +608,8 @@
<ClInclude Include="N64System\Arm\ArmOpCode.h">
<Filter>Source Files\N64 System\Arm</Filter>
</ClInclude>
<ClInclude Include="N64System\Recompiler\RecompilerCodeLog.h">
<Filter>Header Files\N64 System\Recompiler</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -128,14 +128,10 @@ void CSettings::AddHowToHandleSetting(const char * BaseDirectory)
AddHandler(Rdb_GoodName, new CSettingTypeRomDatabase("Good Name", Game_GameName));
AddHandler(Rdb_SaveChip, new CSettingTypeRDBSaveChip("Save Type", SaveChip_Auto));
#ifdef _WIN32
#ifdef _DEBUG
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_SyncCores));
#else
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_Recompiler));
#endif
#else
AddHandler(Rdb_CpuType, new CSettingTypeRDBCpuType("CPU Type", CPU_Interpreter));
#endif
AddHandler(Rdb_RDRamSize, new CSettingTypeRDBRDRamSize("RDRAM Size", 0x400000));
AddHandler(Rdb_CounterFactor, new CSettingTypeRomDatabase("Counter Factor", 2));