cpu: translate two named DLL imports from an EXE caller #253
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/256"
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:29:44Z.
Extends #249 with a source-built EXE whose internal caller passes the result of
cpu_import_provider.dll!mix_argstocpu_exe_second_provider.dll!accumulate_args. The AOT entry point accepts the second DLL and symbol through an explicit--provider DLL SYMBOLbinding and verifies the import against that DLL. The existing DLL caller entry point keeps its single-slot policy.On both selector bytes, the native Windows process,
pe_map_runchild, and translated process match an independent reference for both providers' arguments, both output words, and the exit code. Removing the mapping for the second DLL stops before entry. The AOT test checks both an omitted binding and a binding to the wrong DLL. Both report the missing DLL and symbol.This change uses
lift_bodyand the EXE fixture shared with #247 and #253. It is based directly on #249 and does not depend on those PRs.Before this change, the source-built EXE ran on Windows and the translator stopped at
call to a second IAT slot at RVA 0x1096. At72c5a79on7233cec, all 34 CPU tests passed locally on Windows x64 with no skips.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T19:58:03Z.
The new
--provider DLL SYMBOLpath copies the accepted export name directly into the generated C++ declaration and call. PE export names can contain punctuation or be C++ keywords; a matching export such astrace-valuewould produce uncompilable output after translation reported success. Please reject unsupported symbol spellings before emission (including keywords and collisions with generated names), or assign a separate valid binding. Add a focused rejection control alongside the two-provider comparison.Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-21T23:32:15Z.
Addressed the provider-symbol feedback in
2d7323c, included in40bf87d. The translator now rejects unsupported--providersymbol spellings before emitting C++, includingtrace-value, keywords, reserved names, names that collide with generated identifiers, and duplicate bindings. I added 12 rejection cases alongside the native Windows,pe_map_run, and AOT two-provider comparison.All 43 CPU tests passed locally on Windows x64. All three CI jobs for
40bf87dpassed.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T06:28:19Z.
Thanks for addressing the provider names. I test-merged
40bf87dagainst current main. The remaining conflicts are in CMakeLists.txt, tests/cpu/exe_entry.asm, tests/cpu/mapped_exe_chain_check.py, tools/cpu_call_aot.py and tools/cpu_exe_aot.py. This branch has maintainer edits disabled. Please enable edits if you would like us to integrate it, or reconcile the two-provider fixture with the current EXE path and keep both provider-symbol rejection and the existing three-way comparisons.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T08:14:58Z.
I integrated your original commits on the maintainer branch in #502. The two-provider comparison and the four existing EXE comparisons all passed locally on Windows. The integration PR retains the original commit history and is waiting for the required checks.