mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Partially revert "General: Toss out PRI macro usage"
This commit is contained in:
@ -62,7 +62,7 @@ static void Trace(UGeckoInstruction& instCode)
|
||||
std::string fregs = "";
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
fregs += StringFromFormat("f%02d: %08llx %08llx ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]);
|
||||
fregs += StringFromFormat("f%02d: %08" PRIx64 " %08" PRIx64 " ", i, PowerPC::ppcState.ps[i][0], PowerPC::ppcState.ps[i][1]);
|
||||
}
|
||||
|
||||
std::string ppc_inst = GekkoDisassembler::Disassemble(instCode.hex, PC);
|
||||
|
@ -103,7 +103,7 @@ public:
|
||||
if (IsBound(preg))
|
||||
return regs[preg].location.GetSimpleReg();
|
||||
|
||||
PanicAlert("Unbounded register - %zu", preg);
|
||||
PanicAlert("Unbound register - %zu", preg);
|
||||
return Gen::INVALID_REG;
|
||||
}
|
||||
virtual Gen::OpArg GetDefaultLocation(size_t reg) const = 0;
|
||||
|
@ -216,14 +216,14 @@ namespace JitILProfiler
|
||||
std::string filename = StringFromFormat("JitIL_profiling_%d.csv", (int)time(nullptr));
|
||||
File::IOFile file(filename, "w");
|
||||
setvbuf(file.GetHandle(), nullptr, _IOFBF, 1024 * 1024);
|
||||
fprintf(file.GetHandle(), "code hash, total elapsed, number of calls, elapsed per call\n");
|
||||
fprintf(file.GetHandle(), "code hash,total elapsed,number of calls,elapsed per call\n");
|
||||
for (auto& block : blocks)
|
||||
{
|
||||
const u64 codeHash = block.codeHash;
|
||||
const u64 totalElapsed = block.totalElapsed;
|
||||
const u64 numberOfCalls = block.numberOfCalls;
|
||||
const double elapsedPerCall = totalElapsed / (double)numberOfCalls;
|
||||
fprintf(file.GetHandle(), "%016llx, %lld, %lld, %f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall);
|
||||
fprintf(file.GetHandle(), "%016" PRIx64 ",%" PRId64 ",%" PRId64 ",%f\n", codeHash, totalElapsed, numberOfCalls, elapsedPerCall);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -19,7 +19,7 @@ static void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress)
|
||||
disasm.disasm64(0, code_addr, codePtr, disbuf);
|
||||
PanicAlert("%s\n\n"
|
||||
"Error encountered accessing emulated address %08x.\n"
|
||||
"Culprit instruction: \n%s\nat %#llx",
|
||||
"Culprit instruction: \n%s\nat %#" PRIx64,
|
||||
text.c_str(), emAddress, disbuf, code_addr);
|
||||
return;
|
||||
}
|
||||
|
@ -1513,7 +1513,7 @@ void IRBuilder::WriteToFile(u64 codeHash)
|
||||
}
|
||||
|
||||
FILE* const file = writer->file.GetHandle();
|
||||
fprintf(file, "\ncode hash:%016llx\n", codeHash);
|
||||
fprintf(file, "\ncode hash:%016" PRIx64 "\n", codeHash);
|
||||
|
||||
const InstLoc lastCurReadPtr = curReadPtr;
|
||||
StartForwardPass();
|
||||
|
@ -124,7 +124,7 @@ namespace JitInterface
|
||||
std::string name = g_symbolDB.GetDescription(stat.addr);
|
||||
double percent = 100.0 * (double)stat.cost / (double)prof_stats.cost_sum;
|
||||
double timePercent = 100.0 * (double)stat.tick_counter / (double)prof_stats.timecost_sum;
|
||||
fprintf(f.GetHandle(), "%08x\t%s\t%llu\t%llu\t%llu\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
fprintf(f.GetHandle(), "%08x\t%s\t%" PRIu64 "\t%" PRIu64 "\t%" PRIu64 "\t%.2f\t%.2f\t%.2f\t%i\n",
|
||||
stat.addr, name.c_str(), stat.run_count, stat.cost,
|
||||
stat.tick_counter, percent, timePercent,
|
||||
(double)stat.tick_counter*1000.0/(double)prof_stats.countsPerSec, stat.block_size);
|
||||
|
@ -161,7 +161,7 @@ void PrintInstructionRunCounts()
|
||||
if (inst.second == 0)
|
||||
break;
|
||||
|
||||
DEBUG_LOG(POWERPC, "%s : %llu", inst.first, inst.second);
|
||||
DEBUG_LOG(POWERPC, "%s : %" PRIu64, inst.first, inst.second);
|
||||
}
|
||||
}
|
||||
|
||||
@ -175,7 +175,7 @@ void LogCompiledInstructions()
|
||||
GekkoOPInfo *pInst = m_allInstructions[i];
|
||||
if (pInst->compileCount > 0)
|
||||
{
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%lld\t%08x\n", pInst->opname,
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\t%08x\n", pInst->opname,
|
||||
pInst->compileCount, pInst->runCount, pInst->lastUse);
|
||||
}
|
||||
}
|
||||
@ -186,7 +186,7 @@ void LogCompiledInstructions()
|
||||
GekkoOPInfo *pInst = m_allInstructions[i];
|
||||
if (pInst->compileCount == 0)
|
||||
{
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%lld\n", pInst->opname,
|
||||
fprintf(f.GetHandle(), "%s\t%i\t%" PRId64 "\n", pInst->opname,
|
||||
pInst->compileCount, pInst->runCount);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user