Skip to content

PPC: Display data values on hover for pools as well #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Dec 4, 2024
Prev Previous commit
Next Next commit
Clear pool relocs in volatile registers on function call
This fixes some false positives.
  • Loading branch information
LagoLunatic committed Dec 2, 2024
commit 507b988aa33b7acb391d24b1c69ad63d68a7d17d
10 changes: 10 additions & 0 deletions objdiff-core/src/arch/ppc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,16 @@ fn generate_fake_pool_reloc_for_addr_mapping(
) => {
active_pool_relocs.insert(addr_dst_gpr.0, reloc.clone()); // `lis` + `ori`
}
(Opcode::B, _, _, _) => {
if simplified.mnemonic == "bl" {
// When encountering a function call, clear any active pool relocations from
// the volatile registers (r0, r3-r12), but not the nonvolatile registers.
active_pool_relocs.remove(&0);
for gpr in 3..12 {
active_pool_relocs.remove(&gpr);
}
}
}
_ => {}
}
} else if let Some((offset, addr_src_gpr, addr_dst_gpr)) =
Expand Down
Loading