Intel 64 and IA-32 Architectures Software Developers Manual Volume 1, Basic Architecture

Vol. 1 8-17
PROGRAMMING WITH THE X87 FPU
8.1.11 Saving the x87 FPU’s State with FXSAVE
The FXSAVE and FXRSTOR instructions save and restore, respectively, the x87 FPU
state along with the state of the XMM registers and the MXCSR register. Using the
FXSAVE instruction to save the x87 FPU state has two benefits: (1) FXSAVE executes
faster than FSAVE, and (2) FXSAVE saves the entire x87 FPU, MMX, and XMM state in
one operation. See Section 10.5, “FXSAVE and FXRSTOR Instructions,for additional
information about these instructions.
Figure 8-11. Protected Mode x87 FPU State Image in Memory, 16-Bit Format
Figure 8-12. Real Mode x87 FPU State Image in Memory, 16-Bit Format
0
0
2
4
6
8
10
12
16-Bit Protected Mode Format
Control Word
15
Status Word
Tag Word
FPU Instruction Pointer Selector
FPU Operand Pointer Selector
FPU Operand Pointer Offset
FPU Instruction Pointer Offset
0
0
2
4
6
8
10
12
16-Bit Real-Address Mode and
Control Word
15
Status Word
Tag Word
Virtual-8086 Mode Format
0 0 0 0 0 0 0 0 0 0 0 0
Opcode 10...000
FPU Instruction Pointer 15...00
IP 19..16
OP 19..16
FPU Operand Pointer 15...00