Match GC card-removal no-op jump target #635

Merged
coah80 merged 1 commits from agent/bittle/gc-removal-switch into main 2026-10-01 23:21:10 +00:00
coah80 commented 2026-10-01 23:18:36 +00:00 (Migrated from github.com)

Exact jump-table correction

GCWindow::onMemEvent already has 155/155 exact instructions, but state 0x15 in jumptable_81652BF8 pointed to function+0x22C, an extra branch to the epilogue. The original entry points directly to function+0x258. Both paths return; this is an exact-layout correction, not a behavior-change claim.

Group the no-op card-removal states explicitly as break, while retaining a separate default return. This ordinary switch layout preserves all original instructions and fixes the final table entry. A simple return-to-break edit shortened the function by two instructions and was rejected.

  • Jump-table target/addend/type match: 21/22 → 22/22 (88 bytes).
  • Exactly one .data relocation changed; every instruction byte is unchanged.
  • ctxdiff 155/155, zero differences; string pool 50/50 identical.
  • Other unit mismatches and weak-vtable differences remain untouched.

Validation on freshly rebuilt efda1f00: full all_source, report and build/43U/ok pass; DOL SHA-1 26116613f624061ba99c8d1a299aaa6efa85670d. Workflow guards 7/7, pool tests 8/8, diff/worktree checks pass. Entire source .text and global report measures are unchanged; no aggregate percentage-gain claim. Unit remains NonMatching, so the linked DOL still uses the original object. No metadata, header, padding, forced-data or new-assembly changes. Left for Cole's review and merge.

Note

Match original GC card-removal no-op jump target in GCWindow::onMemEvent

Restructures the mState switch for event 6 in iplGCWindow.cpp. State 0x15 now has an explicit no-op case, and unlisted states return via a default branch, matching the original control flow.

Macroscope summarized 8588fea.

## Exact jump-table correction `GCWindow::onMemEvent` already has **155/155 exact instructions**, but state **0x15** in **jumptable_81652BF8** pointed to function+**0x22C**, an extra branch to the epilogue. The original entry points directly to function+**0x258**. Both paths return; this is an exact-layout correction, not a behavior-change claim. Group the no-op card-removal states explicitly as `break`, while retaining a separate default return. This ordinary switch layout preserves all original instructions and fixes the final table entry. A simple return-to-break edit shortened the function by two instructions and was rejected. - Jump-table target/addend/type match: **21/22 → 22/22** (88 bytes). - Exactly **one `.data` relocation changed**; every instruction byte is unchanged. - ctxdiff **155/155, zero differences**; string pool **50/50 identical**. - Other unit mismatches and weak-vtable differences remain untouched. Validation on freshly rebuilt **efda1f00**: full `all_source`, report and `build/43U/ok` pass; DOL SHA-1 **26116613f624061ba99c8d1a299aaa6efa85670d**. Workflow guards **7/7**, pool tests **8/8**, diff/worktree checks pass. Entire source `.text` and global report measures are unchanged; no aggregate percentage-gain claim. Unit remains NonMatching, so the linked DOL still uses the original object. No metadata, header, padding, forced-data or new-assembly changes. Left for Cole's review and merge. <!-- 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] > ### Match original GC card-removal no-op jump target in `GCWindow::onMemEvent` > Restructures the `mState` switch for event 6 in [iplGCWindow.cpp](https://github.com/coah80/wii-ipl/pull/635/files#diff-091dd6b9f7033be9d99ca3e8c0488c53131a9e71b4c8c88b43701b006daea429). State 0x15 now has an explicit no-op case, and unlisted states return via a default branch, matching the original control flow. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 8588fea.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-01 23:21:08 +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.