cpu: translate nested direct calls from EXE entry #250

Merged
RonLogic merged 1 commit from upstream-pr/253 into main 2026-11-22 11:33:24 +00:00
RonLogic commented 2026-11-21 19:23:53 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T19:23:53Z.


Extends the source-built EXE translator to follow nested direct calls by RVA and emit each callee before its callers. The public diff contains only this change on top of main, with #247 and #256 already merged. The traversal reuses the existing named-provider validation and preserves the returning entry and native termination wrapper from #394. Recursive call graphs are rejected.

The fixture adjusts one argument before calling the existing mix_args wrapper. The control bypasses that wrapper and calls the DLL directly. For both selector bytes, bypassing changes the import arguments, output bytes, and process exit code. Each translated process matches its native Windows counterpart.

Verified at 9bd9062 on a0c5b7b: all 107 CPU tests passed locally on Windows x64 with no skips. This includes the nested-call control, two direct targets, two named providers, framed and mapped EXE cases, and native termination. The Markdown link check also passed. A trial merge with 0a9f4b4 completed without conflicts.

ctest --test-dir out/build/followup --no-tests=error -R '^cpu_' -V
python -B tests/docs_links_check.py
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6533359316 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/253). Originally posted by [RonLogic](https://github.com/RonLogic) on 2026-11-21T19:23:53Z. --- Extends the source-built EXE translator to follow nested direct calls by RVA and emit each callee before its callers. The public diff contains only this change on top of main, with #247 and #256 already merged. The traversal reuses the existing named-provider validation and preserves the returning entry and native termination wrapper from #394. Recursive call graphs are rejected. The fixture adjusts one argument before calling the existing `mix_args` wrapper. The control bypasses that wrapper and calls the DLL directly. For both selector bytes, bypassing changes the import arguments, output bytes, and process exit code. Each translated process matches its native Windows counterpart. Verified at `9bd9062` on `a0c5b7b`: all 107 CPU tests passed locally on Windows x64 with no skips. This includes the nested-call control, two direct targets, two named providers, framed and mapped EXE cases, and native termination. The Markdown link check also passed. A trial merge with `0a9f4b4` completed without conflicts. ```powershell ctest --test-dir out/build/followup --no-tests=error -R '^cpu_' -V python -B tests/docs_links_check.py ```
upstream-sync closed this pull request 2026-11-24 06:42:03 +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!250
No description provided.