mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-01-14 18:37:27 +00:00
SPU/PPU LLVM: fix triple setup (regression fix) (#12228)
This commit is contained in:
parent
5378fee1c3
commit
c2190f71ca
@ -871,7 +871,6 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
|||||||
std::string result;
|
std::string result;
|
||||||
|
|
||||||
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
|
auto null_mod = std::make_unique<llvm::Module> ("null_", *m_context);
|
||||||
null_mod->setTargetTriple(utils::c_llvm_default_triple);
|
|
||||||
|
|
||||||
if (_link.empty())
|
if (_link.empty())
|
||||||
{
|
{
|
||||||
@ -884,7 +883,7 @@ jit_compiler::jit_compiler(const std::unordered_map<std::string, u64>& _link, co
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
mem = std::make_unique<MemoryManager2>();
|
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)
|
// Auxiliary JIT (does not use custom memory manager, only writes the objects)
|
||||||
|
@ -3480,7 +3480,7 @@ static void ppu_initialize2(jit_compiler& jit, const ppu_module& module_part, co
|
|||||||
// Initialize target
|
// Initialize target
|
||||||
#if defined(__APPLE__) && defined(ARCH_ARM64)
|
#if defined(__APPLE__) && defined(ARCH_ARM64)
|
||||||
// Force target linux on macOS arm64 to bypass some 64-bit address space linking issues
|
// 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
|
#else
|
||||||
_module->setTargetTriple(Triple::normalize(sys::getProcessTriple()));
|
_module->setTargetTriple(Triple::normalize(sys::getProcessTriple()));
|
||||||
#endif
|
#endif
|
||||||
|
@ -4428,7 +4428,7 @@ public:
|
|||||||
|
|
||||||
// Create LLVM module
|
// Create LLVM module
|
||||||
std::unique_ptr<Module> _module = std::make_unique<Module>(m_hash + ".obj", m_context);
|
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());
|
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
||||||
m_module = _module.get();
|
m_module = _module.get();
|
||||||
|
|
||||||
@ -5090,7 +5090,7 @@ public:
|
|||||||
|
|
||||||
// Create LLVM module
|
// Create LLVM module
|
||||||
std::unique_ptr<Module> _module = std::make_unique<Module>("spu_interpreter.obj", m_context);
|
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());
|
_module->setDataLayout(m_jit.get_engine().getTargetMachine()->createDataLayout());
|
||||||
m_module = _module.get();
|
m_module = _module.get();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user