mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-04 14:08:37 +00:00
SPU/Debugger: Use bitset for breakpoints
This commit is contained in:
parent
7dc4ccc87d
commit
12bfc7d56a
4 changed files with 19 additions and 5 deletions
|
|
@ -125,8 +125,10 @@ void breakpoint_list::HandleBreakpointRequest(u32 loc, bool only_add)
|
|||
|
||||
const auto spu = static_cast<spu_thread*>(m_cpu);
|
||||
auto& list = spu->local_breakpoints;
|
||||
const u32 pos_at = loc / 4;
|
||||
const u32 pos_bit = 1u << (pos_at % 8);
|
||||
|
||||
if (list[loc / 4].test_and_invert())
|
||||
if (list[pos_at / 8].fetch_xor(pos_bit) & pos_bit)
|
||||
{
|
||||
if (std::none_of(list.begin(), list.end(), [](auto& val){ return val.load(); }))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue