mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-14 10:48:36 +12:00
Replace utils::cntlz{32,64} with std::countl_zero
This commit is contained in:
parent
d0c199d455
commit
032e7c0491
11 changed files with 22 additions and 47 deletions
|
@ -2114,7 +2114,7 @@ s32 _spurs::add_workload(vm::ptr<CellSpurs> spurs, vm::ptr<u32> wid, vm::cptr<vo
|
|||
const u32 wmax = spurs->flags1 & SF1_32_WORKLOADS ? 0x20u : 0x10u; // TODO: check if can be changed
|
||||
spurs->wklEnabled.atomic_op([spurs, wmax, &wnum](be_t<u32>& value)
|
||||
{
|
||||
wnum = utils::cntlz32(~value); // found empty position
|
||||
wnum = std::countl_one<u32>(value); // found empty position
|
||||
if (wnum < wmax)
|
||||
{
|
||||
value |= (0x80000000 >> wnum); // set workload bit
|
||||
|
@ -2237,7 +2237,7 @@ s32 _spurs::add_workload(vm::ptr<CellSpurs> spurs, vm::ptr<u32> wid, vm::cptr<vo
|
|||
else
|
||||
{
|
||||
k |= 0x80000000 >> current->uniqueId;
|
||||
res_wkl = utils::cntlz32(~k);
|
||||
res_wkl = std::countl_one<u32>(k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue