Unformatted text preview: re 8-7 in the Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 1, for the format of the x87 FPU tag word.) All other MMX instructions (other than the EMMS instruction) set all the tags in x87 FPU tag word to valid (all 0s). The EMMS instruction must be used to clear the MMX technology state at the end of all MMX technology procedures or subroutines and before calling other procedures or subroutines that may execute x87 floating-point instructions. If a floating-point instruction loads one of the registers in the x87 FPU data register stack before the x87 FPU tag word has been reset by the EMMS instruction, an x87 floating-point register stack overflow can occur that will result in an x87 floating-point exception or incorrect result. EMMS operation is the same in non-64-bit modes and 64-bit mode. Operation
x87FPUTagWord FFFFH; Intel C/C++ Compiler Intrinsic Equivalent
void_mm_empty() Flags Affected
None. Protected Mode Exceptions
#UD #NM #MF If CR0.EM[bit 2] = 1. If CR0.TS[bit 3] = 1. If there is a pending FPU exception. Real-Address Mode Exceptions
Same exceptions as in Protected Mode. 3-278 Vol. 2 INSTRUCTION SET REFERENCE, A-M Virtual-8086 Mode Exceptions
Same exceptions as in Protected Mode. Compatibility Mode Exceptions
Same exceptions as in Protected Mode. 64-Bit Mode Exceptions
Same exceptions as in Protected Mode. Vol. 2 3-279 INSTRUCTION SET REFERENCE, A-M ENTER--Make Stack Frame for Procedure Parameters
Opcode C8 iw 00 C8 iw 01 C8 iw ib Instruction ENTER imm16, 0 ENTER imm16,1 ENTER imm16, imm8 64Bit Mode Valid Valid Valid Compat/ Leg Mode Valid Valid Valid Description Create a stack frame for a procedure. Create a nested stack frame for a procedure. Create a nested stack frame for a procedure. Description
Creates a stack frame for a procedure. The first operand (size operand) specifies the size of the stack frame (that is, the number of bytes of dynamic storage allocated on the stack for the procedure). The second operand (nesting level operand) gives the lexical nesting level (0 to 31) of the procedure. The nesting level determines the number of stack frame pointers that are copied into the "display area" of the new stack frame from the preceding frame. Both of these operands are immediate values. The stack-size attribute determines whether the BP (16 bits), EBP (32 bits), or RBP (64 bits) register specifies the current frame pointer and whether SP (16 bits), ESP (32 bits), or RSP (64 bits) specifies the stack pointer. In 64-bit mode, stack-size attribute is always 64-bits. The ENTER and companion LEAVE instructions are provided to support block structured languages. The ENTER instruction (when used) is typically the first instruction in a procedure and is used to set up a new stack frame for a procedure. The LEAVE instruction is then used at the end of the procedure (just before the RET instruction) to release the stack frame. If the nesting level is 0, the processor pushes the frame pointer from the BP/E...
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.
- Winter '11