FISTTP--Store Integer with Truncation

Instruction

Description

FISTTP m16int

Store ST as a signed integer (truncate) in m16int and pop ST.

FISTTP m32int

Store ST as a signed integer (truncate) in m32int and pop ST.

FISTTP m64int

Store ST as a signed integer (truncate) in m64int and pop ST.

Description

FISTTP converts the value in ST into a signed integer using truncation (chop) as rounding mode, transfers the result to the destination, and pop ST. FISTTP accepts word, short integer, and long integer destinations.

The following table shows the results obtained when storing various classes of numbers in integer format.

Note

Operation

DEST ยจ  ST;

pop ST;

Flags Affected

C1 is cleared; C0, C2, C3 undefined.

Numeric Exceptions

Invalid, Stack Invalid (stack underflow), Precision.

Protected Mode Exceptions

#GP(0) If the destination is in a nonwritable segment.

For an illegal memory operand effective address in the CS, DS, ES, FS or GS segments.

#SS(0) For an illegal address in the SS segment.

#PF(fault-code) For a page fault.

#AC For unaligned memory reference if the current privilege level is 3.

#NM If CR0.EM = 1.

If TS bit in CR0 is set.

#UD If CPUID.PNI(ECX bit 0) = 0.

Real Address Mode Exceptions

Interrupt 13 If any part of the operand would lie outside of the effective address space from 0 to 0FFFFH.

#NM If CR0.EM = 1.

If TS bit in CR0 is set.

#UD If CPUID.PNI(ECX bit 0) = 0.

Virtual 8086 Mode Exceptions

Interrupt 13 If any part of the operand would lie outside of the effective address space from 0 to 0FFFFH.

#NM If CR0.EM = 1.

If TS bit in CR0 is set.

#UD If CPUID.PNI(ECX bit 0) = 0.

#PF(fault-code) For a page fault.

#AC For unaligned memory reference if the current privilege is 3.

 

 

 

 

 

 

 


For details, see Volume 2A and Volume 2B of the Intel(R) 64 and IA-32 Intel Architecture Software Developer's Manual. For the latest updates on the instruction set information, go to the web site.