1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

SPU/PPU LLVM: fix triple setup (regression fix) (#12228)

This commit is contained in:
Ivan 2022-06-14 18:13:43 +03:00 committed by GitHub
parent 5378fee1c3
commit c2190f71ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -871,7 +871,6 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
std::string result;
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
null_mod->setTargetTriple(utils::c_llvm_default_triple);
if (_link.empty())
{
@ -884,7 +883,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
else
{
mem = std::make_unique<MemoryManager2>();
null_mod->setTargetTriple(utils::c_llvm_default_triple);
null_mod->setTargetTriple(llvm::Triple::normalize(utils::c_llvm_default_triple));
}
// Auxiliary JIT (does not use custom memory manager, only writes the objects)

View File

@ -3480,7 +3480,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module& module_part, co
// Initialize target
#if defined(__APPLE__) && defined(ARCH_ARM64)
// Force target linux on macOS arm64 to bypass some 64-bit address space linking issues
_module->setTargetTriple(utils::c_llvm_default_triple);
_module->setTargetTriple(Triple::normalize(utils::c_llvm_default_triple));
#else
_module->setTargetTriple(Triple::normalize(sys::getProcessTriple()));
#endif

View File

@ -4428,7 +4428,7 @@ public:
// Create LLVM module
std::unique_ptr<Module> _module = std::make_unique<Module>(m_hash + ".obj", m_context);
_module->setTargetTriple(utils::c_llvm_default_triple);
_module->setTargetTriple(Triple::normalize(utils::c_llvm_default_triple));
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
m_module = _module.get();
@ -5090,7 +5090,7 @@ public:
// Create LLVM module
std::unique_ptr<Module> _module = std::make_unique<Module>("spu_interpreter.obj", m_context);
_module->setTargetTriple(utils::c_llvm_default_triple);
_module->setTargetTriple(Triple::normalize(utils::c_llvm_default_triple));
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
m_module = _module.get();