Convert with Truncation Scalar Single-Precision Floating Point Values to Doubleword and Quadword Integers

Encoding

EncodingOperand 1Operand 2Operand 3
rmn/aModRM.reg[w]ModRM.r/m[r]
ermtuple1-fixedModRM.reg[w]ModRM.r/m[r]

Description

The (V)CVTTSS2SI instruction converts with truncation a scalar single-precision floating-point value from the source operand into either a doubleword or quadword integer. The result is stored in the destination operand.

The EVEX form of this instruction does not support memory-fault suppression. The operand size is always 32 bits if not in Long Mode. In other words, VEX.W1 and EVEX.W1 are treated as VEX.W0 and EVEX.W0 (respectively) outside Long Mode.

Operation

public void CVTTSS2SI(ref I32 dest, SimdF64 src)
{
    dest = ConvertToI32(src[0], truncate: true);
}
public void CVTTSS2SI(ref I64 dest, SimdF64 src)
{
    dest = ConvertToI64(src[0], truncate: true);
}

public void VCVTTSS2SI_Vex(ref I32 dest, SimdF64 src) =>
    CVTTSS2SI(ref dest, src);
public void VCVTTSS2SI_Vex(ref I64 dest, SimdF64 src) =>
    CVTTSS2SI(ref dest, src);

public void VCVTTSS2SI_Evex(ref I32 dest, SimdF64 src) =>
    CVTTSS2SI(ref dest, src);
public void VCVTTSS2SI_Evex(ref I64 dest, SimdF64 src) =>
    CVTTSS2SI(ref dest, src);

Intrinsics

Exceptions

SIMD Floating-Point

#XM
  • #I - Invalid operation.
  • #P - Inexact result.

Other Exceptions

VEX Encoded Form: See Type 3 Exception Conditions.
EVEX Encoded Form: See Type E3NF Exception Conditions.

#UD
  • If VEX.vvvv is not 1111b.
  • If EVEX.vvvvv is not 11111b.