mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-28 02:56:36 -04:00
overlay: remove --overlay-exact; compile overlays via normal analysis (pivot)
Rips out the --overlay-exact recompiler path (analyze_exact_entries, split_mid_function_targets, the CLI flag, and the compile_overlays.py flag), returning the recompiler to master's naive whole-blob analysis. Overlay compilation now splits mid-function branch targets into standalone functions — the original behavior that produced black-on-load / blue-on-new-game — so we can faithfully reproduce the failure before fixing it. Pivot in approach: rather than excluding mid-function seeds at scan time, the plan is to capture everything (the full overlay image is already dumped to overlay_captures.json) and have the ingester detect each seed's containing parent function at encode time and merge/ignore mid-function seeds, while flagging entries reached only via computed/indirect jumps as jump-risk. The runtime overlay loader/capture system (b2929aa) is unchanged. The 5 recompiler files are restored byte-exact to master (d22c9ce); config_loader's overlay_cache flag is retained. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1573,11 +1573,7 @@ std::string CodeGenerator::generate_file(
|
||||
// hit `psx_unknown_dispatch`. Surfaced by Phase B2 audit. The 16-pass
|
||||
// cap is a safety limit; in practice each pass strictly reduces the
|
||||
// remaining target set so convergence is fast.
|
||||
//
|
||||
// Overlay exact mode disables this: overlay branch targets are basic-block
|
||||
// labels, not callable function entries, so splitting them into standalone
|
||||
// functions produces broken dispatch — the mid-function-seed failure mode.
|
||||
if (config_.split_mid_function_targets) {
|
||||
{
|
||||
std::set<uint32_t> cfgs_to_scan; // Which CFGs to scan (empty = all)
|
||||
uint32_t exe_start = exe_.header.load_address;
|
||||
uint32_t exe_end = exe_.end_address();
|
||||
|
||||
Reference in New Issue
Block a user