Recompile an x64 direct call and verify argument, register and return behavior #25

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

@⁠R0Y00 on GitHub · 2026-11-21 09:43 UTC · original
R0Y00:codex/cpu-direct-call → main · +382 −34 · 10 files · 1 commits · merged 2026-11-21 09:44 UTC

Fixes #22. The tool resolves the signed E8 displacement from the linked caller, bounds both functions by their PE runtime-function records, and lifts their supported operations to separate C++ functions. MSVC builds a new x64 DLL. The fixture checks the linked direct target in the input and output images and rejects interior or recursive targets.

Windows CTest exercises 249 input pairs against both the full caller and the isolated callee, comparing native and translated results to an independent arithmetic reference. It compares two scalar arguments recorded through the output pointer, guarded writes, the return and physical RBX/RSI using a separate MASM probe. A modified return leaves the trace unchanged and differs on every input. A controlled register clobber is detected by the probe.

Local verification: ctest --preset dev --no-tests=error -E '_hardware$' completed with 36 passes and one wave64 capability skip. README and experiment notes describe the integer ABI, fixed frame layouts and reproduction commands. Refs #24 for a source-built import-call follow-up.

**@⁠R0Y00** on GitHub · 2026-11-21 09:43 UTC · [original](https://github.com/R0Y00/Xbox2Windows/pull/25) `R0Y00:codex/cpu-direct-call` → `main` · +382 −34 · 10 files · 1 commits · merged 2026-11-21 09:44 UTC Fixes #22. The tool resolves the signed E8 displacement from the linked caller, bounds both functions by their PE runtime-function records, and lifts their supported operations to separate C++ functions. MSVC builds a new x64 DLL. The fixture checks the linked direct target in the input and output images and rejects interior or recursive targets. Windows CTest exercises 249 input pairs against both the full caller and the isolated callee, comparing native and translated results to an independent arithmetic reference. It compares two scalar arguments recorded through the output pointer, guarded writes, the return and physical RBX/RSI using a separate MASM probe. A modified return leaves the trace unchanged and differs on every input. A controlled register clobber is detected by the probe. Local verification: `ctest --preset dev --no-tests=error -E '_hardware$'` completed with 36 passes and one wave64 capability skip. README and experiment notes describe the integer ABI, fixed frame layouts and reproduction commands. Refs #24 for a source-built import-call follow-up.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 21:22:52 +00:00
github manually merged commit 663d9761c2 into gh-pr/25/base 2026-11-26 21:22:53 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.