Match SD title dispatch block order #656

Merged
coah80 merged 1 commits from agent/bittle/sd-title-block-order into main 2026-10-01 23:43:06 +00:00
coah80 commented 2026-10-01 23:40:54 +00:00 (Migrated from github.com)

One-line block move

Emit calcNormal's case 23 before cases 21/22, matching the original physical instruction-block order. Every state still calls the same helper; this is a layout correction, not a behavior-change claim.

The old object had three call-target relocations in the wrong physical positions and an inverse permutation in jumptable_8165529C. Moving the case naturally fixes both. Preserves the newer descriptive helper names from #639; the rebase conflict was resolved only by retaining those names and applying the same block move.

Fresh verification

Rebased and rebuilt on f7ec5942.

  • calcNormal: 108/108 instructions, relocation-aware ctxdiff 3 differences → 0.
  • Jump table: 28/31 → 31/31 exact destinations/addends/types (124 bytes).
  • Exactly three call relocations reorder and three jump-table relocations change. Raw .text instruction words are unchanged; no instruction, state value or helper body was added.
  • String pool 55/55 identical; workflow guards 7/7, pool tests 8/8, diff/worktree checks pass.
  • Full all_source, report and build/43U/ok pass; DOL SHA-1 26116613f624061ba99c8d1a299aaa6efa85670d.

Objdiff already scored the function 100%; no aggregate percentage gain is claimed. The unit remains NonMatching with other unresolved functions/data. No metadata, padding, weak-vtable or new-assembly changes. Left for Cole's review and merge.

Note

Match SDChannelTitle::calcNormal dispatch block order to match SD

Reorders the switch cases in calcNormal in iplSDChannelTitle.cpp so state 23 is handled before states 21 and 22. The state-to-handler mappings are unchanged.

Macroscope summarized 2dcd448.

## One-line block move Emit `calcNormal`'s case 23 before cases 21/22, matching the original physical instruction-block order. Every state still calls the same helper; this is a layout correction, not a behavior-change claim. The old object had three call-target relocations in the wrong physical positions and an inverse permutation in **jumptable_8165529C**. Moving the case naturally fixes both. Preserves the newer descriptive helper names from #639; the rebase conflict was resolved only by retaining those names and applying the same block move. ## Fresh verification Rebased and rebuilt on **f7ec5942**. - `calcNormal`: **108/108 instructions**, relocation-aware ctxdiff **3 differences → 0**. - Jump table: **28/31 → 31/31 exact** destinations/addends/types (124 bytes). - Exactly three call relocations reorder and three jump-table relocations change. Raw `.text` instruction words are unchanged; no instruction, state value or helper body was added. - String pool **55/55 identical**; workflow guards **7/7**, pool tests **8/8**, diff/worktree checks pass. - Full `all_source`, report and `build/43U/ok` pass; DOL SHA-1 **26116613f624061ba99c8d1a299aaa6efa85670d**. Objdiff already scored the function 100%; no aggregate percentage gain is claimed. The unit remains NonMatching with other unresolved functions/data. No metadata, padding, weak-vtable 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 `SDChannelTitle::calcNormal` dispatch block order to match SD > Reorders the switch cases in `calcNormal` in [iplSDChannelTitle.cpp](https://github.com/coah80/wii-ipl/pull/656/files#diff-d140de445093e46f6a07456c41323b579bbd0d658fa896b087fac0133d388fda) so state 23 is handled before states 21 and 22. The state-to-handler mappings are unchanged. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 2dcd448.</sup> > <!-- Macroscope's review summary ends here --> > <!-- Macroscope's pull request summary ends here -->
coah80 commented 2026-10-01 23:43:03 +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.