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:
Jesse Talavera-Greenberg
2023-03-23 13:04:38 -04:00
committed by GitHub
parent 19280cff2d
commit 79dfb8dc8f
50 changed files with 521 additions and 378 deletions

View File

@ -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)
{