Add patches for F16C instructions under Rosetta 2.

This commit is contained in:
squidbus 2024-07-19 01:09:07 -07:00
parent 905d49fd96
commit a17150960f
8 changed files with 292 additions and 37 deletions

View file

@ -10,6 +10,7 @@
#include "common/thread.h"
#include "core/aerolib/aerolib.h"
#include "core/aerolib/stubs.h"
#include "core/cpu_patches.h"
#include "core/libraries/kernel/memory_management.h"
#include "core/libraries/kernel/thread_management.h"
#include "core/linker.h"
@ -86,6 +87,7 @@ void Linker::Execute() {
Common::SetCurrentThreadName("GAME_MainThread");
Libraries::Kernel::pthreadInitSelfMainThread();
InitTlsForThread(true);
InitializeThreadPatchStack();
// Start shared library modules
for (auto& m : m_modules) {
@ -104,6 +106,8 @@ void Linker::Execute() {
RunMainEntry(m->GetEntryAddress(), &p, ProgramExitFunc);
}
}
CleanupThreadPatchStack();
}
s32 Linker::LoadModule(const std::filesystem::path& elf_name, bool is_dynamic) {