-
Notifications
You must be signed in to change notification settings - Fork 98
LAHF
Henk-Jan Lebbink edited this page Jun 5, 2018
·
13 revisions
LAHF — Load Status Flags into AH Register
Opcode | Instruction | Op/ En | 64-Bit Mode | Compat/ Leg Mode | Description |
9F | LAHF | ZO | Invalid* | Valid | Load: AH ← EFLAGS(SF:ZF:0:AF:0:PF:1:CF). |
*Valid in specific steppings. See Description section.
Op/En | Operand 1 | Operand 2 | Operand 3 | Operand 4 |
ZO | NA | NA | NA | NA |
This instruction executes as described above in compatibility mode and legacy mode. It is valid in 64-bit mode only if CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1.
IF 64-Bit Mode
THEN
IF CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 1;
THEN AH ← RFLAGS(SF:ZF:0:AF:0:PF:1:CF);
ELSE #UD;
FI;
ELSE
AH ← EFLAGS(SF:ZF:0:AF:0:PF:1:CF);
FI;
None. The state of the flags in the EFLAGS register is not affected.
#UD If the LOCK prefix is used.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
Same exceptions as in protected mode.
#UD If CPUID.80000001H:ECX.LAHF-SAHF[bit 0] = 0. If the LOCK prefix is used.
Source: Intel® Architecture Software Developer's Manual (May 2018)
Generated: 5-6-2018