cpu: cover eight scalar SSE translator semantics that no test observed #571
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/577"
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 Leyukaka on 2026-11-22T13:27:53Z.
Change
This closes eight coverage gaps in the scalar SSE/SSE2 translator,
tools/cpu_sse_aot.py(#269). Each was a mutation of the translator that passed everycpu_test onmain. Only thecpu_aot_scalar_floatfixture, its check and its CMake signature list change; the translator does not.tests/cpu/scalar_float.asmgainsprobe_ss(unsigned probe_ss(void* buffer, float a, float b)):movqloads a seed quadword whose high dword is nonzero, andmovapscopies the whole register;addsswith a memory operand,cvtsi2ssfrom a negative dword in memory, andmovssfrom memory are each followed by amovqstore of the low quadword, so the high dword they keep (or, for themovssload, clear) is observed;comiss xmm1, xmm2withjp,jaandjbreturns 0, 1, 2 or 3 for equal, unordered, above and below. TheSWAP_OPERANDSbuild compares in the other order.scalar_float_check.pyadds the signatureq:qff, two known answers (equal operands, and a NaN), and a differential case witha > bthat the swapped build must change.Verification
On
19f89a5(branch on079120c), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14:It passes. In the full suite, 274 of 275 tests pass. The exception is
pixel_aot_hardware, which fails the same way onmain(reported on #408) and does not involve the CPU translators.Each mutation was applied to
tools/cpu_sse_aot.pyone at a time, followed by a rebuild and the wholecpu_family. Onmain, everycpu_test passed for each one. A control that swapped theeandneconditions was caught bycpu_aot_scalar_float, so the run does detect a broken translator. On this branch, each mutation failscpu_aot_scalar_float:movapsaddsscvtsi2ssa(above) ignores ZFb(below) also takes ZFcomisstreats an unordered result as equalcvtsi2ssmovssload keeps the old high dwordmovssloadChecklist
AI-assisted.