x86 Assembly Language Reference Manual

Flag Control (EFLAG) Instructions

The status flag control instructions operate on the bits in the %eflags register.

Table 3–10 Flag Control Instructions

Solaris Mnemonic 

Intel/AMD Mnemonic 

Description 

Notes 

clc

CLC

clear carry flag 

 

cld

CLD

clear direction flag 

 

cli

CLI

clear interrupt flag 

 

cmc

CMC

complement carry flag 

 

lahf

LAHF

load flags into %ah register

 

popfw

POPF

pop %eflags from stack

 

popf{lq}

POPFL

pop %eflags from stack

popfq valid only under -xarch=amd64

pushfw

PUSHF

push %eflags onto stack

 

pushf{lq}

PUSHFL

push %eflags onto stack

pushfq valid only under -xarch=amd64

sahf

SAHF

store %ah register into flags

 

stc

STC

set carry flag 

 

std

STD

set direction flag 

 

sti

STI

set interrupt flag