Divide Scalar Double-Precision Floating-Point Values

Encoding

EncodingOperand 1Operand 2Operand 3Operand 4
rmn/aModRM.reg[rw]ModRM.r/m[r]
rvmn/aModRM.reg[rw]VEX.vvvv[r]ModRM.r/m[r]
ervmtuple1-scalarModRM.reg[rw]EVEX.vvvvv[r]ModRM.r/m[r]

Description

The (V)DIVSD instruction divides a single double-precision floating-point value from the first source operand with the same in the second. The result is stored in the destination operand.

All forms except the legacy SSE one will zero the upper (untouched) bits.

Operation

public void DIVSD(SimdF64 dest, SimdF64 src)
{
    dest[0] /= src[0];
    // dest[1..] is unmodified
}

public void VDIVSD_Vex(SimdF64 dest, SimdF64 src1, SimdF64 src2)
{
    dest[0] = src1[0] / src[2];
    dest[1] = src1[1];
    dest[2..] = 0;
}

public void VDIVSD_EvexMemory(SimdF64 dest, SimdF64 src1, SimdF64 src2, KMask k)
{
    if (k[0])
        dest[0] = src1[0] / src2[0];
    else if (EVEX.z)
        dest[0] = 0;
    // otherwise unchanged
    dest[1] = src1[1];
    dest[2..] = 0;
}

public void VDIVSD_EvexRegister(SimdF64 dest, SimdF64 src1, SimdF64 src2, KMask k)
{
    if (EVEX.b)
        OverrideRoundingModeForThisInstruction(EVEX.rc);

    if (k[0])
        dest[0] = src1[0] / src2[0];
    else if (EVEX.z)
        dest[0] = 0;
    // otherwise unchanged
    dest[1] = src1[1];
    dest[2..] = 0;
}

Intrinsics

Exceptions

SIMD Floating-Point

#XM
  • #D - Denormal operand.
  • #I - Invalid operation.
  • #O - Numeric overflow.
  • #P - Inexact result.
  • #U - Numeric underflow.
  • #Z - Divide-by-zero.

Other Exceptions

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