Merge pull request #2808 from Sonicadvance1/aarch64_jitregister
[AArch64] Support JitRegister better.
This commit is contained in:
commit
1699c733b7
|
@ -264,6 +264,7 @@ void SConfig::SaveCoreSettings(IniFile& ini)
|
||||||
core->Set("GPUDeterminismMode", m_strGPUDeterminismMode);
|
core->Set("GPUDeterminismMode", m_strGPUDeterminismMode);
|
||||||
core->Set("GameCubeAdapter", m_GameCubeAdapter);
|
core->Set("GameCubeAdapter", m_GameCubeAdapter);
|
||||||
core->Set("AdapterRumble", m_AdapterRumble);
|
core->Set("AdapterRumble", m_AdapterRumble);
|
||||||
|
core->Set("PerfMapDir", m_perfDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::SaveMovieSettings(IniFile& ini)
|
void SConfig::SaveMovieSettings(IniFile& ini)
|
||||||
|
@ -522,6 +523,7 @@ void SConfig::LoadCoreSettings(IniFile& ini)
|
||||||
core->Get("GPUDeterminismMode", &m_strGPUDeterminismMode, "auto");
|
core->Get("GPUDeterminismMode", &m_strGPUDeterminismMode, "auto");
|
||||||
core->Get("GameCubeAdapter", &m_GameCubeAdapter, true);
|
core->Get("GameCubeAdapter", &m_GameCubeAdapter, true);
|
||||||
core->Get("AdapterRumble", &m_AdapterRumble, true);
|
core->Get("AdapterRumble", &m_AdapterRumble, true);
|
||||||
|
core->Get("PerfMapDir", &m_perfDir, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void SConfig::LoadMovieSettings(IniFile& ini)
|
void SConfig::LoadMovieSettings(IniFile& ini)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
// Refer to the license.txt file included.
|
// Refer to the license.txt file included.
|
||||||
|
|
||||||
#include "Common/Arm64Emitter.h"
|
#include "Common/Arm64Emitter.h"
|
||||||
|
#include "Common/JitRegister.h"
|
||||||
|
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
#include "Core/PowerPC/JitArm64/Jit.h"
|
#include "Core/PowerPC/JitArm64/Jit.h"
|
||||||
|
@ -94,6 +95,8 @@ void JitArm64AsmRoutineManager::Generate()
|
||||||
ABI_PopRegisters(regs_to_save);
|
ABI_PopRegisters(regs_to_save);
|
||||||
RET(X30);
|
RET(X30);
|
||||||
|
|
||||||
|
JitRegister::Register(enterCode, GetCodePtr(), "JIT_Dispatcher");
|
||||||
|
|
||||||
GenerateCommon();
|
GenerateCommon();
|
||||||
|
|
||||||
FlushIcache();
|
FlushIcache();
|
||||||
|
@ -112,6 +115,7 @@ void JitArm64AsmRoutineManager::GenerateCommon()
|
||||||
ARM64Reg scale_reg = X0;
|
ARM64Reg scale_reg = X0;
|
||||||
ARM64FloatEmitter float_emit(this);
|
ARM64FloatEmitter float_emit(this);
|
||||||
|
|
||||||
|
const u8* start = GetCodePtr();
|
||||||
const u8* loadPairedIllegal = GetCodePtr();
|
const u8* loadPairedIllegal = GetCodePtr();
|
||||||
BRK(100);
|
BRK(100);
|
||||||
const u8* loadPairedFloatTwo = GetCodePtr();
|
const u8* loadPairedFloatTwo = GetCodePtr();
|
||||||
|
@ -242,6 +246,8 @@ void JitArm64AsmRoutineManager::GenerateCommon()
|
||||||
RET(X30);
|
RET(X30);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedLoad");
|
||||||
|
|
||||||
pairedLoadQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
|
pairedLoadQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
|
||||||
ReserveCodeSpace(16 * sizeof(u8*));
|
ReserveCodeSpace(16 * sizeof(u8*));
|
||||||
|
|
||||||
|
@ -264,6 +270,7 @@ void JitArm64AsmRoutineManager::GenerateCommon()
|
||||||
pairedLoadQuantized[15] = loadPairedS16One;
|
pairedLoadQuantized[15] = loadPairedS16One;
|
||||||
|
|
||||||
// Stores
|
// Stores
|
||||||
|
start = GetCodePtr();
|
||||||
const u8* storePairedIllegal = GetCodePtr();
|
const u8* storePairedIllegal = GetCodePtr();
|
||||||
BRK(0x101);
|
BRK(0x101);
|
||||||
const u8* storePairedFloat;
|
const u8* storePairedFloat;
|
||||||
|
@ -519,6 +526,8 @@ void JitArm64AsmRoutineManager::GenerateCommon()
|
||||||
BR(X2);
|
BR(X2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
JitRegister::Register(start, GetCodePtr(), "JIT_QuantizedStore");
|
||||||
|
|
||||||
pairedStoreQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
|
pairedStoreQuantized = reinterpret_cast<const u8**>(const_cast<u8*>(AlignCode16()));
|
||||||
ReserveCodeSpace(32 * sizeof(u8*));
|
ReserveCodeSpace(32 * sizeof(u8*));
|
||||||
|
|
||||||
|
|
|
@ -104,12 +104,10 @@ bool DolphinApp::OnInit()
|
||||||
bool UseLogger = false;
|
bool UseLogger = false;
|
||||||
bool selectVideoBackend = false;
|
bool selectVideoBackend = false;
|
||||||
bool selectAudioEmulation = false;
|
bool selectAudioEmulation = false;
|
||||||
bool selectPerfDir = false;
|
|
||||||
|
|
||||||
wxString videoBackendName;
|
wxString videoBackendName;
|
||||||
wxString audioEmulationName;
|
wxString audioEmulationName;
|
||||||
wxString userPath;
|
wxString userPath;
|
||||||
wxString perfDir;
|
|
||||||
|
|
||||||
#if wxUSE_CMDLINE_PARSER // Parse command lines
|
#if wxUSE_CMDLINE_PARSER // Parse command lines
|
||||||
wxCmdLineEntryDesc cmdLineDesc[] =
|
wxCmdLineEntryDesc cmdLineDesc[] =
|
||||||
|
@ -159,11 +157,6 @@ bool DolphinApp::OnInit()
|
||||||
"User folder path",
|
"User folder path",
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
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
|
wxCMD_LINE_NONE, nullptr, nullptr, nullptr, wxCMD_LINE_VAL_NONE, 0
|
||||||
}
|
}
|
||||||
|
@ -189,7 +182,6 @@ bool DolphinApp::OnInit()
|
||||||
BatchMode = parser.Found("batch");
|
BatchMode = parser.Found("batch");
|
||||||
selectVideoBackend = parser.Found("video_backend", &videoBackendName);
|
selectVideoBackend = parser.Found("video_backend", &videoBackendName);
|
||||||
selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName);
|
selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName);
|
||||||
selectPerfDir = parser.Found("perf_dir", &perfDir);
|
|
||||||
playMovie = parser.Found("movie", &movieFile);
|
playMovie = parser.Found("movie", &movieFile);
|
||||||
parser.Found("user", &userPath);
|
parser.Found("user", &userPath);
|
||||||
#endif // wxUSE_CMDLINE_PARSER
|
#endif // wxUSE_CMDLINE_PARSER
|
||||||
|
@ -207,12 +199,6 @@ bool DolphinApp::OnInit()
|
||||||
InitLanguageSupport(); // The language setting is loaded from the user directory
|
InitLanguageSupport(); // The language setting is loaded from the user directory
|
||||||
UICommon::Init();
|
UICommon::Init();
|
||||||
|
|
||||||
if (selectPerfDir)
|
|
||||||
{
|
|
||||||
SConfig::GetInstance().m_perfDir =
|
|
||||||
WxStrToStr(perfDir);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (selectVideoBackend && videoBackendName != wxEmptyString)
|
if (selectVideoBackend && videoBackendName != wxEmptyString)
|
||||||
SConfig::GetInstance().m_strVideoBackend =
|
SConfig::GetInstance().m_strVideoBackend =
|
||||||
WxStrToStr(videoBackendName);
|
WxStrToStr(videoBackendName);
|
||||||
|
|
Loading…
Reference in New Issue