Repository navigation
[AUTOMATED] fix(sleigh): set the reservation in PowerPC lwarx - #1259
Merged
Merged
Conversation
phix33
force-pushed
the
fix/powerpc-lwarx-reservation
branch
2 times, most recently
from
October 26, 2026 07:52
24d7cf1 to
d65607f
Compare
stwcx. and stdcx. store only while RESERVE is set, but lwarx had its reservation setup commented out (with a misspelled register name). Every lwarx/stwcx. retry loop therefore decompiled as a loop gated on an uninitialized reserve flag. The generic constructor wins over the ISA one for ordinary encodings, so this affected all 23 PowerPC languages, including the ISA languages that already set the reservation in their own lwarx. Set RESERVE, RESERVE_LENGTH and RESERVE_ADDRESS as the ISA constructor does; the loop now decompiles to its single conditional store. Adds a stage case for the generic 32-bit loop (0/2 without the fix, 2/2 with it) and a kuna-sleigh test that lwarx writes all three reservation registers on generic, e500 and ISA languages. Correctness repair without an option; stages baseline re-recorded for the two new assertions only.
phix33
force-pushed
the
fix/powerpc-lwarx-reservation
branch
from
October 26, 2026 09:41
d65607f to
437c0a6
Compare
…nly subset) (Noelo-Lab#1286) A ported name-only Swift demangler subset (parse-or-passthrough: context chains, functions with argument labels, accessors, init/deinit, six global markers; punycode/witnesses/thunks/specializations pass through byte-identical; the one ambiguous production refused). Wired beside the Rust/Itanium/MSVC demanglers behind the Swift name-shape test; swiftdemangle on|off default on, loadtime env bridge. Crate alternatives rejected on evidence (cmake C++ build + rustc floor; unvetted 0.x). Corpus hand-derived from the Swift ABI mangling spec with per-case citations. E2e synthesizes an ELF with genuine mangled names (no Swift toolchain exists here or on CI - the vendored-fixture follow-up is named in the spec prose). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WoTv7T2Ep5hmbZcyYSMk1g
… export (Noelo-Lab#1290) * Add --stream-layout address: streamed progress over a reproducible export `decompile-project --stream --stream-layout address` runs the non-stream export unchanged (same serial or pooled decompile, plan, structure naming, merge and artifacts) and reports on it while it runs: `.streaming` on its clock, a running README, and `index.jsonl` as a per-function feed in completion order with null `.c` spans. At the end the four artifacts are the non-stream export's byte for byte, `index.jsonl` is replaced by the address-ordered index of that `.c`, and `.streaming` is removed, so the folder does not depend on --jobs N wherever the non-stream export does not. The default layout (`decompile`) is unchanged. Hooks: jobs::PoolWatch on the pool's planned first pass, a `landed` callback on the serial and callee-first loops, and decompile_project::ExportWatch around the export. Measured on /usr/bin/ssh (1,090 functions): address-layout runs at --jobs 2 and 4 and a non-stream --jobs 4 run leave identical folders apart from index.jsonl; CPU time of the two --jobs 4 arms is within noise. [AUTOMATED] Authored by an agent. * Rename --stream-layout address to --progress Progress reporting and incremental artifacts are two separate things; `--stream` bundles both, and only the incremental `.c` costs reproducibility. `--progress` is now its own flag: the status file and the index.jsonl feed over an ordinary export written at the end. With both flags the export is the streamed one. `--progress` accepts `--assert` under the non-stream export's rules. `--stream-layout` is removed. [AUTOMATED] Authored by an agent.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTixHX2E5cBwneY5aW
mahaloz
added a commit
to thotypous/kuna
that referenced
this pull request
Oct 29, 2026
…ports Noelo-Lab#1291) Resolve the stage-corpus count (591 = 83 datatests + 508 stages) and keep both lift-and-flow spec paragraphs. Re-record the stages baseline on the merged tree (3229/3229). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013BBaWTixHX2E5cBwneY5aW
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.
On every PowerPC language, a
lwarx/stwcx.retry loop decompiles as a loopinstead of as one atomic update. In the output below,
v1is never assigned,so the store and the loop exit both depend on an uninitialized value.
With the fix this is
*a0 = storeWordConditionalIndexed(*a0 + 1,0,a0);.Compiled
__atomic_fetch_add, compare-exchange, exchange and spinlock codeshows the same pattern.
Fix
stwcx.andstdcx.skip their store whileRESERVEis 0, butlwarxinppc_instructions.sinchad its reservation setup commented out, with amisspelled register name. It now sets
RESERVE,RESERVE_LENGTHandRESERVE_ADDRESS, as the ISAlwarxdoes.chosen over the ISA one in the ISA languages too. All 23 PowerPC languages
were affected, and all now produce the single conditional store.
Tests
tests/stages/kuna-ppc-lwarx-reservation.xml: the loop above onPowerPC:BE:32:default. It passes 0/2 without the fix and 2/2 with it.kuna-sleighppc_lwarx_reservation:lwarxwrites all three reservationregisters on generic 32- and 64-bit, e500 and ISA languages. It fails on the
unpatched specs.