From c5a7243eb20fa4cfcb6ed315561edaa42bfecef5 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 7 Aug 2015 01:58:40 -0500 Subject: [PATCH 1/2] [AArch64] Add support for JitRegister to the dispatcher and paired loadstores --- Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp index c53225ef57..e6abefbd98 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp @@ -3,6 +3,7 @@ // Refer to the license.txt file included. #include "Common/Arm64Emitter.h" +#include "Common/JitRegister.h" #include "Core/PowerPC/PowerPC.h" #include "Core/PowerPC/JitArm64/Jit.h" @@ -94,6 +95,8 @@ void JitArm64AsmRoutineManager::Generate() ABI_PopRegisters(regs_to_save); RET(X30); + JitRegister::Register(enterCode, GetCodePtr(), "JIT_Dispatcher"); + GenerateCommon(); FlushIcache(); @@ -112,6 +115,7 @@ void JitArm64AsmRoutineManager::GenerateCommon() ARM64Reg scale_reg = X0; ARM64FloatEmitter float_emit(this); + const u8* start = GetCodePtr(); const u8* loadPairedIllegal = GetCodePtr(); BRK(100); const u8* loadPairedFloatTwo = GetCodePtr(); @@ -242,6 +246,8 @@ void JitArm64AsmRoutineManager::GenerateCommon() RET(X30); } + JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedLoad"); + pairedLoadQuantized = reinterpret_cast(const_cast(AlignCode16())); ReserveCodeSpace(16 * sizeof(u8*)); @@ -264,6 +270,7 @@ void JitArm64AsmRoutineManager::GenerateCommon() pairedLoadQuantized[15] = loadPairedS16One; // Stores + start = GetCodePtr(); const u8* storePairedIllegal = GetCodePtr(); BRK(0x101); const u8* storePairedFloat; @@ -519,6 +526,8 @@ void JitArm64AsmRoutineManager::GenerateCommon() BR(X2); } + JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedStore"); + pairedStoreQuantized = reinterpret_cast(const_cast(AlignCode16())); ReserveCodeSpace(32 * sizeof(u8*)); From d9037d6c4aef63471b9461c4dfd78300c4ffcd3a Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 7 Aug 2015 01:59:29 -0500 Subject: [PATCH 2/2] Remove perf_dir Dolphin WX option. Move the option for the directory to the Dolphin.ini This way more than DolphinWX can take advantage of it. --- Source/Core/Core/ConfigManager.cpp | 2 ++ Source/Core/DolphinWX/Main.cpp | 14 -------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index bace9b7971..3f1ba69e06 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -264,6 +264,7 @@ void SConfig::SaveCoreSettings(IniFile& ini) core->Set("GPUDeterminismMode", m_strGPUDeterminismMode); core->Set("GameCubeAdapter", m_GameCubeAdapter); core->Set("AdapterRumble", m_AdapterRumble); + core->Set("PerfMapDir", m_perfDir); } void SConfig::SaveMovieSettings(IniFile& ini) @@ -522,6 +523,7 @@ void SConfig::LoadCoreSettings(IniFile& ini) core->Get("GPUDeterminismMode", &m_strGPUDeterminismMode, "auto"); core->Get("GameCubeAdapter", &m_GameCubeAdapter, true); core->Get("AdapterRumble", &m_AdapterRumble, true); + core->Get("PerfMapDir", &m_perfDir, ""); } void SConfig::LoadMovieSettings(IniFile& ini) diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index 43a79ac6f7..150fef7f37 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -104,12 +104,10 @@ bool DolphinApp::OnInit() bool UseLogger = false; bool selectVideoBackend = false; bool selectAudioEmulation = false; - bool selectPerfDir = false; wxString videoBackendName; wxString audioEmulationName; wxString userPath; - wxString perfDir; #if wxUSE_CMDLINE_PARSER // Parse command lines wxCmdLineEntryDesc cmdLineDesc[] = @@ -159,11 +157,6 @@ bool DolphinApp::OnInit() "User folder path", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { - wxCMD_LINE_OPTION, "P", "perf_dir", - "Directory for Linux perf perf-$pid.map file", - wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL - }, { wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0 } @@ -189,7 +182,6 @@ bool DolphinApp::OnInit() BatchMode = parser.Found("batch"); selectVideoBackend = parser.Found("video_backend", &videoBackendName); selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName); - selectPerfDir = parser.Found("perf_dir", &perfDir); playMovie = parser.Found("movie", &movieFile); parser.Found("user", &userPath); #endif // wxUSE_CMDLINE_PARSER @@ -207,12 +199,6 @@ bool DolphinApp::OnInit() InitLanguageSupport(); // The language setting is loaded from the user directory UICommon::Init(); - if (selectPerfDir) - { - SConfig::GetInstance().m_perfDir = - WxStrToStr(perfDir); - } - if (selectVideoBackend && videoBackendName != wxEmptyString) SConfig::GetInstance().m_strVideoBackend = WxStrToStr(videoBackendName);