mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 23:11:25 +12:00
PPU: fix LDARX/LWARX in accurate mode (closes #9058)
Fixup after #9048 Use SSE intrinsics in mov_rdata.
This commit is contained in:
parent
1885e4345c
commit
5bd5a382c0
2 changed files with 29 additions and 3 deletions
|
@ -1176,7 +1176,7 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
|
|||
continue;
|
||||
}
|
||||
|
||||
const be_t<u64> rdata = data.load();
|
||||
be_t<u64> rdata;
|
||||
|
||||
if (ppu.use_full_rdata)
|
||||
{
|
||||
|
@ -1187,6 +1187,10 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
|
|||
|
||||
mov_rdata(ppu.rdata, vm::_ref<spu_rdata_t>(addr & -128));
|
||||
}
|
||||
else
|
||||
{
|
||||
rdata = data.load();
|
||||
}
|
||||
|
||||
if (vm::reservation_acquire(addr, sizeof(T)) == ppu.rtime) [[likely]]
|
||||
{
|
||||
|
@ -1212,6 +1216,11 @@ static T ppu_load_acquire_reservation(ppu_thread& ppu, u32 addr)
|
|||
// Store only 64 bits of reservation data
|
||||
std::memcpy(&ppu.rdata[addr & 0x78], &rdata, 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load relevant 64 bits of reservation data
|
||||
std::memcpy(&rdata, &ppu.rdata[addr & 0x78], 8);
|
||||
}
|
||||
|
||||
return static_cast<T>(rdata << data_off >> size_off);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue