data(tiHwKeyboard): fix .rodata order for country maps #543

Merged
coah80 merged 1 commits from agent/data/tiHwKeyboard into main 2026-10-01 22:37:05 +00:00
coah80 commented 2026-10-01 22:22:13 +00:00 (Migrated from github.com)

Summary

Moves the scCountryMap_EU, scCountryMap_NonEU, and controlKeys definitions in src/keyboard/tiHwKeyboard.cpp from between updateTriggerKey_ and updateTappingShift_ to immediately before the setLanguage asm function (after updateShift). Array contents are unchanged.

The HWKeyboard methods emit the KeyInputData aggregate constant (@6525) into .rodata; placing the country maps and controlKeys after them makes .rodata emission order match the original: @6525, EU, NonEU, controlKeys.

Measurements

  • Before/after: .rodata fuzzy ~90.9% -> 100%; matched_data ~208/504 (~40%) -> ~472/504 (~93.7%)
  • Remaining gap: .sdata section pad (3 vs 8) and .sdata2 symbol split (8+8 vs 8+4). Not adding unreferenced padding, per PR #484 feedback.
  • pool_diff: N/A / strings identical; this change is definition order only.
  • DOL sha1: 26116613f624061ba99c8d1a299aaa6efa85670d (unchanged; tiHwKeyboard.cpp is NonMatching and not linked).

Notes

  • Referenced data only: country maps are used by setLanguage; controlKeys is used in updateTriggerKey_.
  • Pure move; git diff is 17 deletions / 18 insertions of the same lines (one blank-line separator before setLanguage).
Open in Web Open in Cursor 
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Moves the `scCountryMap_EU`, `scCountryMap_NonEU`, and `controlKeys` definitions in `src/keyboard/tiHwKeyboard.cpp` from between `updateTriggerKey_` and `updateTappingShift_` to immediately before the `setLanguage` asm function (after `updateShift`). Array contents are unchanged. The HWKeyboard methods emit the `KeyInputData` aggregate constant (`@6525`) into `.rodata`; placing the country maps and `controlKeys` after them makes `.rodata` emission order match the original: `@6525`, EU, NonEU, `controlKeys`. ## Measurements - Before/after: `.rodata` fuzzy ~90.9% -> 100%; `matched_data` ~208/504 (~40%) -> ~472/504 (~93.7%) - Remaining gap: `.sdata` section pad (3 vs 8) and `.sdata2` symbol split (8+8 vs 8+4). Not adding unreferenced padding, per PR #484 feedback. - `pool_diff`: N/A / strings identical; this change is definition order only. - DOL sha1: `26116613f624061ba99c8d1a299aaa6efa85670d` (unchanged; `tiHwKeyboard.cpp` is `NonMatching` and not linked). ## Notes - Referenced data only: country maps are used by `setLanguage`; `controlKeys` is used in `updateTriggerKey_`. - Pure move; `git diff` is 17 deletions / 18 insertions of the same lines (one blank-line separator before `setLanguage`). <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-a72bf25d-a15d-5b0a-a12b-d35b0239dad8?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-a72bf25d-a15d-5b0a-a12b-d35b0239dad8&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>
coah80 commented 2026-10-01 22:37:01 +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.