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

Merged
R0Y00 merged 1 commit from upstream-pr/25 into main 2026-11-21 09:44:40 +00:00
R0Y00 commented 2026-11-21 09:43:14 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T09:43:14Z.


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.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6527225647 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/25). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-21T09:43:14Z. --- 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.
upstream-sync closed this pull request 2026-11-24 06:41:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!25
No description provided.