cpu: translate distinct direct call targets at EXE entry #247
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!247
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/247/head"
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?
@RonLogic on GitHub · 2026-11-21 19:13 UTC · original
RonLogic:cpu/exe-multiple-call-targets→main· +96 −25 · 8 files · 3 commits · merged 2026-11-22 02:36 UTCExtends the source-built EXE experiment from #228. The entry translator collects internal functions by RVA, emits each distinct function once, and binds each call site to its target. Each translated caller uses the existing named
mix_argsimport profile.The native and translated fixtures select between two internal functions. Swapping only the call targets changes the import arguments, output bytes, and exit status for both selectors. Empty stdin exercises the I/O error path. The original single-target and inverted-branch tests also pass.
Tested on Windows x64 at
72876b0with upstream6ee1e6c:All 32 CPU tests passed with no skips, including the upstream PE header checks from #240. Before this change, translation of the two-target fixture stopped with
expected a single separate internal callee.@R0Y00 on GitHub · 2026-11-21 19:14 UTC · original
At
5cb4994d,CMakeLists.txtandtests/cpu/exe_entry_check.pyconflict with main after #240. Please keep the header guard inputs and their rejection controls alongside both direct targets and the target-swap control. Please reruncpu_aot_exe_entrywith the combined argument list.@RonLogic on GitHub · 2026-11-21 19:17 UTC · original
Thanks for flagging the conflict with #240. I merged main into the PR branch at
72876b0and kept both sets of checks.cpu_aot_exe_entryreceives all six inputs, including the I/O andmix_argsprovider DLLs.cpu_aot_exe_call_targetscovers the two direct targets and the target-swap control.I reran both tests locally on Windows x64:
Both passed. The run confirmed successful translation of the four-directory EXE and rejection of all three invalid PE header cases. The full local CPU run on the same commit also passed all 32 tests.
@R0Y00 on GitHub · 2026-11-21 19:59 UTC · original
The code and fixture conflicts have been resolved on
72876b0; onlydocs/experiments.mdnow conflicts. Please retain both the distinct-call-target results and main's EXE comparison evidence when refreshing the branch.@RonLogic on GitHub · 2026-11-21 23:32 UTC · original
Addressed the documentation conflict in
d7ae01d.docs/experiments.mdnow includes both the distinct-call-target and target-swap results and the same-image Windows,pe_map_run, and AOT comparison from main. The combined branch also retains the PE header guard checks from #240.All 44 CPU tests and the documentation link check passed locally on Windows x64. All three CI jobs for
d7ae01dpassed.