Improve WADBackupEx owner-zero order (97.38042 → 97.385124%) #1142

Merged
coah80 merged 1 commits from agent/bittle/wad-backup-owner-swap into main 2026-10-03 20:58:18 +00:00
coah80 commented 2026-10-03 20:57:04 +00:00 (Migrated from github.com)

Change

Swap only the existing titleMetaBuffer/files zero assignments, retaining the earlier outputBuffer position. Independent nonvolatile pointer-local writes finish before any branch, call or escape; all cleanup flags, declarations, types and other statements stay unchanged.

Result

  • WADBackupEx97.38042 →97.385124%; unit98.943184 →98.944%; global99.73582 →99.73584 on current base
  • Unchanged1057/1062 source/target instructions and64-byte-aligned0x8C0 frame
  • Exact35/40, code13180/24500, data528/528 and linking preserved
  • Exactly one target-backed candidate, not another neighborhood search. It obtains the previously missing target li r25,0 at16 while preserving matches18/21

Independent parent verification

Rebased on34858f3f; tested treec72fd7a14a173ac82e93c0a63126ebac6c818b46. Fresh full default43U and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 whole objects compared: only WAD differs; all1026 other complete unit records identical, no function/exact/data/link regressions. All35 exact functions independently zero instruction differences. Pool18/18; literal advisory clean with existing unequal-size skips documented.

Entire ELF changes only4 bytes in two li words at16/20. Independent symbolic execution of actual instructions16–21 proves identical register state and the same intervening stack store for arbitrary incoming state. No branch enters the window. All later instructions,99 call sites, ABI/frame, nontext data, symbols, relocations, headers and39 sibling bodies are byte-identical. Actual target DOL words/direct calls separately verified. No hardware execution or baseline-bug-fix claim.

Source+reproduction/evidence log only; original binaries stay local. Draft for review; no merge or auto-merge requested.

Note

Reorder WADBackupEx owner-zero assignments to match target (97.385124%)

In wad.c, WADBackupEx now zeroes files before titleMetaBuffer. Both pointers are still set to zero, so machine state is unchanged; only the instruction order differs. This raises target matching from 97.38042% to 97.385124%. Adds wad-backup-owner-swap-20261003.md with the evidence report for the swap.

Macroscope summarized d3e10c9.

## Change Swap only the existing titleMetaBuffer/files zero assignments, retaining the earlier outputBuffer position. Independent nonvolatile pointer-local writes finish before any branch, call or escape; all cleanup flags, declarations, types and other statements stay unchanged. ## Result - WADBackupEx97.38042 →97.385124%; unit98.943184 →98.944%; global99.73582 →99.73584 on current base - Unchanged1057/1062 source/target instructions and64-byte-aligned0x8C0 frame - Exact35/40, code13180/24500, data528/528 and linking preserved - Exactly one target-backed candidate, not another neighborhood search. It obtains the previously missing target li r25,0 at16 while preserving matches18/21 ## Independent parent verification Rebased on34858f3f; tested treec72fd7a14a173ac82e93c0a63126ebac6c818b46. Fresh full default43U and explicit ok pass; DOL SHA1 26116613f624061ba99c8d1a299aaa6efa85670d. All1027 whole objects compared: only WAD differs; all1026 other complete unit records identical, no function/exact/data/link regressions. All35 exact functions independently zero instruction differences. Pool18/18; literal advisory clean with existing unequal-size skips documented. Entire ELF changes only4 bytes in two li words at16/20. Independent symbolic execution of actual instructions16–21 proves identical register state and the same intervening stack store for arbitrary incoming state. No branch enters the window. All later instructions,99 call sites, ABI/frame, nontext data, symbols, relocations, headers and39 sibling bodies are byte-identical. Actual target DOL words/direct calls separately verified. No hardware execution or baseline-bug-fix claim. Source+reproduction/evidence log only; original binaries stay local. Draft for review; no merge or auto-merge requested. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Reorder `WADBackupEx` owner-zero assignments to match target (97.385124%) > In [wad.c](https://github.com/coah80/wii-ipl/pull/1142/files#diff-f89534c3829239a13862901683d3f73929c8719516dc47b0db0ad2e7c79d071e), `WADBackupEx` now zeroes `files` before `titleMetaBuffer`. Both pointers are still set to zero, so machine state is unchanged; only the instruction order differs. This raises target matching from 97.38042% to 97.385124%. Adds [wad-backup-owner-swap-20261003.md](https://github.com/coah80/wii-ipl/pull/1142/files#diff-d71989e9faa7993b8e5893ea01161356c26bbba457252e8045e6f567b618b72e) with the evidence report for the swap. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized d3e10c9.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-03 20:58:16 +00:00 (Migrated from github.com)

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.

Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Sign in to join this conversation.