Repository navigation
Conversation
…gisters (Super Smash Bros. Ultimate 13.0.5 main+0x2b74458: ldrb w18,[x14]; sub w18,w18,#1; cmp w18,seedds#6; b.hi; ldrsw x18,[x7,x18,lsl #2]; add x18,x18,x7; br x18). x7 is built by adrp + add 688 instructions before and parked in x30 around a loop (mov x30,x7 ... mov x7,x30), so the far chain (table_base far) met a mov and patch_nso.py asserted "jump table 2b74458"; the function-wide search jump_adr_offsets uses finds a second adrp x7 + add pair there (another table further on) whose seven targets also lie in the function. jump_offsets' last attempt (far_base) now follows register copies back to the adrp + add (copied_base: address order to the function's start, through no call while the register followed is caller-saved; every target an instruction of the function). It was that main's only unhandled site, and it runs only where the rewriter asserted before: Mario Kart 8 Deluxe's main, subsdk0 and sdk and Smash's sdk and movie module come out byte-identical with the previous rewriter (build_src.sha256 aside); dm/tools/tests pass. Survey: a game that imports nn::ro and ships NRRs but no loose NRO keeps its NROs inside an archive (Smash: 14 NRRs, 98 NROs in data.arc whose exports main imports), so the note no longer says the host's empty nn::ro "is enough" there. docs/agents/03-bringup.md has the rewriter case
This was referenced Oct 23, 2026
seedds
added a commit
that referenced
this pull request
Oct 24, 2026
Integrate PRs #75, #90 and #91 with focused correctness fixes: - Prioritize demanded render pipelines and bound speculative compilation. - Follow copied jump-table bases and reject W/X register clobbers. - Collect and rewrite registered NROs, load them on the Mac, and preserve runtime activation order through unload/reload and symbol rebinding. - Preserve refused-only manifests and invalidate collection caches when archive readers or symbol parsing change. Add pipeline scheduling, register tracing, NRO packaging and loader lifecycle regression coverage. Document that executable NRO embedding on iOS remains outside this integration. Validation: 41 Python tests; 48 pipeline scheduling, 102 NVN and 95 geometry checks; three pipeline-key serialization cases; full host test suite; Mac host build; iOS loader syntax checks; git diff --check. Gameplay and controlled performance A/B measurements were not run. Co-authored-by: blindlight86 <[email protected]> Co-authored-by: v0lumehi <[email protected]>
Owner
|
Integrated into main in d979c34, with coauthor attribution. Thanks for the contribution. The integration also fixes W/X clobber detection: a write to wN invalidates the traced xN base. Added regression coverage using real AArch64 instructions for far copies, register aliases, 32-bit clobbers, and call-clobbered registers. All 41 Python tools tests passed; the Mac host build and full host test suite also passed. Closing as integrated. No new gameplay validation was performed during this integration. |
Know-It-All-Brother
pushed a commit
to Know-It-All-Brother/nxnative
that referenced
this pull request
Nov 9, 2026
Integrate PRs seedds#75, seedds#90 and seedds#91 with focused correctness fixes: - Prioritize demanded render pipelines and bound speculative compilation. - Follow copied jump-table bases and reject W/X register clobbers. - Collect and rewrite registered NROs, load them on the Mac, and preserve runtime activation order through unload/reload and symbol rebinding. - Preserve refused-only manifests and invalidate collection caches when archive readers or symbol parsing change. Add pipeline scheduling, register tracing, NRO packaging and loader lifecycle regression coverage. Document that executable NRO embedding on iOS remains outside this integration. Validation: 41 Python tests; 48 pipeline scheduling, 102 NVN and 95 geometry checks; three pipeline-key serialization cases; full host test suite; Mac host build; iOS loader syntax checks; git diff --check. Gameplay and controlled performance A/B measurements were not run. Co-authored-by: blindlight86 <[email protected]> Co-authored-by: v0lumehi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This came up while bringing up Super Smash Bros. Ultimate (#65). It is a general rewriter fix.
Problem
patch_nso.pyasserted "jump table 2b74458" on Smash 13.0.5'smain:The table base
x7is built by anadrp+add688 instructions earlier and parked inx30around a loop (mov x30,x7 … mov x7,x30). The far-base chain met thatmovand gave up. The function-wide fallback then found a secondadrp x7+addpair, another table further on, whose targets also lie inside the function.Change
jump_offsets' last attempt now follows register copies back to theadrp+add(copied_base):It only runs where the rewriter asserted before. The survey note also changes: a game that imports
nn::roand ships NRRs but no loose NRO keeps its NROs inside an archive, so the host's emptynn::rois not "enough" there.Checked
main.main,subsdk0andsdk, and Smash'ssdkand movie module, come out byte-identical with the previous rewriter (build_src.sha256aside).dm/tools/testspass, and the Mac host builds.