cpu: recompile a multi-unit UCRT console program from its PE entry #449
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/455"
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-22T04:37:43Z.
Refs #317. This exercises the entry-to-exit CPU translation path with a source-built multi-unit Windows console program and an actual UCRT dependency.
The MASM entry reads stdin, calls a separately compiled C++ CRC step, and writes and flushes stdout. The first translation refusal was the indirect getchar import at RVA 0x103d. Bind named UCRT IAT slots with explicit argument and return widths. Unknown providers fail translation.
Windows verification on
f1d1492(MSVC 19.51):ctest --preset dev --no-tests=error -R '^(cpu_aot_direct_calls|cpu_native_(crc_line|exe_image_chain))$' --output-on-failurepassed 3/3.ctest --preset release --no-tests=error -R '^cpu_native_crc_line$' --output-on-failurepassed 1/1.Compare stdout bytes, stderr and exit status from native Windows, pe_map on the same image and the generated executable. The standard vector prints CBF43926 with CRLF and exits 0. An empty stream exits 1. A read-only stdout handle exits 2 and leaves the file unchanged. Changing the compiled polynomial changes the expected standard vector to E3069283 on all three runners. Cases also exercise CRLF input, missing newline, an empty line and a 13,000-byte line.