Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AArch64] Support JitRegister better. #2808

Merged
merged 2 commits into from
Aug 7, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions Source/Core/Core/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 9 additions & 0 deletions Source/Core/Core/PowerPC/JitArm64/JitAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -94,6 +95,8 @@ void JitArm64AsmRoutineManager::Generate()
ABI_PopRegisters(regs_to_save);
RET(X30);

JitRegister::Register(enterCode, GetCodePtr(), "JIT_Dispatcher");

GenerateCommon();

FlushIcache();
Expand All @@ -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();
Expand Down Expand Up @@ -242,6 +246,8 @@ void JitArm64AsmRoutineManager::GenerateCommon()
RET(X30);
}

JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedLoad");

pairedLoadQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
ReserveCodeSpace(16 * sizeof(u8*));

Expand All @@ -264,6 +270,7 @@ void JitArm64AsmRoutineManager::GenerateCommon()
pairedLoadQuantized[15] = loadPairedS16One;

// Stores
start = GetCodePtr();
const u8* storePairedIllegal = GetCodePtr();
BRK(0x101);
const u8* storePairedFloat;
Expand Down Expand Up @@ -519,6 +526,8 @@ void JitArm64AsmRoutineManager::GenerateCommon()
BR(X2);
}

JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedStore");

pairedStoreQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
ReserveCodeSpace(32 * sizeof(u8*));

Expand Down
14 changes: 0 additions & 14 deletions Source/Core/DolphinWX/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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[] =
Expand Down Expand Up @@ -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
}
Expand All @@ -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
Expand All @@ -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);
Expand Down