cpu: lower single-element string transfers without REP #594
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/600"
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 Joacoorandom on 2026-11-22T15:02:17Z.
Change
Accept single-element MOVSB/MOVSW/MOVSD/MOVSQ and STOSB/STOSW/STOSD/STOSQ in the control-flow CPU lifter. Without REP, execute exactly one transfer and preserve RCX, including when RCX is zero. Both forward and backward directions use the existing direction proof; arithmetic flags and nonvolatile registers retain their contracts.
Depends on #599 and #598; #597 is merged. Rebased the three remaining increments on current
main: fill461a4f5, direction2b74c4c, and single-element05e4a0a. Review the single-element increment in05e4a0a. The PR diff still includes #598 and #599 until those dependencies merge. Original Windows verification predates the rebase.Verification
Commit
b4e55cb. Native Windows 11 26300.9974, MSVC/ML64 19.44.35230, Python 3.12.8.All six selected tests passed. The cumulative string comparison now covers thirty-five exports and 13,656 native/AOT/reference cases, plus 63 access-violation comparisons, including /O2. This increment adds sixteen single-element exports across copy/store, four widths and two directions. Counts 0/1/2/3/7/16/31 must remain unchanged; the operation still executes at zero. Full buffers and trace guards, final pointers, carry flags and physical RSI/RDI/DF are checked. All rejection controls and three compiled semantic mutations remain effective.
Linux checks passed:
Evidence and follow-up
Original MIT fixtures and byte-array reference, reusing the earlier comparison and harness. No proprietary inputs or external project source. Address-size overrides, segment prefixes, REPNE, LODS, SCAS and CMPS remain rejected in this profile. No exception-resumption, native REP fault-register, concurrency or throughput equivalence is claimed. README and experiment notes updated. AI-assisted.
Checklist
Conflict-resolution update (2026-11-22)
Rebased onto current upstream
mainafter #597 was merged, preserving each increment in stack order. Local checks passed:form_coverage_check.py,docs_links_check.py,bidi_controls_check.py,cpu/lower_prefixes_check.py, plusgit diff --check. Previous native-Windows results describe the original commits; the official Windows CI on the new head provides independent revalidation. No workflow or unrelated files were edited.Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T17:34:43Z.
Verification of
b4e55cbon an Intel Core i7-6820HQ (Skylake), Windows 11 26100.9168, MSVC/ML64 19.52.37029,devpreset. I tested this head separately from the rest of the series, see #598:Like #598, this head no longer merges cleanly with
mainnow that #597 has landed.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-22T19:17:31Z.
Re-checked the rebased head
05e4a0aon the same Skylake host.ctest --preset dev --no-tests=error -R "^cpu_" -j 4reports 100% passed (118/118). Now that #599 has landed,git merge-treereports a conflict withmainatedc2e54again, so the branch will need one more update.AI-assisted (Claude Code).