mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-10 08:51:28 +12:00
Move rotate/cntlz/cnttz helpers to Utilities/asm.h
This commit is contained in:
parent
ee96807305
commit
ed9fb8405b
15 changed files with 242 additions and 197 deletions
|
@ -2,7 +2,7 @@
|
|||
#include "Emu/System.h"
|
||||
#include "Emu/IdManager.h"
|
||||
#include "Emu/Cell/PPUModule.h"
|
||||
|
||||
#include "Utilities/asm.h"
|
||||
#include "Emu/Cell/SPUThread.h"
|
||||
#include "Emu/Cell/lv2/sys_lwmutex.h"
|
||||
#include "Emu/Cell/lv2/sys_lwcond.h"
|
||||
|
@ -2126,7 +2126,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 = cntlz32(~(u32)value); // found empty position
|
||||
wnum = utils::cntlz32(~(u32)value); // found empty position
|
||||
if (wnum < wmax)
|
||||
{
|
||||
value |= (u32)(0x80000000ull >> wnum); // set workload bit
|
||||
|
@ -2249,7 +2249,7 @@ s32 _spurs::add_workload(vm::ptr<CellSpurs> spurs, vm::ptr<u32> wid, vm::cptr<vo
|
|||
else
|
||||
{
|
||||
k |= 0x80000000 >> current->uniqueId;
|
||||
res_wkl = cntlz32(~k);
|
||||
res_wkl = utils::cntlz32(~k);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue