mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-26 04:19:52 +00:00
LAHF (9F) and SAHF (9E) are declared in the instruction registry and run through the shared semantics in both engines (Intel SDM Vol. 2A LAHF, Vol. 2B SAHF): LAHF writes AH = SF:ZF:0:AF:0:PF:1:CF and keeps the rest of RAX, SAHF loads SF, ZF, AF, PF and CF from AH and leaves OF unchanged. With both implemented, guest CPUID reports leaf 8000_0001h ECX bit 0. The four known answers recorded as refused by #155 are verified, with twelve more cases. Both instructions join the clang-assembled integer fixtures and the independent bit-level reference, and cpu_features.rs moves LAHF/SAHF from the refused witnesses to the reported features. Signed-off-by: Bartosz Szczepański <bartosz.szczepanski@hotmail.com>