decomp(fat): improve SD initialization branch structure to 93.125% #1078
Reference in New Issue
Block a user
Delete Branch "agent/bittle/sd-init-partial"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Source change
Separate already-initialized and new-initialization paths in pfd_sddrv_init, retaining the common success return. A different disk still returns -44; all error returns, state writes, reports, callback registrations, and external calls retain their ordering. This replaces the baseline's branchless identity-result selection with target-style control flow. No artificial state, assembly, shared-header or linking changes.
Independent parent verification
Rebased onto
93e97b7f, which includes #1077, and rebuilt.Historical larger branch-form gain was reproduced; one smaller documented accumulator alternative scored 92.94444% and was discarded. No broad search. Evidence and limitations in attempts log.
Final source object SHA256 1206b4a1af2b2e9071430d43bdb30e6591ff11c389934c7564bb52eac77cf721 is unchanged after rebase. Uploaded tree
6b9405fb18equals independently tested tree. No merge or auto-merge requested.Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.
Clarification to the generated summary: a different disk already returned -44 before this change. Both baseline and candidate return 0 for the same already-initialized disk and -44 for a different disk. This PR restructures those existing branches; it does not fix or introduce different-disk rejection. The source diff and the 279,936-case baseline/candidate oracle confirm unchanged return/state/call behavior.