From 146e43b6ecb4e0312cc2ef5c74f3c1a1bc328b8c Mon Sep 17 00:00:00 2001 From: msuih Date: Fri, 28 Jun 2019 08:24:28 +0300 Subject: [PATCH] Do not use negative unsigned literals --- rpcs3/Emu/Cell/PPUAnalyser.h | 4 ++-- rpcs3/Emu/Cell/SPUThread.cpp | 8 ++++---- rpcs3/Emu/RSX/rsx_methods.cpp | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rpcs3/Emu/Cell/PPUAnalyser.h b/rpcs3/Emu/Cell/PPUAnalyser.h index 7e9a912b3f..e01466961b 100644 --- a/rpcs3/Emu/Cell/PPUAnalyser.h +++ b/rpcs3/Emu/Cell/PPUAnalyser.h @@ -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() { diff --git a/rpcs3/Emu/Cell/SPUThread.cpp b/rpcs3/Emu/Cell/SPUThread.cpp index 110e976434..4682d6d0da 100644 --- a/rpcs3/Emu/Cell/SPUThread.cpp +++ b/rpcs3/Emu/Cell/SPUThread.cpp @@ -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(addr); auto& dst = _ref(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) diff --git a/rpcs3/Emu/RSX/rsx_methods.cpp b/rpcs3/Emu/RSX/rsx_methods.cpp index 951df329b2..9c6d633a49 100644 --- a/rpcs3/Emu/RSX/rsx_methods.cpp +++ b/rpcs3/Emu/RSX/rsx_methods.cpp @@ -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)) { //