User's Manual

Vol. 3 12-3
INTEL
®
MMX
TECHNOLOGY SYSTEM PROGRAMMING
When the EMMS instruction is executed, each tag field in the x87 FPU tag word is
set to 11B (empty).
Each time an MMX instruction is executed, the TOS value is set to 000B.
Execution of MMX instructions does not affect the other bits in the x87 FPU status
word (bits 0 through 10 and bits 14 and 15) or the contents of the other x87 FPU
registers that comprise the x87 FPU state (the x87 FPU control word, instruction
pointer, data pointer, or opcode registers).
Table 12-2 summarizes the effects of the MMX instructions on the x87 FPU state.
12.2.1 Effect of MMX, x87 FPU, FXSAVE, and FXRSTOR
Instructions on the x87 FPU Tag Word
Table 12-3 summarizes the effect of MMX and x87 FPU instructions and the FXSAVE
and FXRSTOR instructions on the tags in the x87 FPU tag word and the corresponding
tags in an image of the tag word stored in memory.
The values in the fields of the x87 FPU tag word do not affect the contents of the MMX
registers or the execution of MMX instructions. However, the MMX instructions do
modify the contents of the x87 FPU tag word, as is described in Section 12.2, “The
MMX State and MMX Register Aliasing. These modifications may affect the operation
of the x87 FPU when executing x87 FPU instructions, if the x87 FPU state is not
initialized or restored prior to beginning x87 FPU instruction execution.
Note that the FSAVE, FXSAVE, and FSTENV instructions (which save x87 FPU state
information) read the x87 FPU tag register and contents of each of the floating-point
registers, determine the actual tag values for each register (empty, nonzero, zero, or
special), and store the updated tag word in memory. After executing these instruc
-
tions, all the tags in the x87 FPU tag word are set to empty (11B). Likewise, the
EMMS instruction clears MMX state from the MMX/floating-point registers by setting
all the tags in the x87 FPU tag word to 11B.
Table 12-2. Effects of MMX Instructions on x87 FPU State
MMX
Instruction
Type
x87 FPU Tag
Word
TOS Field of
x87 FPU
Status
Word
Other x87
FPU Registers
Bits 64
Through 79 of
x87 FPU Data
Registers
Bits 0
Through 63 of
x87 FPU Data
Registers
Read from
MMX register
All tags set
to 00B (Valid)
000B Unchanged Unchanged Unchanged
Write to MMX
register
All tags set
to 00B (Valid)
000B Unchanged Set to all 1s Overwritten
with MMX data
EMMS All fields set
to 11B
(Empty)
000B Unchanged Unchanged Unchanged