mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-29 00:59:56 -06:00
Introduce Platform::Log
(#1640)
* Add Platform::Log and Platform::LogLevel * Replace most printf calls with Platform::Log calls * Move a brace down * Move some log entries to one Log call - Some implementations of Log may assume a full line * Log the MAC address as LogLevel::Info
This commit is contained in:

committed by
GitHub

parent
19280cff2d
commit
79dfb8dc8f
@ -227,7 +227,7 @@ void Compiler::A_Comp_Arith()
|
||||
Comp_ArithTriOp(&Compiler::AND, rd, rn, op2, carryUsed, sFlag|opSymmetric|opInvertOp2);
|
||||
break;
|
||||
default:
|
||||
printf("this is a JIT bug! %04x\n", op);
|
||||
Log(LogLevel::Error, "this is a JIT bug! %04x\n", op);
|
||||
abort();
|
||||
}
|
||||
|
||||
|
@ -247,7 +247,7 @@ void Compiler::T_Comp_BranchXchangeReg()
|
||||
{
|
||||
if (Num == 1)
|
||||
{
|
||||
printf("BLX unsupported on ARM7!!!\n");
|
||||
Log(LogLevel::Warn, "BLX unsupported on ARM7!!!\n");
|
||||
return;
|
||||
}
|
||||
MOV(32, R(RSCRATCH), MapReg(CurInstr.A_Reg(3)));
|
||||
|
@ -711,12 +711,12 @@ JitBlockEntry Compiler::CompileBlock(ARM* cpu, bool thumb, FetchedInstr instrs[]
|
||||
{
|
||||
if (NearSize - (GetCodePtr() - NearStart) < 1024 * 32) // guess...
|
||||
{
|
||||
printf("near reset\n");
|
||||
Log(LogLevel::Debug, "near reset\n");
|
||||
ResetBlockCache();
|
||||
}
|
||||
if (FarSize - (FarCode - FarStart) < 1024 * 32) // guess...
|
||||
{
|
||||
printf("far reset\n");
|
||||
Log(LogLevel::Debug, "far reset\n");
|
||||
ResetBlockCache();
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ u8* Compiler::RewriteMemAccess(u8* pc)
|
||||
return pc + (ptrdiff_t)patch.Offset;
|
||||
}
|
||||
|
||||
printf("this is a JIT bug %sx\n", pc);
|
||||
Log(LogLevel::Error, "this is a JIT bug %sx\n", pc);
|
||||
abort();
|
||||
}
|
||||
|
||||
@ -382,7 +382,7 @@ void Compiler::Comp_MemAccess(int rd, int rn, const Op2& op2, int size, int flag
|
||||
if (!(flags & memop_Store) && rd == 15)
|
||||
{
|
||||
if (size < 32)
|
||||
printf("!!! LDR <32 bit PC %08X %x\n", R15, CurInstr.Instr);
|
||||
Log(LogLevel::Debug, "!!! LDR <32 bit PC %08X %x\n", R15, CurInstr.Instr);
|
||||
{
|
||||
if (Num == 1)
|
||||
{
|
||||
|
Reference in New Issue
Block a user