| Opcode | Encoding | 16-bit | 32-bit | 64-bit | CPUID Feature Flag(s) | Description |
|---|---|---|---|---|---|---|
NP 0F 77EMMS | zo | Valid | Valid | Valid | mmx | Set all eight fields in FPU.TagWord to empty (11b) |
Encoding
| Encoding | Operand |
|---|---|
zo | None |
Description
The EMMS instruction empties (clears) the MMX state. It does so by setting all eight fields in FPU.TagWord to empty (11b).
This instruction must be used before using the x87 FPU (if any MMX instructions were executed). Failure to do so is undefined and could result in an FPU stack overflow that can result in either an #MF exception or an incorrect result.
Operation
public void EMMS()
{
FPU.TagWord = 0xFFFF;
}Flags Affected
None.Intrinsics
void _mm_empty()Exceptions
Real-Address Mode
#UD- If the
LOCKprefix is used. - If
CR0.EMis set (no internal or external FPU)
#NM- If
CR0.TS- is set (a task switch occurred).
#MF- If an FPU exception is pending.
Virtual-8086 Mode
#UD- If the
LOCKprefix is used. - If
CR0.EMis set (no internal or external FPU)
#NM- If
CR0.TS- is set (a task switch occurred).
#MF- If an FPU exception is pending.
Protected Mode
#UD- If the
LOCKprefix is used. - If
CR0.EMis set (no internal or external FPU)
#NM- If
CR0.TS- is set (a task switch occurred).
#MF- If an FPU exception is pending.
Compatibility Mode
#UD- If the
LOCKprefix is used. - If
CR0.EMis set (no internal or external FPU)
#NM- If
CR0.TS- is set (a task switch occurred).
#MF- If an FPU exception is pending.
Long Mode
#UD- If the
LOCKprefix is used. - If
CR0.EMis set (no internal or external FPU)
#NM- If
CR0.TS- is set (a task switch occurred).
#MF- If an FPU exception is pending.