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 {