cpu: lower MASKMOVQ and MASKMOVDQU instructions #1079
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1086"
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 Ammmae0x on 2026-11-24T00:42:42Z.
Change
Extends the legacy SSE/MMX AOT translator and the MASM fixture to lift and verify
maskmovq(SSE) andmaskmovdqu(SSE2), completingSSE2form coverage alongside the existingSSE/MMXleaf slice:MASKMOVQ_RDI_MM_MMandMASKMOVDQU_RDI_XMM_XMMviaop_maskmovqandop_maskmovdquhelpers writing only bytes with(mask[i] & 0x80) != 0understd::atomic_signal_fence(std::memory_order_seq_cst).MOV_R64_RM64/MOV_RM64_R64register-only tracking for nonvolatilerdisave to a volatile scratch GPR (rax/r9/r10/r11),mov rdi, r8, and restoration beforeret, rejecting unrestoredrdi, unsaved writes, non-r8targets,67heditargets, segment overrides, andmovqreads of registers holding savedrdi.op_maskmovq,op_maskmovdqu, andop_maskmov_pipelineintests/cpu/sse_mmx.asm,tests/cpu/sse_mmx.def, andCMakeLists.txt, plusALTER_IMMsource/mask swaps onop_maskmovqandop_maskmovdqu,VirtualAlloc/VirtualProtectk=8/k=16page-abutting checks and native partial-edge observations, VEXvmaskmovdqurejection, and ABI/state/PE-patched rejection controls intests/cpu/sse_mmx_check.py.docs/experiments.md.Verification
All checks ran after rebasing onto
upstream/main(f7c9f57, branch commitc738c7e):ctest --preset dev -N:Total Tests: 612(0 dropped tests).cmake --build --preset dev --target cpu_sse_mmx_original cpu_sse_mmx_original_lifted cpu_sse_mmx_altered cpu_sse_mmx_altered_lifted: passed (0 errors, 0 warnings).cmake --build --preset release --target cpu_sse_mmx_original cpu_sse_mmx_original_lifted cpu_sse_mmx_altered cpu_sse_mmx_altered_lifted: passed (0 errors, 0 warnings).ctest --preset dev --no-tests=error -R "^cpu_aot_sse_mmx$" -V:1 passed, 0 failed, 0 skipped(1/1 passed in 0.73s; 339 native/lifted/reference cases across 21 exports matched bit-for-bit, 24k=8/k=16page-abutting checks, 54 native partial-edge observations,ALTER_IMMdivergence on 6 exports[3, 3, 7, 7, 22, 30], output mutation control, 9 alternate-encoding checks, 81 unit rejections, 16 PE-patched rejections).ctest --preset release --no-tests=error -R "^cpu_aot_sse_mmx$" -V:1 passed, 0 failed, 0 skipped(1/1 passed in 0.71s; identical case/control counts under/O2)..\out\pe-env\Scripts\python.exe -B tests/form_coverage_check.py: passed (form coverage checks passed)..\out\pe-env\Scripts\python.exe -B tests/docs_links_check.py: passed (Self-test passed. Checked 15 Markdown files and 242 links.)..\out\pe-env\Scripts\python.exe -B tests/bidi_controls_check.py: passed (Self-test passed. Checked 917 tracked source, script and build/CI files: no bidirectional controls.).Evidence and follow-up
All fixtures are original MASM source in
tests/cpu/sse_mmx.asmand synthetic unit/PE-patched controls intests/cpu/sse_mmx_check.py. For this portable first slice,[rdi..rdi+7](maskmovq) or[rdi..rdi+15](maskmovdqu) must be writable ordinary memory; non-temporal cache hints, implementation-dependent partial-page or all-zero-mask fault behavior, and non-r8destinations remain outside this leaf profile.Checklist
AI-assisted.