mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-12-28 18:22:00 +00:00
SPU: Optimize spu_thread::get_events()
This commit is contained in:
parent
6210a8491f
commit
c0e3b86064
@ -3783,6 +3783,12 @@ bool spu_thread::reservation_check(u32 addr, const decltype(rdata)& data) const
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((addr >> 28) < 2 || (addr >> 28) == 0xd)
|
||||
{
|
||||
// Always-allocated memory does not need strict checking (vm::main or vm::stack)
|
||||
return !cmp_rdata(data, *vm::get_super_ptr<decltype(rdata)>(addr));
|
||||
}
|
||||
|
||||
// Ensure data is allocated (HACK: would raise LR event if not)
|
||||
// Set range_lock first optimistically
|
||||
range_lock->store(u64{128} << 32 | addr);
|
||||
@ -3928,7 +3934,7 @@ void spu_thread::set_events(u32 bits)
|
||||
if (events.mask & bits)
|
||||
{
|
||||
events.count = true;
|
||||
return !!events.waiting;
|
||||
return !!events.waiting && (bits & (SPU_EVENT_S1 | SPU_EVENT_S2));
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user