User Guide
242 x87 Floating-Point Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
Figure 6-3. x87 Status Word Register (FSW)
The bits i n the x87 status word are defined immediately below, starting with bit 0. The six exception
flags (IE, DE, ZE, OE, UE, PE) plus the stack fault (SF) flag are sticky bits. Once set by the processor,
such a bit remains set until software clears it. For details about the causes of x87 exceptions indicated
by bits 6–0, see “x87 Floating-Point Exception Causes” on page 279. For details about the masking of
x87 exceptions, see “x87 Floating-Point Exception Masking” on page 283.
Invalid-Operation Exception (IE). Bit 0. The processor sets this bit to 1 when an invalid-operation
exception occurs. These exceptions are caused by many types of errors, such as an invalid operand or
by stack faults. When a stack fault causes an IE exception, the stack fault (SF) exception bit is also set.
Denormalized-Operand Exception (DE). Bit 1. The processor sets this bit to 1 when one of the
source operands of an instruction is in denormalized form. (See “Denormalized (Tiny) Numbers” on
page 254.)
Zero-Divide Exception (ZE). Bit 2. The processor sets this bit to 1 when a non-zero number is
divided by zero.
1514131211109876543210
B
C
3
TOP
C
2
C
1
C
0
E
S
S
F
P
E
U
E
O
E
Z
E
D
E
I
E
Bits Mnemonic Description
15 B x87 Floating-Point Unit Busy
14 C3 Condition Code
13–11
TOP Top of Stack Pointer
000 = FPR0
111 = FPR7
10
C2 Condition Code
9
C1 Condition Code
8
C0 Condition Code
7
ES Exception Status
6
SF Stack Fault
Exception Flags
5
PE Precision Exception
4
UE Underflow Exception
3
OE Overflow Exception
2
ZE Zero-Divide Exception
1
DE Denormalized-Operand
Exception
0
IE Invalid-Operation Exception