Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
---|---|---|---|---|---|---|
NP 0F 01 CA CLAC | zo | Valid | Valid | Valid | smap | Clear the AC flag (alignment checking) in EFLAGS . |
Encoding
Encoding | Operand |
---|---|
zo | None |
Description
The CLAC
instruction clears the AC
flag (alignment checking) in the EFLAGS
register.
This instruction can only be executed when CPL
is 0
(i.e. ring 0). Attempts to execute this instruction in less privileged rings will cause a #UD
exception to be raised.
Operation
public void CLAC()
{
EFLAGS.AC = 0;
}
Flags Affected
CF
(carry flag)- Unmodified.
PF
(parity flag)- Unmodified.
AF
(auxiliary flag)- Unmodified.
ZF
(zero flag)- Unmodified.
SF
(sign flag)- Unmodified.
OF
(overflow flag)- Unmodified.
AC
(alignment check flag)- Cleared.
Exceptions
Real-Address Mode
#UD
- If the
LOCK
- prefix is used.
Virtual-8086 Mode
#UD
- If in Virtual-8086 Mode.
Protected Mode
#UD
- If
CPL
is greater than0
. - If the
LOCK
prefix is used.
Compatibility Mode
#UD
- If
CPL
is greater than0
. - If the
LOCK
prefix is used.
Long Mode
#UD
- If
CPL
is greater than0
. - If the
LOCK
prefix is used.