1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2025-01-31 20:41:45 +01:00

SPU LLVM: fix SPU MMIO in TSX mode

This commit is contained in:
Nekotekina 2019-03-13 20:52:34 +03:00
parent 980c3d6fe8
commit 388d49db80

View File

@ -3710,6 +3710,15 @@ public:
m_ir->CreateCondBr(cond, exec, fail); m_ir->CreateCondBr(cond, exec, fail);
m_ir->SetInsertPoint(exec); m_ir->SetInsertPoint(exec);
const auto mmio = llvm::BasicBlock::Create(m_context, "", m_function);
const auto copy = llvm::BasicBlock::Create(m_context, "", m_function);
m_ir->CreateCondBr(m_ir->CreateICmpUGE(eal.value, m_ir->getInt32(0xe0000000)), mmio, copy);
m_ir->SetInsertPoint(mmio);
m_ir->CreateStore(ci, spu_ptr<u8>(&spu_thread::ch_mfc_cmd, &spu_mfc_cmd::cmd));
call(&exec_mfc_cmd, m_thread);
m_ir->CreateBr(next);
m_ir->SetInsertPoint(copy);
llvm::Type* vtype = get_type<u8(*)[16]>(); llvm::Type* vtype = get_type<u8(*)[16]>();
switch (csize) switch (csize)