diff options
| author | Glenn Rice <glennricster@gmail.com> | 2010-11-23 14:00:40 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2010-11-23 14:00:40 +0000 |
| commit | f915509fffd6ffae019a25eb302d855103c543d1 (patch) | |
| tree | c43fbe18a5516b8b3d8d72d0469cf821fb78e117 /Source/Core | |
| parent | 4267adbd5e6f79d1ce5804c7a32dbf3ce65f0531 (diff) | |
Linux build fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6464 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp index faf8f4da4e..7127cd4865 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp @@ -130,6 +130,8 @@ Fix profiled loads/stores to work safely. On 32-bit, one solution is to #endif #include <algorithm> +#include <memory> +#include <set> #include "IR.h" #include "../PPCTables.h" #include "../../CoreTiming.h" @@ -1226,7 +1228,7 @@ struct Writer { FILE* file; Writer() : file(NULL) { char buffer[1024]; - sprintf(buffer, "JitIL_IR_%d.txt", time(NULL)); + sprintf(buffer, "JitIL_IR_%d.txt", (int)time(NULL)); file = fopen(buffer, "w"); setvbuf(file, NULL, _IOFBF, 1024 * 1024); } @@ -1237,6 +1239,7 @@ struct Writer { } } }; + static std::auto_ptr<Writer> writer; static const std::string opcodeNames[] = { @@ -1285,7 +1288,7 @@ static const std::set<unsigned> extra16Regs(extra16RegList, extra16RegList + siz static const std::set<unsigned> extra24Regs(extra24RegList, extra24RegList + sizeof(extra24RegList) / sizeof(extra24RegList[0])); void IRBuilder::WriteToFile(u64 codeHash) { - assert(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1); + _assert_(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1); if (!writer.get()) { writer = std::auto_ptr<Writer>(new Writer); @@ -1297,7 +1300,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { const InstLoc lastCurReadPtr = curReadPtr; StartForwardPass(); const unsigned numInsts = getNumInsts(); - for (int i = 0; i < numInsts; ++i) { + for (unsigned int i = 0; i < numInsts; ++i) { const InstLoc I = ReadForward(); const unsigned opcode = getOpcode(*I); const bool thisUsed = IsMarkUsed(I) || @@ -1321,7 +1324,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { if (isImm(*inst)) { fprintf(file, " 0x%08x", GetImmValue(inst)); } else { - fprintf(file, " %10d", i - (I - inst)); + fprintf(file, " %10lu", i - (I - inst)); } } @@ -1331,7 +1334,7 @@ void IRBuilder::WriteToFile(u64 codeHash) { if (isImm(*inst)) { fprintf(file, " 0x%08x", GetImmValue(inst)); } else { - fprintf(file, " %10d", i - (I - inst)); + fprintf(file, " %10lu", i - (I - inst)); } } |
