Make AMD CPU patch optional

This commit is contained in:
nmzik
2026-09-16 09:42:37 +04:00
parent 32e6a433e8
commit 77680ce9d2
8 changed files with 40 additions and 16 deletions
+9 -7
View File
@@ -2089,13 +2089,15 @@ void RuntimeLinker::LoadProgramToMemory(Program* program) {
mode == Common::VirtualMemory::Mode::NoAccess);
if (Common::VirtualMemory::IsExecute(mode)) {
const auto reciprocal_sqrt_count =
X64InstructionEmulator::PatchReciprocalSquareRoots(segment_addr,
segment_file_size);
if (reciprocal_sqrt_count != 0) {
LOGF("Guest VRSQRTPS emulation: %s, instructions=%" PRIu64 "\n",
Common::PathToString(program->file_name.filename()).c_str(),
reciprocal_sqrt_count);
if (Config::AmdCpuEnabled()) {
const auto reciprocal_sqrt_count =
X64InstructionEmulator::PatchReciprocalSquareRoots(segment_addr,
segment_file_size);
if (reciprocal_sqrt_count != 0) {
LOGF("Guest VRSQRTPS emulation: %s, instructions=%" PRIu64 "\n",
Common::PathToString(program->file_name.filename()).c_str(),
reciprocal_sqrt_count);
}
}
PatchProgram(program, segment_addr, segment_memory_size);
#if KYTY_PLATFORM == KYTY_PLATFORM_WINDOWS