cpu: translate a multi-record archive reader from standard startup #459

Manually merged
github merged 2 commits from gh-pr/459/head into gh-pr/459/base 2026-11-26 21:53:32 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-22 04:55 UTC · original
R0Y00:codex/archive-program → main · +849 −9 · 12 files · 2 commits · merged 2026-11-22 05:02 UTC

Refs #317. Extends the existing EXE three-way milestone in #455 with a stock toolchain startup and a real decompressor. No upstream PR dependency.

Build the Zig 0.13.0 single-threaded Windows console program from source and translate its linked entry and record loop. Recognize bound linker import thunks, terminate the CFG at a declared noreturn import, and propagate the defined low register width through wide moves. Unknown imports remain rejected. A widened exit-status consumer must fail translation.

The same native provider calls blast 1.3 (unmodified upstream source from zlib v1.3.1, notices retained) on each runner. Two distinct records give 26 output bytes and exit 0. Truncating the second stream yields a callback delivering one tentative byte which must never be published. Expect 13 bytes, exit 2, one completed record, both allocations freed. The test checks each callback sequence independently of the native executable.

Windows x64, MSVC 19.51: after building archive_reader_lifted and pe_map, both commands passed (1/1 each):

ctest --preset dev --no-tests=error -R '^cpu_native_archive_reader$' -V
ctest --preset release --no-tests=error -R '^cpu_native_archive_reader$' --output-on-failure
**@⁠R0Y00** on GitHub · 2026-11-22 04:55 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/459) `R0Y00:codex/archive-program` → `main` · +849 −9 · 12 files · 2 commits · merged 2026-11-22 05:02 UTC Refs #317. Extends the existing EXE three-way milestone in #455 with a stock toolchain startup and a real decompressor. No upstream PR dependency. Build the Zig 0.13.0 single-threaded Windows console program from source and translate its linked entry and record loop. Recognize bound linker import thunks, terminate the CFG at a declared noreturn import, and propagate the defined low register width through wide moves. Unknown imports remain rejected. A widened exit-status consumer must fail translation. The same native provider calls blast 1.3 (unmodified upstream source from zlib v1.3.1, notices retained) on each runner. Two distinct records give 26 output bytes and exit 0. Truncating the second stream yields a callback delivering one tentative byte which must never be published. Expect 13 bytes, exit 2, one completed record, both allocations freed. The test checks each callback sequence independently of the native executable. Windows x64, MSVC 19.51: after building archive_reader_lifted and pe_map, both commands passed (1/1 each): ```powershell ctest --preset dev --no-tests=error -R '^cpu_native_archive_reader$' -V ctest --preset release --no-tests=error -R '^cpu_native_archive_reader$' --output-on-failure ```
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:53:30 +00:00
github manually merged commit 86ae65244c into gh-pr/459/base 2026-11-26 21:53:32 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.