Statically recompile an x64 CPU leaf function and verify both branches #23
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T09:33:21Z.
Build a source-owned AMD64 fixture with MASM and read the exported function's machine code from its PE runtime-function interval. Translate the supported encodings to C++ offline, then use MSVC to compile and link a separate x64 DLL. CMake builds the translation from the linked input on each relevant change.
The Windows differential test compares returns, output writes and adjacent guard words for 263 inputs. Five inputs take the below-threshold branch and 258 take the other branch. All 263 inputs distinguish the separately assembled and translated inverted branch. Decoder controls exercise unsupported and truncated instructions, invalid targets and a missing return.
Local checks:
ctest --preset dev --no-tests=error -R '^cpu_leaf_aot_branches$' -Vpassed.ctest --preset dev --no-tests=error -E '_hardware$'completed with 35 passes and one WARP wave64 capability skip. The PE intake regression now clears the optional shell architecture hint and checks the native architecture through Windows. README and experiment notes include scope and reproduction commands.Refs #22 for the next direct-call experiment.