Match tiPcKeyboard Base::setTranslateMode via uninit keyMode #1270
Reference in New Issue
Block a user
Delete Branch "tiskb-clean"
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?
Summary
Base::setTranslateMode(tiPcKeyboard) is now byte-identical: 105/105 insns, fuzzy 99.0 → 100.0.The change is one declaration:
u32 keyMode = mode;→u32 keyMode;. Formodeoutside{TM_Direct, TM_Roman, TM_Kana}the switch leaveskeyModeunset, and retail provably reads the uninitialized register — at orig0xd48(bge → 0xd64) and0xd40(b → 0xd64) control reaches the merge with noli r31store on the path, thencmplw r31, r0at0xd6cconsumes it. InitializingkeyModelets MWCC collapse the default into an extraband changes the whole cmpwi dispatch tree (106 insns vs 105). Same accepted uninitialized-read pattern asset_err_msg/keyModein earlier units.Verification: full ninja build, DOL sha1
26116613f624061ba99c8d1a299aaa6efa85670d, zero drops elsewhere (all other diffs are the pre-existing tiPcKeyboard weak-emit asymmetry that the tikey link lane owns).Also appends two probe write-ups to
tools/decomp-assist/attempts files (iplSettingscanAPinlined-bool materialization wall; tiStringinputCharindexed-store/dead-compare fossil) — documentation only, no source changes.Link to Devin session: https://app.devin.ai/sessions/222dce3cd2364f14bc9a8d5ef82cda00
Open in Devin Desktop: https://app.devin.ai/desktop/session/222dce3cd2364f14bc9a8d5ef82cda00?variant=devin
Requested by: @coah80
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
Reviewed and merged: rebased on main, full build ok, DOL sha1 26116613f624061ba99c8d1a299aaa6efa85670d, 0 regressions, 0 forbidden patterns.