mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-25 23:25:41 +00:00
RegTest: Fix build on Mac
This commit is contained in:
parent
e6d29a0028
commit
20de40a597
|
@ -41,7 +41,7 @@ def run_regression_tests(runner, gamedir, destdir, dump_interval, frames, parall
|
||||||
|
|
||||||
if parallel <= 1:
|
if parallel <= 1:
|
||||||
for game in gamepaths:
|
for game in gamepaths:
|
||||||
run_regression_test(runner, destdir, dump_interval, frames, game)
|
run_regression_test(runner, destdir, dump_interval, frames, renderer, game)
|
||||||
else:
|
else:
|
||||||
print("Processing %u games on %u processors" % (len(gamepaths), parallel))
|
print("Processing %u games on %u processors" % (len(gamepaths), parallel))
|
||||||
func = partial(run_regression_test, runner, destdir, dump_interval, frames, renderer)
|
func = partial(run_regression_test, runner, destdir, dump_interval, frames, renderer)
|
||||||
|
|
|
@ -991,6 +991,7 @@ bool CPU::NewRec::Compiler::TryRenameMIPSReg(Reg to, Reg from, u32 fromhost, Reg
|
||||||
|
|
||||||
// remove all references to renamed-to register
|
// remove all references to renamed-to register
|
||||||
DeleteMIPSReg(to, false);
|
DeleteMIPSReg(to, false);
|
||||||
|
CancelLoadDelaysToReg(to);
|
||||||
|
|
||||||
// and do the actual rename, new register has been modified.
|
// and do the actual rename, new register has been modified.
|
||||||
m_host_regs[fromhost].reg = to;
|
m_host_regs[fromhost].reg = to;
|
||||||
|
|
|
@ -972,6 +972,10 @@ void CodeGenerator::GenerateExceptionExit(Instruction instruction, const CodeCac
|
||||||
|
|
||||||
void CodeGenerator::BlockPrologue()
|
void CodeGenerator::BlockPrologue()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
EmitFunctionCall(nullptr, &CodeCache::LogCurrentState);
|
||||||
|
#endif
|
||||||
|
|
||||||
InitSpeculativeRegs();
|
InitSpeculativeRegs();
|
||||||
|
|
||||||
if (m_block->protection == CodeCache::PageProtectionMode::ManualCheck)
|
if (m_block->protection == CodeCache::PageProtectionMode::ManualCheck)
|
||||||
|
@ -992,10 +996,6 @@ void CodeGenerator::BlockPrologue()
|
||||||
EmitFunctionCall(nullptr, &CPU::HandleB0Syscall);
|
EmitFunctionCall(nullptr, &CPU::HandleB0Syscall);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
EmitFunctionCall(nullptr, &CodeCache::LogCurrentState);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (m_block->uncached_fetch_ticks > 0 || m_block->icache_line_count > 0)
|
if (m_block->uncached_fetch_ticks > 0 || m_block->icache_line_count > 0)
|
||||||
EmitICacheCheckAndUpdate();
|
EmitICacheCheckAndUpdate();
|
||||||
|
|
||||||
|
@ -2745,6 +2745,7 @@ bool CodeGenerator::Compile_cop0(Instruction instruction, const CodeCache::Instr
|
||||||
EmitBranch(GetCurrentFarCodePointer());
|
EmitBranch(GetCurrentFarCodePointer());
|
||||||
SwitchToFarCode();
|
SwitchToFarCode();
|
||||||
m_register_cache.PushState();
|
m_register_cache.PushState();
|
||||||
|
if (!info.is_last_instruction)
|
||||||
WriteNewPC(CalculatePC(), false);
|
WriteNewPC(CalculatePC(), false);
|
||||||
EmitStoreCPUStructField(offsetof(State, downcount), Value::FromConstantU32(0));
|
EmitStoreCPUStructField(offsetof(State, downcount), Value::FromConstantU32(0));
|
||||||
EmitExceptionExit();
|
EmitExceptionExit();
|
||||||
|
|
|
@ -134,7 +134,7 @@ ALWAYS_INLINE_RELEASE void MaskValidate(PGXP_value* pV, u32 psxV, u32 mask, u32
|
||||||
|
|
||||||
ALWAYS_INLINE_RELEASE double f16Sign(double in)
|
ALWAYS_INLINE_RELEASE double f16Sign(double in)
|
||||||
{
|
{
|
||||||
const s32 s = static_cast<s32>(static_cast<u64>(in * (USHRT_MAX + 1)));
|
const s32 s = static_cast<s32>(static_cast<s64>(in * (USHRT_MAX + 1)));
|
||||||
return static_cast<double>(s) / static_cast<double>(USHRT_MAX + 1);
|
return static_cast<double>(s) / static_cast<double>(USHRT_MAX + 1);
|
||||||
}
|
}
|
||||||
ALWAYS_INLINE_RELEASE double f16Unsign(double in)
|
ALWAYS_INLINE_RELEASE double f16Unsign(double in)
|
||||||
|
|
|
@ -7,6 +7,8 @@ add_executable(duckstation-nogui
|
||||||
target_precompile_headers(duckstation-nogui PRIVATE "pch.h")
|
target_precompile_headers(duckstation-nogui PRIVATE "pch.h")
|
||||||
target_link_libraries(duckstation-nogui PRIVATE core util common imgui scmversion)
|
target_link_libraries(duckstation-nogui PRIVATE core util common imgui scmversion)
|
||||||
|
|
||||||
|
add_core_resources(duckstation-nogui)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
message(STATUS "Building Win32 NoGUI Platform.")
|
message(STATUS "Building Win32 NoGUI Platform.")
|
||||||
target_sources(duckstation-nogui PRIVATE
|
target_sources(duckstation-nogui PRIVATE
|
||||||
|
|
|
@ -3,3 +3,5 @@ add_executable(duckstation-regtest
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(duckstation-regtest PRIVATE core common scmversion)
|
target_link_libraries(duckstation-regtest PRIVATE core common scmversion)
|
||||||
|
|
||||||
|
add_core_resources(duckstation-regtest)
|
|
@ -53,13 +53,15 @@ bool RegTestHost::SetFolders()
|
||||||
EmuFolders::AppRoot = Path::Canonicalize(Path::GetDirectory(program_path));
|
EmuFolders::AppRoot = Path::Canonicalize(Path::GetDirectory(program_path));
|
||||||
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
EmuFolders::DataRoot = EmuFolders::AppRoot;
|
||||||
|
|
||||||
#ifndef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
static constexpr char MAC_DATA_DIR[] = "Library/Application Support/DuckStation";
|
||||||
|
const char* home_dir = getenv("HOME");
|
||||||
|
if (home_dir)
|
||||||
|
EmuFolders::DataRoot = Path::Combine(home_dir, MAC_DATA_DIR);
|
||||||
|
#endif
|
||||||
|
|
||||||
// On Windows/Linux, these are in the binary directory.
|
// On Windows/Linux, these are in the binary directory.
|
||||||
EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
|
EmuFolders::Resources = Path::Combine(EmuFolders::AppRoot, "resources");
|
||||||
#else
|
|
||||||
// On macOS, this is in the bundle resources directory.
|
|
||||||
EmuFolders::Resources = Path::Canonicalize(Path::Combine(EmuFolders::AppRoot, "../Resources"));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Log_DevPrintf("AppRoot Directory: %s", EmuFolders::AppRoot.c_str());
|
Log_DevPrintf("AppRoot Directory: %s", EmuFolders::AppRoot.c_str());
|
||||||
Log_DevPrintf("DataRoot Directory: %s", EmuFolders::DataRoot.c_str());
|
Log_DevPrintf("DataRoot Directory: %s", EmuFolders::DataRoot.c_str());
|
||||||
|
@ -71,7 +73,7 @@ bool RegTestHost::SetFolders()
|
||||||
// the resources directory should exist, bail out if not
|
// the resources directory should exist, bail out if not
|
||||||
if (!FileSystem::DirectoryExists(EmuFolders::Resources.c_str()))
|
if (!FileSystem::DirectoryExists(EmuFolders::Resources.c_str()))
|
||||||
{
|
{
|
||||||
Log_ErrorPrintf("Error", "Resources directory is missing, your installation is incomplete.");
|
Log_ErrorPrint("Resources directory is missing, your installation is incomplete.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue