mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Replace rotate utils with std::rotl
More include cleanup.
This commit is contained in:
parent
f72af2973d
commit
4d8bfe328b
8 changed files with 49 additions and 179 deletions
|
|
@ -1525,7 +1525,7 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
|
|||
|
||||
bool spu_thread::do_dma_check(const spu_mfc_cmd& args)
|
||||
{
|
||||
const u32 mask = utils::rol32(1, args.tag);
|
||||
const u32 mask = std::rotl<u32>(1, args.tag);
|
||||
|
||||
if (mfc_barrier & mask || (args.cmd & (MFC_BARRIER_MASK | MFC_FENCE_MASK) && mfc_fence & mask)) [[unlikely]]
|
||||
{
|
||||
|
|
@ -1541,13 +1541,13 @@ bool spu_thread::do_dma_check(const spu_mfc_cmd& args)
|
|||
if ((mfc_queue[i].cmd & ~0xc) == MFC_BARRIER_CMD)
|
||||
{
|
||||
mfc_barrier |= -1;
|
||||
mfc_fence |= utils::rol32(1, mfc_queue[i].tag);
|
||||
mfc_fence |= std::rotl<u32>(1, mfc_queue[i].tag);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (true)
|
||||
{
|
||||
const u32 _mask = utils::rol32(1u, mfc_queue[i].tag);
|
||||
const u32 _mask = std::rotl<u32>(1u, mfc_queue[i].tag);
|
||||
|
||||
// A command with barrier hard blocks that tag until it's been dealt with
|
||||
if (mfc_queue[i].cmd & MFC_BARRIER_MASK)
|
||||
|
|
@ -1648,14 +1648,14 @@ bool spu_thread::do_list_transfer(spu_mfc_cmd& args)
|
|||
|
||||
if (items[index].sb & 0x8000) [[unlikely]]
|
||||
{
|
||||
ch_stall_mask |= utils::rol32(1, args.tag);
|
||||
ch_stall_mask |= std::rotl<u32>(1, args.tag);
|
||||
|
||||
if (!ch_stall_stat.get_count())
|
||||
{
|
||||
ch_event_stat |= SPU_EVENT_SN;
|
||||
}
|
||||
|
||||
ch_stall_stat.set_value(utils::rol32(1, args.tag) | ch_stall_stat.get_value());
|
||||
ch_stall_stat.set_value(std::rotl<u32>(1, args.tag) | ch_stall_stat.get_value());
|
||||
|
||||
args.tag |= 0x80; // Set stalled status
|
||||
return false;
|
||||
|
|
@ -1750,7 +1750,7 @@ void spu_thread::do_mfc(bool wait)
|
|||
static_cast<void>(std::remove_if(mfc_queue + 0, mfc_queue + mfc_size, [&](spu_mfc_cmd& args)
|
||||
{
|
||||
// Select tag bit in the tag mask or the stall mask
|
||||
const u32 mask = utils::rol32(1, args.tag);
|
||||
const u32 mask = std::rotl<u32>(1, args.tag);
|
||||
|
||||
if ((args.cmd & ~0xc) == MFC_BARRIER_CMD)
|
||||
{
|
||||
|
|
@ -2107,7 +2107,7 @@ bool spu_thread::process_mfc_cmd()
|
|||
}
|
||||
case MFC_PUTQLLUC_CMD:
|
||||
{
|
||||
const u32 mask = utils::rol32(1, ch_mfc_cmd.tag);
|
||||
const u32 mask = std::rotl<u32>(1, ch_mfc_cmd.tag);
|
||||
|
||||
if ((mfc_barrier | mfc_fence) & mask) [[unlikely]]
|
||||
{
|
||||
|
|
@ -2155,11 +2155,11 @@ bool spu_thread::process_mfc_cmd()
|
|||
}
|
||||
|
||||
mfc_queue[mfc_size++] = ch_mfc_cmd;
|
||||
mfc_fence |= utils::rol32(1, ch_mfc_cmd.tag);
|
||||
mfc_fence |= std::rotl<u32>(1, ch_mfc_cmd.tag);
|
||||
|
||||
if (ch_mfc_cmd.cmd & MFC_BARRIER_MASK)
|
||||
{
|
||||
mfc_barrier |= utils::rol32(1, ch_mfc_cmd.tag);
|
||||
mfc_barrier |= std::rotl<u32>(1, ch_mfc_cmd.tag);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -2191,11 +2191,11 @@ bool spu_thread::process_mfc_cmd()
|
|||
}
|
||||
|
||||
mfc_size++;
|
||||
mfc_fence |= utils::rol32(1, cmd.tag);
|
||||
mfc_fence |= std::rotl<u32>(1, cmd.tag);
|
||||
|
||||
if (cmd.cmd & MFC_BARRIER_MASK)
|
||||
{
|
||||
mfc_barrier |= utils::rol32(1, cmd.tag);
|
||||
mfc_barrier |= std::rotl<u32>(1, cmd.tag);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -2215,7 +2215,7 @@ bool spu_thread::process_mfc_cmd()
|
|||
{
|
||||
mfc_queue[mfc_size++] = ch_mfc_cmd;
|
||||
mfc_barrier |= -1;
|
||||
mfc_fence |= utils::rol32(1, ch_mfc_cmd.tag);
|
||||
mfc_fence |= std::rotl<u32>(1, ch_mfc_cmd.tag);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
@ -2813,7 +2813,7 @@ bool spu_thread::set_ch_value(u32 ch, u32 value)
|
|||
case MFC_WrListStallAck:
|
||||
{
|
||||
// Reset stall status for specified tag
|
||||
const u32 tag_mask = utils::rol32(1, value);
|
||||
const u32 tag_mask = std::rotl<u32>(1, value);
|
||||
|
||||
if (ch_stall_mask & tag_mask)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue