diff --git a/rpcs3/Emu/Cell/PPUThread.cpp b/rpcs3/Emu/Cell/PPUThread.cpp index b490554aef..3e205dd454 100644 --- a/rpcs3/Emu/Cell/PPUThread.cpp +++ b/rpcs3/Emu/Cell/PPUThread.cpp @@ -1186,7 +1186,7 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr) if (ppu.rtime & 127) { // Try to use TSX to obtain data atomically - if (!g_use_rtm || !spu_getllar_tx(addr & -128, ppu.rdata, &ppu, ppu.rtime)) + if (!g_use_rtm || !spu_getllar_tx(addr & -128, ppu.rdata, &ppu, ppu.rtime & -128)) { continue; } diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 7c48e79a4b..8dc5dbb40b 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -833,7 +833,7 @@ const extern auto spu_getllar_tx = build_function_asm(cpu_flag::pause)); c.jc(fall); c.mov(x86::rax, x86::qword_ptr(x86::rbx)); - c.and_(x86::rax, -128); + c.and_(x86::rax, ~vm::rsrv_shared_mask); c.cmp(x86::rax, args[3]); c.jne(fall); c.xbegin(tx0); @@ -2472,7 +2472,7 @@ bool spu_thread::process_mfc_cmd() if (ntime & 127) { // Try to use TSX to obtain data atomically - if (!g_use_rtm || !spu_getllar_tx(addr, rdata, this, ntime)) + if (!g_use_rtm || !spu_getllar_tx(addr, rdata, this, ntime & -128)) { // See previous ntime check. continue; @@ -2497,7 +2497,7 @@ bool spu_thread::process_mfc_cmd() continue; } - if (i >= 40) [[unlikely]] + if (g_use_rtm && i >= 15) [[unlikely]] { spu_log.warning("GETLLAR took too long: %u", i); }