User Guide

250 x87 Floating-Point Programming
AMD64 Technology 24592—Rev. 3.15—November 2009
“Instruction Prefixes” on page 277 describes the use of address-size instruction overrides by 64-bit
media instructions.
Register Operands. Most x87 floating-point instructions can read source operands from and write
results to x87 registers. Most instructions access the ST(0)–ST(7) register stack. For a few instructions,
the register types also include the x 87 control word register, the x87 status word register, and (for
FSTSW and FNSTSW) the AX general-purpose register.
6.3.2 Data Types
Figure 6-7 shows register images of the x87 data types. These include three scalar floating-point
formats (80-bit double-extended-precision, 64-bit double-precision, and 32-bit single-precision), three
scalar signed-integer formats (quadword, doubleword, and word), and an 80-bit packed binary-coded
decimal (BCD) format. Although Figure 6-7 shows register images of the data types, the three signed-
integer data types can exist only in memory. All data types are converted into an 80-bit format when
they are loaded into an x87 register.
Figure 6-7. x87 Data Types
s
513-317.eps
63
31
31
22
15 0
0
0
Quadword
Doubleword
Word
s
s
s
Signed Integer
Binary-Coded Decimal (BCD)
Floating-Point
8 bytes
4 bytes
63
63
51
Double Precision
Single Precision
s
s
2 bytes
79
79
079 71
Double-Extended
Precision
Packed Decimal
s i
significand
exp significand
exp significand
exp
s