Repository navigation
Execute ARM64 service gates with Android thread slots - #4
Closed
thehobbit85 wants to merge 3 commits into
Closed
thehobbit85 wants to merge 3 commits into
thehobbit85 wants to merge 3 commits into
Conversation
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.
Capability
A rewritten ARM64 module can enter the native service gate on Android, dispatch on a per-thread host stack, and resume with its own registers and TLS. Host code can also call a guest function pointer and receive its result through the normal ARM64 calling convention. Apple and Android share the gate assembly. The Android build also links it as a position-independent ELF shared object.
The bionic thread-slot ABI comes from the Android port. This adapts it to the current per-thread gate stacks. Each guest thread claims bionic’s application slot (API 29+) and refuses an occupied slot. The loader checks the module’s rewrite layout before mapping it.
Validation at e987551
DM_ALLOW_OTHER_METAL=1for local compiler 32023.921 (pinned 32023.922). Its 28,603 shaders were unchanged. There is no scripted boot route for this game, so gameplay and timing remain unmeasured.Stacked on #3. Keep the series in draft until the port is complete.
regress.py check (full): PASS
Baseline
codex/port-02-android-rewriter50086de, candidatecodex/port-03-android-thread-gatese987551; Apple M2 Max, macOS 26.6, Xcode 27.0; 29.8 s0100F43008C44000LegendsZA
0100F43008C44000: PASSInherited CI failure
The C lint job reported the same two findings as #2, both in the untouched Metal test
dm/gfx/tests/t_geometry_hazards.m. The analyzer flagged a retained program at line 141 and a nullable readback destination at line 153. Upstream PR 979 addresses those findings separately.