ia-32_volume1_basic-arch

The tag for the register accordingly this action

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: truction pointer, x87 FPU operand pointer, and opcode registers, and the FRSTOR instruction loads all the x87 FPU registers, including the x87 FPU stack registers. Vol. 1 8-15 PROGRAMMING WITH THE X87 FPU 31 32-Bit Protected Mode Format 16 15 0 0 4 8 12 16 20 24 Control Word Status Word Tag Word FPU Instruction Pointer Offset 00000 Opcode 10...00 FPU Instruction Pointer Selector FPU Operand Pointer Offset FPU Operand Pointer Selector For instructions that also store x87 FPU data registers, the eight 80-bit registers (R0-R7) follow the above structure in sequence. Figure 8-9. Protected Mode x87 FPU State Image in Memory, 32-Bit Format 31 32-Bit Real-Address Mode Format 16 15 0 0 4 8 12 16 20 24 Control Word Status Word Tag Word FPU Instruction Pointer 15...00 0000 0000 FPU Instruction Pointer 31...16 FPU Operand Pointer 31...16 0 Opcode 10...00 FPU Operand Pointer 15...00 000000000000 For instructions that also store x87 FPU data registers, the eight 80-bit registers (R0-R7) follow the above structure in sequence. Figure 8-10. Real Mode x87 FPU State Image in Memory, 32-Bit Format 8-16 Vol. 1 PROGRAMMING WITH THE X87 FPU 16-Bit Protected Mode Format 0 15 Control Word Status Word Tag Word FPU Instruction Pointer Offset FPU Operand Pointer Offset FPU Operand Pointer Selector 0 2 4 6 10 12 FPU Instruction Pointer Selector 8 Figure 8-11. Protected Mode x87 FPU State Image in Memory, 16-Bit Format 16-Bit Real-Address Mode and Virtual-8086 Mode Format 15 Control Word Status Word Tag Word FPU Instruction Pointer 15...00 IP 19..16 0 Opcode 10...00 FPU Operand Pointer 15...00 0 0 2 4 6 8 10 OP 19..16 0 0 0 0 0 0 0 0 0 0 0 0 12 Figure 8-12. Real Mode x87 FPU State Image in Memory, 16-Bit Format 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. Vol. 1 8-17 PROGRAMMING WITH THE X87 FPU 8.2 X87 FPU DATA TYPES The x87 FPU recognizes and operates on the following seven data types (see Figures 8-13): single-precision floating point, double-precision floating point, double extended-precision floating point, signed word integer, signed doubleword integer, signed quadword integer, and packed BCD decimal integers. For detailed information about these data types, see Section 4.2.2, "Floating-Point Data Types," Section 4.2.1.2, "Signed Integers," and Section 4.7, "BCD and Packed BCD Integers." With the exception of the 80-bit double extended-precision floating-point format, all of these data types exist in memory only. When they are loaded into x87 FPU data registers, they are converted into double ex...
View Full Document

Ask a homework question - tutors are online