Skip to content

Add targeted address, padding and local-width repairs - #136

Merged
RetroGameDeveloper merged 3 commits into
mainfrom
feat/targeted-address-lifetimes
Oct 28, 2026
Merged

RetroGameDeveloper merged 3 commits into
mainfrom
feat/targeted-address-lifetimes

Conversation

@RetroGameDeveloper

@RetroGameDeveloper RetroGameDeveloper commented Oct 28, 2026 •

Copy link
Copy Markdown

What changed

Add four bounded deterministic repair families to the shared draft-repair and try_local_repairs pipelines:

  • Stage a scalar store's byte address through a pointer temporary.
  • Route repeated pointer-to-integer casts through an inline helper on supported 32-bit processors.
  • Remove or halve unreferenced ordinary local padding arrays. When a measured MIPS diff consists solely of a consistent prologue/epilogue/saved-slot frame shift, try two bounded missing-padding sizes through the optional iterative phase or current-source local trials. The processor reader owns the instruction-specific checks.
  • Narrow a scalar local when the candidate already casts it to a byte/halfword type.

Existing budgets, revision checks, durable miss caching and ordinary exact judges remain in force. Imported projects and ROM mode share these candidates. Volatile, escaping, ambiguous and unsupported cases are skipped; no compiler settings change automatically.

Evidence

Worked only on a private copy of an N64 checkpoint, with no paid helper sessions:

  • The existing bounded repair pass tried 431 variants across 55 functions above 99%, with no new exact matches.
  • Replayed 107 previously unreviewed repair examples; existing families reproduced 14 historical successes. The new padding and local-width families reproduced two more historical successes.
  • The new address, pointer-cast and local-width families found three new exact matches, verified through try_local_repairs and the normal compiler/link judge.
  • A manual stack-frame reconstruction found a fourth exact match; the measured-frame extension now reproduces this match automatically through try_local_repairs too. All four new matches have automatic repair reproductions. Missing-frame growth is MIPS-only until other processors implement its reader; unhinted padding removal/shrinking remains shared.
  • Four newly verified functions total 1,568 bytes / 392 instructions. Game sources, ROM, database and transcripts remain outside this repository.

Validation

  • 85 focused tests passed, including both ROM/imported judge entry points and bounded safety cases.
  • Ruff and git diff --check passed.
  • Full local suite before the final measured-frame extension: 1,967 passed, 157 skipped.
  • After that extension and processor-reader integration: 100 focused regression tests passed, including iterative search and both mode-specific judge paths.
  • After merging the latest main: 107 focused repair/iterative tests plus 38 adjacent permuter tests passed. All four automatic matches were reproduced again through the normal app judge on the private copy.
  • The merge conflicts with the latest main are resolved; both repair pipelines are retained. Cross-platform CI is running for 7af304b.

@github-actions github-actions Bot added the enhancement New feature or request label Oct 28, 2026
@RetroGameDeveloper
RetroGameDeveloper merged commit 33fe158 into main Oct 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant