1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

Do not use negative unsigned literals

This commit is contained in:
msuih 2019-06-28 08:24:28 +03:00 committed by Nekotekina
parent 13a557fe67
commit 146e43b6ec
3 changed files with 8 additions and 8 deletions

View File

@ -967,9 +967,9 @@ struct ppu_acontext
// Bit range: constant 0 = (0;0), constant 1 = (1;1), normalized undef = (0;1), unnormalized undef = (1;0)
u64 imin = 0ull; // Integral range begin
u64 imax = -1ull; // Integral range end
u64 imax = ~0ull; // Integral range end
u64 bmin = 0ull; // Bit range begin
u64 bmax = -1ull; // Bit range end
u64 bmax = ~0ull; // Bit range end
void set_undef()
{

View File

@ -1390,7 +1390,7 @@ void spu_thread::do_dma_transfer(const spu_mfc_cmd& args)
break;
}
auto lock = vm::passive_lock(eal & -128u, ::align(eal + size, 128));
auto lock = vm::passive_lock(eal & -128, ::align(eal + size, 128));
while (size >= 128)
{
@ -1578,7 +1578,7 @@ bool spu_thread::do_list_transfer(spu_mfc_cmd& args)
void spu_thread::do_putlluc(const spu_mfc_cmd& args)
{
const u32 addr = args.eal & -128u;
const u32 addr = args.eal & -128;
if (raddr && addr == raddr)
{
@ -1777,7 +1777,7 @@ bool spu_thread::process_mfc_cmd()
{
case MFC_GETLLAR_CMD:
{
const u32 addr = ch_mfc_cmd.eal & -128u;
const u32 addr = ch_mfc_cmd.eal & -128;
auto& data = vm::_ref<decltype(rdata)>(addr);
auto& dst = _ref<decltype(rdata)>(ch_mfc_cmd.lsa & 0x3ff80);
u64 ntime;
@ -1888,7 +1888,7 @@ bool spu_thread::process_mfc_cmd()
case MFC_PUTLLC_CMD:
{
// Store conditionally
const u32 addr = ch_mfc_cmd.eal & -128u;
const u32 addr = ch_mfc_cmd.eal & -128;
u32 result = 0;
if (raddr == addr)

View File

@ -190,7 +190,7 @@ namespace rsx
// Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier
// lle-gcm likes to inject system reserved semaphores, presumably for system/vsh usage
// Avoid calling render to avoid any havoc(flickering) they may cause from invalid flush/write
const u32 offset = method_registers.semaphore_offset_4097() & -16u;
const u32 offset = method_registers.semaphore_offset_4097() & -16;
if (offset > 63 * 4 && !rsx->do_method(NV4097_TEXTURE_READ_SEMAPHORE_RELEASE, arg))
{
//
@ -205,7 +205,7 @@ namespace rsx
void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg)
{
// Full pipeline barrier
const u32 offset = method_registers.semaphore_offset_4097() & -16u;
const u32 offset = method_registers.semaphore_offset_4097() & -16;
if (offset > 63 * 4 && !rsx->do_method(NV4097_BACK_END_WRITE_SEMAPHORE_RELEASE, arg))
{
//