mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 03:02:53 +01:00
Fix formatting
This commit is contained in:
parent
c9132a4bdb
commit
5f1253598c
@ -18,7 +18,7 @@ protected:
|
||||
switch(m_mode)
|
||||
{
|
||||
case CPUDisAsm_DumpMode:
|
||||
last_opcode = fmt::Format("\t%08llx:\t%02x %02x %02x %02x\t%s\n", dump_pc,
|
||||
last_opcode = fmt::Format("\t%08x:\t%02x %02x %02x %02x\t%s\n", dump_pc,
|
||||
offset[dump_pc],
|
||||
offset[dump_pc + 1],
|
||||
offset[dump_pc + 2],
|
||||
@ -26,7 +26,7 @@ protected:
|
||||
break;
|
||||
|
||||
case CPUDisAsm_InterpreterMode:
|
||||
last_opcode = fmt::Format("[%08llx] %02x %02x %02x %02x: %s", dump_pc,
|
||||
last_opcode = fmt::Format("[%08x] %02x %02x %02x %02x: %s", dump_pc,
|
||||
offset[dump_pc],
|
||||
offset[dump_pc + 1],
|
||||
offset[dump_pc + 2],
|
||||
|
@ -287,7 +287,7 @@ void _se_translator(unsigned int u, EXCEPTION_POINTERS* pExp)
|
||||
{
|
||||
// TODO: allow recovering from a page fault
|
||||
throw fmt::Format("Access violation: addr = 0x%x (is_alive=%d, last_syscall=0x%llx (%s))",
|
||||
(u32)addr, t->IsAlive() ? 1 : 0, (u64)t->m_last_syscall, SysCalls::GetHLEFuncName((u32)t->m_last_syscall).c_str());
|
||||
(u32)addr, t->IsAlive() ? 1 : 0, t->m_last_syscall, SysCalls::GetHLEFuncName((u32)t->m_last_syscall).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -314,7 +314,7 @@ void CPUThread::Task()
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<u64> trace;
|
||||
std::vector<u32> trace;
|
||||
|
||||
#ifdef _WIN32
|
||||
auto old_se_translator = _set_se_translator(_se_translator);
|
||||
@ -376,7 +376,7 @@ void CPUThread::Task()
|
||||
// TODO: linux version
|
||||
#endif
|
||||
|
||||
for (auto& v : trace) LOG_NOTICE(PPU, "PC = 0x%llx", v);
|
||||
for (auto& v : trace) LOG_NOTICE(PPU, "PC = 0x%x", v);
|
||||
|
||||
if (Ini.HLELogging.GetValue()) LOG_NOTICE(PPU, "%s leave", CPUThread::GetFName().c_str());
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
|
||||
for(uint i=0; i<m_call_stack.size(); ++i)
|
||||
{
|
||||
ret += fmt::Format("0x%llx -> 0x%llx\n", m_call_stack[i].pc, m_call_stack[i].branch_pc);
|
||||
ret += fmt::Format("0x%x -> 0x%x\n", m_call_stack[i].pc, m_call_stack[i].branch_pc);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -260,12 +260,12 @@ private:
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
if (CPU.GPR[rt]._u32[3] == 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void BINZ(u32 intr, u32 rt, u32 ra)
|
||||
@ -279,12 +279,12 @@ private:
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
if (CPU.GPR[rt]._u32[3] != 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void BIHZ(u32 intr, u32 rt, u32 ra)
|
||||
@ -298,12 +298,12 @@ private:
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
if (CPU.GPR[rt]._u16[6] == 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void BIHNZ(u32 intr, u32 rt, u32 ra)
|
||||
@ -317,12 +317,12 @@ private:
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
if (CPU.GPR[rt]._u16[6] != 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void STOPD(u32 rc, u32 ra, u32 rb)
|
||||
@ -344,7 +344,7 @@ private:
|
||||
}
|
||||
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void BISL(u32 intr, u32 rt, u32 ra)
|
||||
@ -358,7 +358,7 @@ private:
|
||||
u32 target = branchTarget(CPU.GPR[ra]._u32[3], 0);
|
||||
CPU.GPR[rt].clear();
|
||||
CPU.GPR[rt]._u32[3] = CPU.PC + 4;
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void IRET(u32 ra)
|
||||
@ -1103,12 +1103,12 @@ private:
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
if (CPU.GPR[rt]._u32[3] == 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void STQA(u32 rt, s32 i16)
|
||||
@ -1122,12 +1122,12 @@ private:
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
if (CPU.GPR[rt]._u32[3] != 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void BRHZ(u32 rt, s32 i16)
|
||||
@ -1135,12 +1135,12 @@ private:
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
if (CPU.GPR[rt]._u16[6] == 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void BRHNZ(u32 rt, s32 i16)
|
||||
@ -1148,12 +1148,12 @@ private:
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
if (CPU.GPR[rt]._u16[6] != 0)
|
||||
{
|
||||
LOG5_OPCODE("taken (0x%llx)", target);
|
||||
LOG5_OPCODE("taken (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG5_OPCODE("not taken (0x%llx)", target);
|
||||
LOG5_OPCODE("not taken (0x%x)", target);
|
||||
}
|
||||
}
|
||||
void STQR(u32 rt, s32 i16)
|
||||
@ -1165,7 +1165,7 @@ private:
|
||||
void BRA(s32 i16)
|
||||
{
|
||||
u32 target = branchTarget(0, i16);
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void LQA(u32 rt, s32 i16)
|
||||
@ -1179,13 +1179,13 @@ private:
|
||||
u32 target = branchTarget(0, i16);
|
||||
CPU.GPR[rt].clear();
|
||||
CPU.GPR[rt]._u32[3] = CPU.PC + 4;
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void BR(s32 i16)
|
||||
{
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void FSMBI(u32 rt, s32 i16)
|
||||
@ -1209,7 +1209,7 @@ private:
|
||||
u32 target = branchTarget(CPU.PC, i16);
|
||||
CPU.GPR[rt].clear();
|
||||
CPU.GPR[rt]._u32[3] = CPU.PC + 4;
|
||||
LOG5_OPCODE("branch (0x%llx)", target);
|
||||
LOG5_OPCODE("branch (0x%x)", target);
|
||||
CPU.SetBranch(target);
|
||||
}
|
||||
void LQR(u32 rt, s32 i16)
|
||||
@ -1299,7 +1299,6 @@ private:
|
||||
{
|
||||
const u32 lsa = (CPU.GPR[ra]._s32[3] + i10) & 0x3fff0;
|
||||
|
||||
//LOG_NOTICE(Log::SPU, "STQD(lsa=0x%x): GPR[%d] (0x%llx%llx)", lsa, rt, CPU.GPR[rt]._u64[1], CPU.GPR[rt]._u64[0]);
|
||||
CPU.WriteLS128(lsa, CPU.GPR[rt]);
|
||||
}
|
||||
void LQD(u32 rt, s32 i10, u32 ra) //i10 is shifted left by 4 while decoding
|
||||
|
@ -256,7 +256,7 @@ MemBlockInfo::MemBlockInfo(u64 _addr, u32 _size)
|
||||
#endif
|
||||
if (mem != real_addr)
|
||||
{
|
||||
LOG_ERROR(MEMORY, "Memory allocation failed (addr=0x%llx, size=0x%llx)", addr, size);
|
||||
LOG_ERROR(MEMORY, "Memory allocation failed (addr=0x%llx, size=0x%x)", addr, size);
|
||||
Emu.Pause();
|
||||
}
|
||||
else
|
||||
@ -277,7 +277,7 @@ void MemBlockInfo::Free()
|
||||
if (::mprotect(mem, size, PROT_NONE))
|
||||
#endif
|
||||
{
|
||||
LOG_ERROR(MEMORY, "Memory deallocation failed (addr=0x%llx, size=0x%llx)", addr, size);
|
||||
LOG_ERROR(MEMORY, "Memory deallocation failed (addr=0x%llx, size=0x%x)", addr, size);
|
||||
Emu.Pause();
|
||||
}
|
||||
}
|
||||
|
@ -180,8 +180,7 @@ s64 cellSpursAttributeSetMemoryContainerForSpuThread(vm::ptr<CellSpursAttribute>
|
||||
{
|
||||
return CELL_SPURS_CORE_ERROR_ALIGN;
|
||||
}
|
||||
CellSpursAttribute a = *attr;
|
||||
if ((u32)a.m.flags & 0x20000000) // check unknown flag
|
||||
if ((u32)attr->m.flags & 0x20000000) // check unknown flag
|
||||
{
|
||||
return CELL_SPURS_CORE_ERROR_STAT;
|
||||
}
|
||||
|
@ -922,7 +922,7 @@ void default_syscall()
|
||||
{
|
||||
//tty
|
||||
case 988:
|
||||
LOG_WARNING(HLE, "SysCall 988! r3: 0x%llx, r4: 0x%llx, pc: 0x%llx",
|
||||
LOG_WARNING(HLE, "SysCall 988! r3: 0x%llx, r4: 0x%llx, pc: 0x%x",
|
||||
CPU.GPR[3], CPU.GPR[4], CPU.PC);
|
||||
CPU.GPR[3] = 0;
|
||||
return;
|
||||
|
@ -632,8 +632,8 @@ s32 cellFsStReadGetRingBuf(u32 fd, vm::ptr<CellFsRingBuffer> ringbuf)
|
||||
|
||||
*ringbuf = fs_config.m_ring_buffer;
|
||||
|
||||
sys_fs->Warning("*** fs stream config: block_size=0x%llx, copy=%d, ringbuf_size = 0x%llx, transfer_rate = 0x%llx",
|
||||
ringbuf->block_size, ringbuf->copy,ringbuf->ringbuf_size, ringbuf->transfer_rate);
|
||||
sys_fs->Warning("*** fs stream config: block_size=0x%llx, copy=%d, ringbuf_size=0x%llx, transfer_rate=0x%llx",
|
||||
(u64)ringbuf->block_size, (u32)ringbuf->copy, (u64)ringbuf->ringbuf_size, (u64)ringbuf->transfer_rate);
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -716,7 +716,7 @@ s32 cellFsStRead(u32 fd, u32 buf_addr, u64 size, vm::ptr<be_t<u64>> rsize)
|
||||
|
||||
s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<be_t<u32>> addr, vm::ptr<be_t<u64>> size)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadGetCurrentAddr(fd=%d, addr_addr=0x%x, size_addr = 0x%x)", fd, addr.addr(), size.addr());
|
||||
sys_fs->Todo("cellFsStReadGetCurrentAddr(fd=%d, addr_addr=0x%x, size_addr=0x%x)", fd, addr.addr(), size.addr());
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
@ -728,7 +728,7 @@ s32 cellFsStReadGetCurrentAddr(u32 fd, vm::ptr<be_t<u32>> addr, vm::ptr<be_t<u64
|
||||
|
||||
s32 cellFsStReadPutCurrentAddr(u32 fd, u32 addr_addr, u64 size)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadPutCurrentAddr(fd=%d, addr_addr=0x%x, size = 0x%llx)", fd, addr_addr, size);
|
||||
sys_fs->Todo("cellFsStReadPutCurrentAddr(fd=%d, addr_addr=0x%x, size=0x%llx)", fd, addr_addr, size);
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
@ -740,7 +740,7 @@ s32 cellFsStReadPutCurrentAddr(u32 fd, u32 addr_addr, u64 size)
|
||||
|
||||
s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadWait(fd=%d, size = 0x%llx)", fd, size);
|
||||
sys_fs->Todo("cellFsStReadWait(fd=%d, size=0x%llx)", fd, size);
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
@ -752,7 +752,7 @@ s32 cellFsStReadWait(u32 fd, u64 size)
|
||||
|
||||
s32 cellFsStReadWaitCallback(u32 fd, u64 size, vm::ptr<void (*)(int xfd, u64 xsize)> func)
|
||||
{
|
||||
sys_fs->Todo("cellFsStReadWaitCallback(fd=%d, size = 0x%llx, func_addr = 0x%x)", fd, size, func.addr());
|
||||
sys_fs->Todo("cellFsStReadWaitCallback(fd=%d, size=0x%llx, func_addr=0x%x)", fd, size, func.addr());
|
||||
|
||||
LV2_LOCK(0);
|
||||
|
||||
|
@ -91,7 +91,7 @@ void DisAsmFrame::AddLine(const wxString line)
|
||||
return;
|
||||
}
|
||||
|
||||
m_disasm_list->SetItem(count, 0, wxString::Format("%llx", CPU.PC));
|
||||
m_disasm_list->SetItem(count, 0, wxString::Format("%x", CPU.PC));
|
||||
m_disasm_list->SetItem(count, 1, line);
|
||||
|
||||
++count;
|
||||
@ -480,11 +480,11 @@ void DisAsmFrame::SetPc(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
diag.SetSizerAndFit( s_panel );
|
||||
|
||||
p_pc->SetLabel(wxString::Format("%llx", CPU.PC));
|
||||
p_pc->SetLabel(wxString::Format("%x", CPU.PC));
|
||||
|
||||
if(diag.ShowModal() == wxID_OK)
|
||||
{
|
||||
sscanf(fmt::ToUTF8(p_pc->GetLabel()).c_str(), "%llx", &CPU.PC);
|
||||
sscanf(fmt::ToUTF8(p_pc->GetLabel()).c_str(), "%x", &CPU.PC);
|
||||
Resume();
|
||||
}
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ void InterpreterDisAsmFrame::Show_Val(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
diag->SetSizerAndFit( s_panel );
|
||||
|
||||
if(CPU) p_pc->SetValue(wxString::Format("%llx", CPU->PC));
|
||||
if(CPU) p_pc->SetValue(wxString::Format("%x", CPU->PC));
|
||||
|
||||
if(diag->ShowModal() == wxID_OK)
|
||||
{
|
||||
|
@ -350,7 +350,7 @@ bool ELF64Loader::LoadPhdrData(u64 offset)
|
||||
{
|
||||
if (!Memory.MainMem.AllocFixed(offset + phdr.p_vaddr, (u32)phdr.p_memsz))
|
||||
{
|
||||
LOG_ERROR(LOADER, "%s(): AllocFixed(0x%llx, 0x%llx) failed", __FUNCTION__, offset + phdr.p_vaddr, phdr.p_memsz);
|
||||
LOG_ERROR(LOADER, "%s(): AllocFixed(0x%llx, 0x%x) failed", __FUNCTION__, offset + phdr.p_vaddr, (u32)phdr.p_memsz);
|
||||
}
|
||||
else if (phdr.p_filesz)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user