diff --git a/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp b/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp index b6d7ba51d3..080476a3ec 100644 --- a/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp +++ b/Source/Core/Core/DSP/Jit/DSPJitRegCache.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include + #include "Core/DSP/DSPEmitter.h" #include "Core/DSP/DSPMemoryMap.h" #include "Core/DSP/Jit/DSPJitRegCache.h" @@ -282,7 +284,7 @@ void DSPJitRegCache::flushRegs(DSPJitRegCache &cache, bool emit) { _assert_msg_(DSPLLE, xregs[i].guest_reg == cache.xregs[i].guest_reg, - "cache and current xreg guest_reg mismatch for %zi", i); + "cache and current xreg guest_reg mismatch for %" PRIx64, i); } for (i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++) @@ -316,7 +318,7 @@ void DSPJitRegCache::flushMemBackedRegs() for (unsigned int i = 0; i <= DSP_REG_MAX_MEM_BACKED; i++) { _assert_msg_(DSPLLE, !regs[i].used, - "register %x still in use", i); + "register %u still in use", i); if (regs[i].used) { @@ -351,7 +353,7 @@ void DSPJitRegCache::flushRegs() { _assert_msg_(DSPLLE, !regs[i].loc.IsSimpleReg(), - "register %x is still a simple reg", i); + "register %u is still a simple reg", i); } _assert_msg_(DSPLLE, @@ -440,7 +442,7 @@ void DSPJitRegCache::saveRegs() { _assert_msg_(DSPLLE, !regs[i].loc.IsSimpleReg(), - "register %x is still a simple reg", i); + "register %u is still a simple reg", i); } emitter.MOV(64, R(RBP), M(&ebp_store)); @@ -485,7 +487,7 @@ void DSPJitRegCache::pushRegs() { _assert_msg_(DSPLLE, !regs[i].loc.IsSimpleReg(), - "register %x is still a simple reg", i); + "register %u is still a simple reg", i); } for (unsigned int i = 0; i < NUMXREGS; i++) @@ -493,7 +495,7 @@ void DSPJitRegCache::pushRegs() _assert_msg_(DSPLLE, xregs[i].guest_reg == DSP_REG_NONE || xregs[i].guest_reg == DSP_REG_STATIC, - "register %x is still used", i); + "register %u is still used", i); } emitter.MOV(64, R(RBP), M(&ebp_store)); @@ -558,11 +560,11 @@ X64Reg DSPJitRegCache::makeABICallSafe(X64Reg reg) void DSPJitRegCache::movToHostReg(size_t reg, X64Reg host_reg, bool load) { _assert_msg_(DSPLLE, reg <= DSP_REG_MAX_MEM_BACKED, - "bad register name %x", reg); + "bad register name %" PRIx64, reg); _assert_msg_(DSPLLE, regs[reg].parentReg == DSP_REG_NONE, - "register %x is proxy for %x", reg, regs[reg].parentReg); + "register %" PRIx64 " is proxy for %d", reg, regs[reg].parentReg); _assert_msg_(DSPLLE, !regs[reg].used, - "moving to host reg in use guest reg %x!", reg); + "moving to host reg in use guest reg %" PRIx64, reg); X64Reg old_reg = regs[reg].loc.GetSimpleReg(); if (old_reg == host_reg) { @@ -604,11 +606,11 @@ void DSPJitRegCache::movToHostReg(size_t reg, X64Reg host_reg, bool load) void DSPJitRegCache::movToHostReg(size_t reg, bool load) { _assert_msg_(DSPLLE, reg <= DSP_REG_MAX_MEM_BACKED, - "bad register name %x", reg); + "bad register name %" PRIx64, reg); _assert_msg_(DSPLLE, regs[reg].parentReg == DSP_REG_NONE, - "register %x is proxy for %x", reg, regs[reg].parentReg); + "register %" PRIx64 " is proxy for %d", reg, regs[reg].parentReg); _assert_msg_(DSPLLE, !regs[reg].used, - "moving to host reg in use guest reg %x!", reg); + "moving to host reg in use guest reg %" PRIx64, reg); if (regs[reg].loc.IsSimpleReg()) { @@ -636,13 +638,13 @@ void DSPJitRegCache::movToHostReg(size_t reg, bool load) void DSPJitRegCache::rotateHostReg(size_t reg, int shift, bool emit) { _assert_msg_(DSPLLE, reg <= DSP_REG_MAX_MEM_BACKED, - "bad register name %x", reg); + "bad register name %" PRIx64, reg); _assert_msg_(DSPLLE, regs[reg].parentReg == DSP_REG_NONE, - "register %x is proxy for %x", reg, regs[reg].parentReg); + "register %" PRIx64 " is proxy for %d", reg, regs[reg].parentReg); _assert_msg_(DSPLLE, regs[reg].loc.IsSimpleReg(), - "register %x is not a simple reg", reg); + "register %" PRIx64 " is not a simple reg", reg); _assert_msg_(DSPLLE, !regs[reg].used, - "rotating in use guest reg %x!", reg); + "rotating in use guest reg %" PRIx64, reg); if (shift > regs[reg].shift && emit) { @@ -680,11 +682,11 @@ void DSPJitRegCache::rotateHostReg(size_t reg, int shift, bool emit) void DSPJitRegCache::movToMemory(size_t reg) { _assert_msg_(DSPLLE, reg <= DSP_REG_MAX_MEM_BACKED, - "bad register name %x", reg); + "bad register name %" PRIx64, reg); _assert_msg_(DSPLLE, regs[reg].parentReg == DSP_REG_NONE, - "register %x is proxy for %x", reg, regs[reg].parentReg); + "register %" PRIx64 " is proxy for %d", reg, regs[reg].parentReg); _assert_msg_(DSPLLE, !regs[reg].used, - "moving to memory in use guest reg %x!", reg); + "moving to memory in use guest reg %" PRIx64, reg); if (regs[reg].used) { @@ -766,7 +768,7 @@ void DSPJitRegCache::getReg(int reg, OpArg &oparg, bool load) } _assert_msg_(DSPLLE, !regs[real_reg].used, - "register %x already in use", real_reg); + "register %d already in use", real_reg); if (regs[real_reg].used) { @@ -778,7 +780,7 @@ void DSPJitRegCache::getReg(int reg, OpArg &oparg, bool load) // TODO: actually handle INVALID_REG _assert_msg_(DSPLLE, regs[real_reg].loc.IsSimpleReg(), - "did not get host reg for %x", reg); + "did not get host reg for %d", reg); rotateHostReg(real_reg, shift, load); oparg = regs[real_reg].loc; diff --git a/Source/Core/Core/HW/GCMemcardDirectory.cpp b/Source/Core/Core/HW/GCMemcardDirectory.cpp index aa97291991..7862567c31 100644 --- a/Source/Core/Core/HW/GCMemcardDirectory.cpp +++ b/Source/Core/Core/HW/GCMemcardDirectory.cpp @@ -135,7 +135,7 @@ GCMemcardDirectory::GCMemcardDirectory(std::string directory, int slot, u16 size { std::string ext; std::string const &name = FST_Temp.children[j].virtualName; - SplitPath(name, NULL, NULL, &ext); + SplitPath(name, nullptr, nullptr, &ext); if (strcasecmp(ext.c_str(), ".gci") == 0) { if (m_saves.size() == DIRLEN) @@ -553,7 +553,7 @@ void GCMemcardDirectory::Flush(bool exiting) void GCMemcardDirectory::DoState(PointerWrap &p) { m_LastBlock = -1; - m_LastBlockAddress = 0; + m_LastBlockAddress = nullptr; p.Do(m_SaveDirectory); p.DoPOD
(m_hdr); p.DoPOD(m_dir1);