mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 16:19:28 +01:00
Linux build fix.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6464 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
4267adbd5e
commit
f915509fff
@ -130,6 +130,8 @@ Fix profiled loads/stores to work safely. On 32-bit, one solution is to
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
#include <memory>
|
||||||
|
#include <set>
|
||||||
#include "IR.h"
|
#include "IR.h"
|
||||||
#include "../PPCTables.h"
|
#include "../PPCTables.h"
|
||||||
#include "../../CoreTiming.h"
|
#include "../../CoreTiming.h"
|
||||||
@ -1226,7 +1228,7 @@ struct Writer {
|
|||||||
FILE* file;
|
FILE* file;
|
||||||
Writer() : file(NULL) {
|
Writer() : file(NULL) {
|
||||||
char buffer[1024];
|
char buffer[1024];
|
||||||
sprintf(buffer, "JitIL_IR_%d.txt", time(NULL));
|
sprintf(buffer, "JitIL_IR_%d.txt", (int)time(NULL));
|
||||||
file = fopen(buffer, "w");
|
file = fopen(buffer, "w");
|
||||||
setvbuf(file, NULL, _IOFBF, 1024 * 1024);
|
setvbuf(file, NULL, _IOFBF, 1024 * 1024);
|
||||||
}
|
}
|
||||||
@ -1237,6 +1239,7 @@ struct Writer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static std::auto_ptr<Writer> writer;
|
static std::auto_ptr<Writer> writer;
|
||||||
|
|
||||||
static const std::string opcodeNames[] = {
|
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]));
|
static const std::set<unsigned> extra24Regs(extra24RegList, extra24RegList + sizeof(extra24RegList) / sizeof(extra24RegList[0]));
|
||||||
|
|
||||||
void IRBuilder::WriteToFile(u64 codeHash) {
|
void IRBuilder::WriteToFile(u64 codeHash) {
|
||||||
assert(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1);
|
_assert_(sizeof(opcodeNames) / sizeof(opcodeNames[0]) == Int3 + 1);
|
||||||
|
|
||||||
if (!writer.get()) {
|
if (!writer.get()) {
|
||||||
writer = std::auto_ptr<Writer>(new Writer);
|
writer = std::auto_ptr<Writer>(new Writer);
|
||||||
@ -1297,7 +1300,7 @@ void IRBuilder::WriteToFile(u64 codeHash) {
|
|||||||
const InstLoc lastCurReadPtr = curReadPtr;
|
const InstLoc lastCurReadPtr = curReadPtr;
|
||||||
StartForwardPass();
|
StartForwardPass();
|
||||||
const unsigned numInsts = getNumInsts();
|
const unsigned numInsts = getNumInsts();
|
||||||
for (int i = 0; i < numInsts; ++i) {
|
for (unsigned int i = 0; i < numInsts; ++i) {
|
||||||
const InstLoc I = ReadForward();
|
const InstLoc I = ReadForward();
|
||||||
const unsigned opcode = getOpcode(*I);
|
const unsigned opcode = getOpcode(*I);
|
||||||
const bool thisUsed = IsMarkUsed(I) ||
|
const bool thisUsed = IsMarkUsed(I) ||
|
||||||
@ -1321,7 +1324,7 @@ void IRBuilder::WriteToFile(u64 codeHash) {
|
|||||||
if (isImm(*inst)) {
|
if (isImm(*inst)) {
|
||||||
fprintf(file, " 0x%08x", GetImmValue(inst));
|
fprintf(file, " 0x%08x", GetImmValue(inst));
|
||||||
} else {
|
} 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)) {
|
if (isImm(*inst)) {
|
||||||
fprintf(file, " 0x%08x", GetImmValue(inst));
|
fprintf(file, " 0x%08x", GetImmValue(inst));
|
||||||
} else {
|
} else {
|
||||||
fprintf(file, " %10d", i - (I - inst));
|
fprintf(file, " %10lu", i - (I - inst));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user