Make AMD CPU patch optional

This commit is contained in:
nmzik committed 2026-09-16 09:48:50 +04:00
1 parent 32e6a433e8
commit 77680ce9d2
8 files changed
+40 -16

No files matched your search

+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