Intel 253666-024US Computer Hardware User Manual


 
Vol. 2A 3-389
INSTRUCTION SET REFERENCE, A-M
FSTCW/FNSTCW—Store x87 FPU Control Word
FSTCW/FNSTCW—Store x87 FPU Control Word
Description
Stores the current value of the FPU control word at the specified destination in
memory. The FSTCW instruction checks for and handles pending unmasked floating-
point exceptions before storing the control word; the FNSTCW instruction does not.
The assembler issues two instructions for the FSTCW instruction (an FWAIT instruc-
tion followed by an FNSTCW instruction), and the processor executes each of these
instructions in separately. If an exception is generated for either of these instruc-
tions, the save EIP points to the instruction that caused the exception.
This instruction’s operation is the same in non-64-bit modes and 64-bit mode.
IA-32 Architecture Compatibility
When operating a Pentium or Intel486 processor in MS-DOS compatibility mode, it is
possible (under unusual circumstances) for an FNSTCW instruction to be interrupted
prior to being executed to handle a pending FPU exception. See the section titled
“No-Wait FPU Instructions Can Get FPU Interrupt in Window” in Appendix D of the
Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 1, for a
description of these circumstances. An FNSTCW instruction cannot be interrupted in
this way on a Pentium 4, Intel Xeon, or P6 family processor.
Operation
DEST FPUControlWord;
FPU Flags Affected
The C0, C1, C2, and C3 flags are undefined.
Floating-Point Exceptions
None.
Opcode Instruction 64-Bit
Mode
Compat/
Leg Mode
Description
9B D9 /7 FSTCW m2byte Valid Valid Store FPU control word to m2byte
after checking for pending unmasked
floating-point exceptions.
D9 /7 FNSTCW
*
m2byte Valid Valid Store FPU control word to m2byte
without checking for pending
unmasked floating-point exceptions.
NOTES:
* See IA-32 Architecture Compatibility section below.