3-205
INSTRUCTION SET REFERENCE
FIST/FISTPStore Integer
Description
The FIST instruction converts the value in the ST(0) register to a signed integer and stores the
result in the destination operand. Values can be stored in word- or short-integer format. The
destination operand specifies the address where the first byte of the destination value is to be
stored.
The FISTP instruction performs the same operation as the FIST instruction and then pops the
register stack. To pop the register stack, the processor marks the ST(0) register as empty and
increments the stack pointer (TOP) by 1. The FISTP instruction can also stores values in long-
integer format.
The following table shows the results obtained when storing various classes of numbers in
integer format.
NOTES:
FMeans finite-real number.
IMeans integer.
*Indicates floating-point invalid operation (#IA) exception.
**0 or
±
1, depending on the rounding mode.
Opcode
Instruction
Description
DF /2
FIST m16int
Store ST(0) in m16int
DB /2
FIST m32int
Store ST(0) in m32int
DF /3
FISTP m16int
Store ST(0) in m16int and pop register stack
DB /3
FISTP m32int
Store ST(0) in m32int and pop register stack
DF /7
FISTP m64int
Store ST(0) in m64int and pop register stack
ST(0)
DEST
??
*
?
F <
?
1
?
I
?
1 <
?
F <
?
0
**
?
0
0
+
0
0
+0 < +F < +1
**
+F > +1
+I
+
?
*
NaN
*