From 466d58ccefc42a2ea57a7dbf3431aacd798e306f Mon Sep 17 00:00:00 2001 From: Nekotekina Date: Mon, 18 Mar 2019 19:22:47 +0300 Subject: [PATCH] SPU LLVM: fix branch patchpoints Forgot to passthrough 3rd arg (rip) --- rpcs3/Emu/Cell/SPURecompiler.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index 2385287e10..79906a072c 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -2714,7 +2714,8 @@ public: m_ir = &irb; // Add entry function (contains only state/code check) - const auto main_func = llvm::cast(m_module->getOrInsertFunction(hash, get_type(), get_type(), get_type())); + const auto main_func = llvm::cast(m_module->getOrInsertFunction(hash, get_type(), get_type(), get_type(), get_type())); + const auto main_arg2 = &*(main_func->arg_begin() + 2); set_function(main_func); // Start compilation @@ -2840,7 +2841,7 @@ public: { const auto pbfail = spu_ptr(&spu_thread::block_failure); m_ir->CreateStore(m_ir->CreateAdd(m_ir->CreateLoad(pbfail), m_ir->getInt64(1)), pbfail); - tail(&spu_recompiler_base::dispatch, m_thread, m_ir->getInt32(0), m_ir->getInt32(0)); + tail(&spu_recompiler_base::dispatch, m_thread, m_ir->getInt32(0), main_arg2); } else {