cpu: lower legacy SSE2 cmpsd (scalar double compare, predicates 0..7) #1197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1204"
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 tedin7 on 2026-11-24T03:33:05Z.
What
Why
cmpsd is the scalar counterpart of the already lowered cmppd. The scalar compare writes only the low qword, so upper-bit preservation and exact NaN and signed-zero handling need explicit coverage. Delegating to the host compare keeps MXCSR behaviour exact without constant folding. The coverage table lists the cmpsd mnemonic only for the string compare, so this adds no SSE2 group form.
Tested
Linux (x86-64, venv with iced-x86, pefile):
Windows CI command: ctest --preset dev --no-tests=error -R '^cpu_aot_sse2_regs$' -V
The Windows MSVC/ML64 build and the cpu_aot_sse2_regs test were NOT run locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T03:52:30Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
a34ceea699ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:53:15Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T03:47:55Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
a34ceeaℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T04:50:28Z.
Windows Server 2025 verification (
56387003) — PASS (Debug + Release/O2)--preset dev) (2.34s build+test):cmake --build --preset dev -j 6 --target cpu_sse2_regs_original cpu_sse2_regs_original_lifted cpu_sse2_regs_altered_liftedctest --test-dir out\build\dev -R "^cpu_aot_sse2_regs$" --output-on-failure-> 1/1 passed (0 skipped, 1.04s)/O2(--preset release) (4.12s configure+build+test):cmake --preset release && cmake --build --preset release -j 6 --target cpu_sse2_regs_original cpu_sse2_regs_original_lifted cpu_sse2_regs_altered_liftedctest --test-dir out\build\release -R "^cpu_aot_sse2_regs$" --output-on-failure-> 1/1 passed (0 skipped, 1.03s)Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T03:52:30Z.
Code review location:
CMakeLists.txt; line 1563On the Windows build,
cpu_asm_fixture()links the native fixture throughtests/cpu/sse2_regs.def(CMakeLists.txt:976), but that file still contains only the original 57 exports. A repository-wide search finds no other export directives for the newop_cmpsd_*procedures, so the custom translation step now fails inexport_rva()withexpected one local export for op_cmpsd_0, preventing either lifted DLL from being generated and the differential test from running. Add all ten new names to the native.deffile as well.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T03:53:15Z.
Code review location:
CMakeLists.txt; line 1563Fixed in
56387003: the tenop_cmpsd_*names are now listed intests/cpu/sse2_regs.def, next to the existing exports. I checked it by readingexport_rva()usage and the.deflist only. The Windows build of this definition file was not run locally; CI will build it.