Skip to content

Commit

Permalink
Some reporting cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 28, 2024
1 parent e51f7c3 commit 81f52d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 2 additions & 1 deletion Core/ELF/ElfReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ bool ElfReader::LoadRelocations(const Elf32_Rel *rels, int numRelocs) {
// It appears the PSP takes any relocation that is not a HI16.
if (t_type != R_MIPS_LO16) {
if (t_type != R_MIPS_16) {
// Let's play it safe for now and skip. We've only seen this type.
// Let's play it safe for now and skip. We've only seen this type.
// These exists in some popular games like Assassin's Creed: Bloodlines and GTA: VCS: (https://report.ppsspp.org/logs/kind/1187)
ERROR_LOG_REPORT(Log::Loader, "ELF relocation HI16/%d pair (instead of LO16) at %08x / %08x", t_type, addr, corrLoAddr);
continue;
} else {
Expand Down
9 changes: 5 additions & 4 deletions Core/MIPS/MIPSInt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ namespace MIPSInt
int func = (op >> 16) & 0x1F;

// Let's only report this once per run to be safe from impacting perf.
static bool reportedAlignment = false;
static bool loggedAlignment = false;

// It appears that a cache line is 0x40 (64) bytes, loops in games
// issue the cache instruction at that interval.
Expand All @@ -120,9 +120,10 @@ namespace MIPSInt
int size = 0x40 + (addr & 0x3F);
MIPSComp::jit->InvalidateCacheAt(alignedAddr, size);
// Using a bool to avoid locking/etc. in case it's slow.
if (!reportedAlignment && (addr & 0x3F) != 0) {
WARN_LOG_REPORT(Log::JIT, "Unaligned icache invalidation of %08x (%08x + %d) at PC=%08x", addr, R(rs), imm, PC);
reportedAlignment = true;
if (!loggedAlignment && (addr & 0x3F) != 0) {
// These are seen exclusively in Lego games, and are really no big deal. Reporting removed.
WARN_LOG(Log::JIT, "Unaligned icache invalidation of %08x (%08x + %d) at PC=%08x", addr, R(rs), imm, PC);
loggedAlignment = true;
}
if (alignedAddr <= PC + 4 && alignedAddr + size >= PC - 4) {
// This is probably rare so we don't use a static bool.
Expand Down
3 changes: 1 addition & 2 deletions GPU/GPUCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1349,8 +1349,7 @@ void GPUCommon::FlushImm() {
}

void GPUCommon::Execute_Unknown(u32 op, u32 diff) {
if ((op & 0xFFFFFF) != 0)
WARN_LOG_REPORT_ONCE(unknowncmd, Log::G3D, "Unknown GE command : %08x ", op);
// Do nothing. We used to report here, but we're confident we have them all so no need to report unknown.
}

void GPUCommon::FastLoadBoneMatrix(u32 target) {
Expand Down

0 comments on commit 81f52d3

Please sign in to comment.