cpu: bind synchronous stack outputs through ordinary imports #895

Manually merged
github merged 3 commits from gh-pr/895/head into gh-pr/895/base 2026-11-26 22:26:35 +00:00
Owner

@⁠R0Y00 on GitHub · 2026-11-23 16:18 UTC · original
R0Y00:codex/cpu-stack-output-import → main · +244 −18 · 8 files · 3 commits · merged 2026-11-23 16:59 UTC

Refs #870 and #317. Built on the fixed-frame proof in #889.

Allow an ordinary import binding to declare a synchronous stack output using --stack-output ARG WIDTH. Verify the frame-relative LEA, bound and align the output range, and mark only the declared bytes initialized after the call. The provider must fully write that range, without reading its initial contents or retaining the address. Bindings can declare up to four register arguments and up to eight defined return bytes.

The source-built fixture compares RBP- and RSP-relative output slots, with providers returning a 32-bit status and void. Six controls verify the refusal boundaries.

Windows x64, MSVC 19.51, Release:

ctest --preset release --no-tests=error -R '^cpu_aot_(stack_output|stack_frames|direct_calls|call_entries|import_calls)$' --output-on-failure

5/5 passed. Documentation links, bidi controls and git diff --check passed.

**@⁠R0Y00** on GitHub · 2026-11-23 16:18 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/895) `R0Y00:codex/cpu-stack-output-import` → `main` · +244 −18 · 8 files · 3 commits · merged 2026-11-23 16:59 UTC Refs #870 and #317. Built on the fixed-frame proof in #889. Allow an ordinary import binding to declare a synchronous stack output using `--stack-output ARG WIDTH`. Verify the frame-relative LEA, bound and align the output range, and mark only the declared bytes initialized after the call. The provider must fully write that range, without reading its initial contents or retaining the address. Bindings can declare up to four register arguments and up to eight defined return bytes. The source-built fixture compares RBP- and RSP-relative output slots, with providers returning a 32-bit status and void. Six controls verify the refusal boundaries. Windows x64, MSVC 19.51, Release: ```powershell ctest --preset release --no-tests=error -R '^cpu_aot_(stack_output|stack_frames|direct_calls|call_entries|import_calls)$' --output-on-failure ``` 5/5 passed. Documentation links, bidi controls and `git diff --check` passed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:26:33 +00:00
github manually merged commit 431db89659 into gh-pr/895/base 2026-11-26 22:26:35 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 16:44 UTC · original

The first Windows runs after retargeting to main stopped while generating blast_lifted.cpp. The archive adapter still called CodecFrame without the new control-flow edges. Commit 431db89 passes the already computed edges through. On Windows x64, Debug and Release each passed all six checks: cpu_native_archive_blast plus cpu_aot_stack_output, stack_frames, direct_calls, call_entries and import_calls. Fresh CI is running for the pushed candidate.

**@⁠R0Y00** on GitHub · 2026-11-23 16:44 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/895#issuecomment-7107600060) The first Windows runs after retargeting to main stopped while generating blast_lifted.cpp. The archive adapter still called CodecFrame without the new control-flow edges. Commit 431db89 passes the already computed edges through. On Windows x64, Debug and Release each passed all six checks: cpu_native_archive_blast plus cpu_aot_stack_output, stack_frames, direct_calls, call_entries and import_calls. Fresh CI is running for the pushed candidate.
This discussion has been locked. Commenting is limited to contributors.
No description provided.