Skip to content

Complete ARM64 LSE atomic memory semantics across execution backends - #552

Merged
gmh5225 merged 2 commits into
devfrom
codex/aarch64-lse-atomics
Oct 5, 2026
Merged

gmh5225 merged 2 commits into
devfrom
codex/aarch64-lse-atomics

Conversation

@gmh5225

@gmh5225 gmh5225 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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:

  • Complete ARM64 memory suite: 1,856 pass, 4,008 platform skips, zero failures. This includes all 168 encodings modifying executable aliases within one run.
  • Complete Windows process suite: 241 pass, 365 platform skips; the newly registered atomic process regression additionally passes against every field of 1,100 original native Windows ARM64 records, normalizing only code/data placement. Original artifact: https://github.com/NeverSight/NeverD/actions/runs/37362062927 . The program completed successfully; its initial validator rejected the newly discovered read-fault classification, which is corrected in this PR.
  • Unicorn-disabled native KVM RAM suite: 569 pass, 1,282 platform skips; 244 parser/documentation/capability tests pass.
  • LLVM formatting, capability manifest and all 264 localized Markdown checks pass. CPU, architecture and testing documentation is synchronized in 11 languages.

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.

@gmh5225
gmh5225 marked this pull request as ready for review October 5, 2026 19:53
@gmh5225
gmh5225 merged commit 3ef8600 into dev Oct 5, 2026
2 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants