cpu: translate distinct direct call targets at EXE entry #244
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/247"
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 RonLogic on 2026-11-21T19:13:17Z.
Extends 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.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T19:14:55Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T19:17:06Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T19:59:34Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T23:32:19Z.
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.