diff --git a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp index a9107b1e81..97bb83fa9e 100644 --- a/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp +++ b/Source/Core/Core/PowerPC/Jit64IL/IR_X86.cpp @@ -77,7 +77,7 @@ struct RegInfo final : private NonCopyable u32 numFSpills = 0; u32 exitNumber = 0; - RegInfo(JitIL* j, InstLoc f, u32 insts) : Jit(j), FirstI(f), IInfo(insts), lastUsed(insts) {} + RegInfo(JitIL* j, InstLoc f, size_t insts) : Jit(j), FirstI(f), IInfo(insts), lastUsed(insts) {} }; static BitSet32 regsInUse(RegInfo& R) diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp index 8eb732ea98..f7348ba34e 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.cpp +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.cpp @@ -1769,15 +1769,15 @@ void IRBuilder::WriteToFile(u64 codeHash) const InstLoc lastCurReadPtr = curReadPtr; StartForwardPass(); - const unsigned numInsts = getNumInsts(); - for (unsigned int i = 0; i < numInsts; ++i) + const size_t numInsts = getNumInsts(); + for (size_t i = 0; i < numInsts; ++i) { const InstLoc I = ReadForward(); const unsigned opcode = getOpcode(*I); const bool thisUsed = IsMarkUsed(I) || alwaysUseds.find(opcode) != alwaysUseds.end(); // Line number - fprintf(file, "%4u", i); + fprintf(file, "%4zu", i); if (!thisUsed) fprintf(file, "%*c", 32, ' '); @@ -1795,7 +1795,7 @@ void IRBuilder::WriteToFile(u64 codeHash) if (isImm(*inst)) fprintf(file, " 0x%08x", GetImmValue(inst)); else - fprintf(file, " %10u", i - (unsigned int)(I - inst)); + fprintf(file, " %10zu", i - static_cast(I - inst)); } // Op2 @@ -1806,7 +1806,7 @@ void IRBuilder::WriteToFile(u64 codeHash) if (isImm(*inst)) fprintf(file, " 0x%08x", GetImmValue(inst)); else - fprintf(file, " %10u", i - (unsigned int)(I - inst)); + fprintf(file, " %10zu", i - static_cast(I - inst)); } if (extra8Regs.count(opcode)) diff --git a/Source/Core/Core/PowerPC/JitILCommon/IR.h b/Source/Core/Core/PowerPC/JitILCommon/IR.h index d1e64d550c..1ad69cfcef 100644 --- a/Source/Core/Core/PowerPC/JitILCommon/IR.h +++ b/Source/Core/Core/PowerPC/JitILCommon/IR.h @@ -5,6 +5,7 @@ #pragma once #include +#include #include #include "Common/CommonTypes.h" @@ -379,7 +380,7 @@ public: InstLoc ReadForward() { return curReadPtr++; } InstLoc ReadBackward() { return --curReadPtr; } InstLoc getFirstInst() { return InstList.data(); } - unsigned int getNumInsts() { return (unsigned int)InstList.size(); } + size_t getNumInsts() const { return InstList.size(); } unsigned int GetImmValue(InstLoc I) const { return (u32)GetImmValue64(I); } u64 GetImmValue64(InstLoc I) const; void SetMarkUsed(InstLoc I);