mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 16:50:43 +00:00
Both engines refused SHLD and SHRD (0F A4/A5, 0F AC/AD) as illegal instructions. They are now declared in the x86 registry and run on the shared semantics for 16-, 32- and 64-bit register and memory destinations, with the count in an 8-bit immediate or in CL. - instructions.toml, x86_table.rs (generated), generate_x86.py, x86_decode.rs: the two operations and two operand encodings, rm_reg_imm and rm_reg_cl (ModRM destination, reg source, count). - x86_exec.rs: the destination is shifted with the vacated bits filled from the source register. The count is masked to five bits (six for 64-bit operands), a masked count of zero changes nothing, CF takes the last bit shifted out, ZF/SF/PF follow the result and OF is set only for a count of one. A 16-bit count above 16 is undefined in the SDM; the flags are kept and no test relies on the result. - cpu_known_answers.rs: eight SDM-derived cases move from refused to verified. - tests/x86: 72 assembled SHLD and SHRD instructions, with a bit-at-a-time reference in x86_integer.rs. A destination the reference marks undefined now skips the memory operand check too. - docs/cpu/instruction-registry.md, CHANGELOG.md. Nothing is lowered to ARM64. Signed-off-by: maridogolpeador <354308468+maridogolpeador@users.noreply.github.com>