D0 exponent 63 62 52 51 fraction implied integer 0 0

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: by category. The following section briefly describes the instructions in each category. Detailed descriptions of the floating-point instructions are given in the Intel 64 and IA-32 Architectures Software Developer's Manual, Volumes 3A & 3B. 8.3.1 Escape (ESC) Instructions All of the instructions in the x87 FPU instruction set fall into a class of instructions known as escape (ESC) instructions. All of these instructions have a common opcode format, where the first byte of the opcode is one of the numbers from D8H through DFH. 8.3.2 x87 FPU Instruction Operands Most floating-point instructions require one or two operands, located on the x87 FPU data-register stack or in memory. (None of the floating-point instructions accept immediate operands.) When an operand is located in a data register, it is referenced relative to the ST(0) register (the register at the top of the register stack), rather than by a physical register number. Often the ST(0) register is an implied operand. Operands in memory can be referenced using the same operand addressing methods described in Section 3.7, "Operand Addressing." 8.3.3 Data Transfer Instructions The data transfer instructions (see Table 8-4) perform the following operations: Load a floating-point, integer, or packed BCD operand from memory into the ST(0) register. 8-22 Vol. 1 PROGRAMMING WITH THE X87 FPU Store the value in an ST(0) register to memory in floating-point, integer, or packed BCD format. Move values between registers in the x87 FPU register stack. The FLD (load floating point) instruction pushes a floating-point operand from memory onto the top of the x87 FPU data-register stack. If the operand is in singleprecision or double-precision floating-point format, it is automatically converted to double extended-precision floating-point format. This instruction can also be used to push the value in a selected x87 FPU data register onto the top of the register stack. The FILD (load integer) instruction converts an integer operand in memory into double extended-precision floating-point format and pushes the value onto the top of the register stack. The FBLD (load packed decimal) instruction performs the same load operation for a packed BCD operand in memory. Table 8-4. Data Transfer Instructions Floating Point FLD FST FSTP FXCH FCMOVcc Load Floating Point Store Floating Point Store Floating Point and Pop Exchange Register Contents Conditional Move Integer FILD FIST FISTP Load Integer Store Integer Store Integer and Pop FBSTP Store Packed Decimal and Pop Packed Decimal FBLD Load Packed Decimal The FST (store floating point) and FIST (store integer) instructions store the value in register ST(0) in memory in the destination format (floating point or integer, respectively). Again, the format conversion is carried out automatically. The FSTP (store floating point and pop), FISTP (store integer and pop), and FBSTP (store packed decimal and pop) instructions store the value in the ST(0) registers in...
View Full Document

This note was uploaded on 10/01/2013 for the course CPE 103 taught by Professor Watlins during the Winter '11 term at Mississippi State.

Ask a homework question - tutors are online