PPU Debugger/Memory: STDCX/STWCX breakpoints, make vm::_ref const

This commit is contained in:
elad335
2025-04-19 15:01:00 +03:00
committed by Elad
parent 564c903fbd
commit 8437a5f5ac
14 changed files with 61 additions and 91 deletions
+4 -1
View File
@@ -3367,7 +3367,10 @@ static bool ppu_store_reservation(ppu_thread& ppu, u32 addr, u64 reg_value)
fmt::throw_exception("PPU %s: Unaligned address: 0x%08x", sizeof(T) == 4 ? "STWCX" : "STDCX", addr);
}
auto& data = vm::_ref<atomic_be_t<u64>>(addr & -8);
// Notify breakpoint handler
vm::write<void>(addr, T{0}, &ppu);
auto& data = const_cast<atomic_be_t<u64>&>(vm::_ref<atomic_be_t<u64>>(addr & -8));
auto& res = vm::reservation_acquire(addr);
const u64 rtime = ppu.rtime;