cpu: cover ten AVX integer translator semantics that no test observed #597
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/603"
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-22T15:13:58Z.
Change
This closes ten coverage gaps in the VEX AVX packed-integer translator,
tools/cpu_avx_int_aot.py. Each was a one-line mutation of the translator that passed everycpu_test onmain. Only thecpu_aot_avx_int_regsfixture, its check and its CMake export list change; the translator does not.tests/cpu/avx_int_regs.asmgains ten exports. Each uses an immediate or register state that no existing export had:op_palignr_69: avpalignrcount above 32;op_mpsadbw_6: avmpsadbwwith block select 2;op_pshuflw_1b: avpshuflwselector with bit 4 set;op_psllq_imm_129: a shift count of81h;op_pextrw_reg_2,op_pextrd_reg_2andop_pinsrw_reg_3: lane indices that the existing exports never used;op_pinsrb_reg_upper: avpinsrbwhose source has a nonzero upper half;op_zeroupper_ymm1:vzeroupperobserved through ymm1;op_movdqu_load128: a VEX.128 load into a preloaded YMM register.The check computes each expected value with its existing Python model and compares native, lifted and reference results over the existing input pairs.
Verification
On
eebe999(branch on997518d), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14:Both pass (278 of 278 for the full suite).
Each mutation was applied to
tools/cpu_avx_int_aot.pyone at a time, followed by a rebuild and the wholecpu_family. Onmain, everycpu_test passed for each one. A control that madevpalignrignore its immediate was caught bycpu_aot_avx_int_regs, so the run does detect a broken translator. On this branch, each mutation failscpu_aot_avx_int_regs:vzeroupperclears only ymm0op_zeroupper_ymm1vpinsrbkeeps the source upper halfop_pinsrb_reg_uppervpextrdforces index bit 0op_pextrd_reg_2vpextrwforces index bit 2op_pextrw_reg_2vpinsrwdrops index bit 0op_pinsrw_reg_3vpshuflwdrops selector bit 4op_pshuflw_1bvmpsadbwaliases block select 2 to 3op_mpsadbw_6vpalignrmasks the count to 6 bitsop_palignr_69op_psllq_imm_129op_movdqu_load128Checklist
AI-assisted.