cpu: translate the blast decoder and dispatch its callbacks #461

Manually merged
github merged 1 commit from gh-pr/461/head into gh-pr/461/base 2026-11-26 21:53:41 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-22 05:11 UTC · original
R0Y00:codex/blast-aot → main · +337 −12 · 9 files · 1 commits · merged 2026-11-22 05:16 UTC

Refs #459, #317. Translate the linked scalar x64 blast 1.3 export and its reachable routines from the reference PE to C++. Bind the callback actually loaded from the guest state to the caller-provided input or output function. Model the decoder's single nonlocal recovery point and data relocations. No pending PR dependencies.

The original reader uses the native codec. The pe_map child maps all three original modules individually. The AOT reader and decoder use the generated code and native callback adapter; import checks exclude the native decoder. A host callback refusal control checks contexts, byte content and the decoder's return 1.

Local x64 Windows, MSVC 19.51, head 219f289. Built archive_all_lifted, archive_reader_lifted and pe_map:

ctest --preset dev --no-tests=error -R '^cpu_native_archive_' --output-on-failure
ctest --preset release --no-tests=error -R '^cpu_native_archive_' --output-on-failure

Both presets passed 2/2. Two complete records emitted 26 bytes and exited 0. Truncating record two returned 4 then 0 at the input callback, took longjmp and delivered 1 tentative byte to the final output callback; stdout retained only the first 13 bytes, completed count 1, exit 2. Both runs allocated and freed twice. The documentation records the observed callback RVAs and scope.

**@⁠R0Y00** on GitHub · 2026-11-22 05:11 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/461) `R0Y00:codex/blast-aot` → `main` · +337 −12 · 9 files · 1 commits · merged 2026-11-22 05:16 UTC Refs #459, #317. Translate the linked scalar x64 blast 1.3 export and its reachable routines from the reference PE to C++. Bind the callback actually loaded from the guest state to the caller-provided input or output function. Model the decoder's single nonlocal recovery point and data relocations. No pending PR dependencies. The original reader uses the native codec. The pe_map child maps all three original modules individually. The AOT reader and decoder use the generated code and native callback adapter; import checks exclude the native decoder. A host callback refusal control checks contexts, byte content and the decoder's return 1. Local x64 Windows, MSVC 19.51, head 219f289. Built archive_all_lifted, archive_reader_lifted and pe_map: ```powershell ctest --preset dev --no-tests=error -R '^cpu_native_archive_' --output-on-failure ctest --preset release --no-tests=error -R '^cpu_native_archive_' --output-on-failure ``` Both presets passed 2/2. Two complete records emitted 26 bytes and exited 0. Truncating record two returned 4 then 0 at the input callback, took longjmp and delivered 1 tentative byte to the final output callback; stdout retained only the first 13 bytes, completed count 1, exit 2. Both runs allocated and freed twice. The documentation records the observed callback RVAs and scope.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:53:40 +00:00
github manually merged commit 219f2898c0 into gh-pr/461/base 2026-11-26 21:53:41 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.