Repository navigation
Complete ARM64 LSE atomic memory semantics across execution backends - #552
Merged
Merged
Conversation
gmh5225
marked this pull request as ready for review
October 5, 2026 19:53
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.
ARM64 checked execution rejected LSE atomics used by locks and reference counts. Add shared admission and completion for CAS/CASP, SWP, arithmetic/bitwise atomics and signed/unsigned min/max across all 168 baseline width/ordering encodings. KVM, WHP, checked Unicorn and software Unicorn share the same physical reservation, fault and transactional publication rules. LSE and exclusive writes now use one commit helper. Checked profiles select FEAT_LSE2 alignment; software Unicorn preserves natural alignment. Baseline MRS/MSR NZCV transfers are also admitted.
Original Windows ARM64 execution exposed an observable distinction: inaccessible operands report read access violations, while read-only operands report write violations. The shared preflight checks read before write, including failed comparisons. Failed CAS selects Arm's permitted old-value writeback; observer cancellation and synchronous faults publish no partial register/RAM effects. Undefined pair encodings fail before access. Executable aliases are retired before the same run reaches modified code. Cooperative RAM semantics do not claim parallel SMP or atomic MMIO support.
The Unicorn submodule points to master merge b2efe647e25a71eea56b7a3e8d19af39033437d4 (NeverSight/unicorn#12), fixing narrow signed min/max operands in the shared TCG fallback. Direct C API regression coverage reproduced 384 wrong results before the fix and passes 1,536 executions afterward.
Validation:
Native ARM64 KVM/WHP execution remains unavailable locally; hosted native Windows CPU observations are separate evidence. Plans and diagnostic artifacts are excluded.
The corrected native collector also passed on the latest PR head: Windows ARM64 job 111950150352. The downloaded artifact contains 1,100 validated native records; all 11 normalized group digests match the committed regression data, with a clean source tree and matching source and program hashes.