Repository navigation
native-int: TPIDR_EL0/TPIDRRO_EL0 reads stay inside regions - #60
Merged
Merged
Conversation
…er fields (TPIDR_EL0, TPIDRRO_EL0) A system-register read with no access check, read function, constant or I/O flag (at EL0: TPIDR_EL0 and TPIDRRO_EL0, iOS's thread pointers) is a 64-bit load from the CPU state. It becomes a SIT_LDENV op instead of ending the native-int region, provided the instruction has emitted no TCG op before reaching that point. native_int_check.S test 7 reads both in the middle of ALU code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
System-register reads that are plain 64-bit CPU-state fields (no access check, read function, constant or I/O flag) become a native-int load from the CPU state instead of ending the region. At EL0 that means TPIDR_EL0 and TPIDRRO_EL0, which iOS reads on every TLS access. The SIT op is used only if the instruction has emitted no TCG op before that point; writes are unchanged.
Testing: native_int_check.S test 7 reads both registers in the middle of ALU code, after an EL0 MSR TPIDR_EL0 and with TPIDRRO_EL0 set at EL1. run-a13-tests.py passes 41/41 on an M1 macOS build.
🤖 Generated with Claude Code