From a21d7def33a05fa1ad3ae51a9740c843ba601d86 Mon Sep 17 00:00:00 2001 From: Eladash Date: Mon, 11 Nov 2019 22:12:21 +0200 Subject: [PATCH] SPU: Don't break blocks on DSYNC instruction in Safe mode (#6731) --- rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp | 2 +- rpcs3/Emu/Cell/SPURecompiler.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp b/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp index b2e3090887..b47d10016f 100644 --- a/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp +++ b/rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp @@ -1459,7 +1459,7 @@ void spu_recompiler::SYNC(spu_opcode_t op) void spu_recompiler::DSYNC(spu_opcode_t op) { // This instruction forces all earlier load, store, and channel instructions to complete before proceeding. - SYNC(op); + c->mfence(); } void spu_recompiler::MFSPR(spu_opcode_t op) diff --git a/rpcs3/Emu/Cell/SPURecompiler.cpp b/rpcs3/Emu/Cell/SPURecompiler.cpp index a364890be2..07527f7ca9 100644 --- a/rpcs3/Emu/Cell/SPURecompiler.cpp +++ b/rpcs3/Emu/Cell/SPURecompiler.cpp @@ -1332,7 +1332,6 @@ std::vector spu_recompiler_base::analyse(const be_t* ls, u32 entry_poi } case spu_itype::SYNC: - case spu_itype::DSYNC: case spu_itype::STOP: case spu_itype::STOPD: { @@ -1696,6 +1695,7 @@ std::vector spu_recompiler_base::analyse(const be_t* ls, u32 entry_poi break; } + case spu_itype::DSYNC: case spu_itype::HEQ: case spu_itype::HEQI: case spu_itype::HGT: @@ -6086,7 +6086,7 @@ public: void DSYNC(spu_opcode_t op) // { // This instruction forces all earlier load, store, and channel instructions to complete before proceeding. - SYNC(op); + m_ir->CreateFence(llvm::AtomicOrdering::SequentiallyConsistent); } void MFSPR(spu_opcode_t op) //