Repository navigation
cpu: add SSE2 leaf AOT translator covering 23 forms - #609
Conversation
|
Verification of Unlike #602, where a vendor-dependent DPPS NaN case fails on Intel, the native/lifted/reference comparison here holds on Skylake. AI-assisted (Claude Code). |
|
I resolved the coverage-test conflict in 85c504d on your original branch and switched the fixture to its source-local coverage registration. The generated code now emits host LFENCE/MFENCE, and the aligned-buffer profile rejects misaligned displacements for full 128-bit memory operands. The existing unaligned qword controls are preserved. The docs spell out the aligned bases, private buffers and default MXCSR controls used by the fixture. Windows dev and /O2 each passed 1,168 native/lifted/reference comparisons across 57 exports, all three mutation witnesses, 69 unit rejection controls and 12 PE-patched controls. Form coverage and docs links passed. GitHub CI is running on this head. |
Change
tools/cpu_sse2_aot.py, a leaf AOT translator covering 23 of the 64 forms indocs/coverage/x64_zen2.tsvgroupSSE2, legacy encodings only:cmppd(all 8 imm8 predicates), packed convertscvtdq2pd/cvtdq2ps/cvtpd2dq/cvtpd2ps/cvtps2dq/cvtps2pd/cvttpd2dq/cvttps2dq,cvtpi2pd(m64 source),cvtsd2si(r32/r64),maxsd/minsd/sqrtsd,movapd/movdqa,movhpd/movlpd,movntdq/movntpd/movnti,lfence/mfence. Generated C++ uses a portableVec128lane model, no intrinsics.movdqaserves as the fixture's only transport form.cvtpd2pi,cvttpd2pi,movdq2q,movq2dquse MMX register operands andmaskmovdqustores through implicitDS:rdi.tests/cpu/sse2_regs.{asm,def}+sse2_regs_check.py, CTestcpu_aot_sse2_regs, coverage mapping intools/form_coverage.py/tests/form_coverage_check.py, and documentation indocs/experiments.md.Verification
ctest --preset dev --no-tests=error -R '^cpu_aot_sse2_regs$': passed (1,168 native/lifted/reference cases matched bit-for-bit across 57 exports; ALTER_IMM diverged on all 3 mutated exports, 28 cases each; output-mutation control caught)ctest --preset dev --no-tests=error -R '^cpu_': 112/112 passed.\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py: passed (SSE2 group 14 -> 37/64, total x64 Zen 2 549 -> 572/948).\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py: passedEvidence and follow-up
sdops are tested for destination upper-64 preservation the same way.maskmovdqu, unalignedmovapd/movdqa/movnt*faults (aligned moves lower to memcpy and accept any address), control flow or calls mixed with SSE2 state, nonvolatileXMM6..XMM15prologues, title CPU execution.