User Guide

128-Bit Media and Scientific Programming 169
24592—Rev. 3.15—November 2009 AMD64 Technology
source operand from the third doubleword of the source operand and stores the result in the fourth
doubleword of the destination.
The HSUBPD instruction subtracts the second quadword of the destination register from the first
quadword of the destination operand and stores the difference in the first quadword of the destination
register. The difference from the subtraction of the first quadword of the source operand from the
second quadword of the source operand is stored in the second quadword of the destination operand.
Simultaneous Addition and Subtraction
ADDSUBPS—Add/Subtract Packed Single-Precision Floating-Point
ADDSUBPD—Add/Subtract Packed Double-Precision Floating-Point
The ADDSUBPS instruction adds the second and fourth doublewords of the source operand to the
second and fourth doublewords, respectively, of the destination operand and stores the resulting sums
in the second and fourth doublewords of the destination operand; subtracts the first and third
doublewords of the first operand from the first and third doublewords of the destination operand and
stores the resulting differences in the first and third doublewords of the destination operand.
The ADDSUBPD instruction subtracts the first quadword of the source operand from the first
quadword of the destination operand and stores the difference in the first quadword of the destination
operand; adds the second quadword of the source operand to the second quadword of the destination
operand and stores the sum in the second quadword of the destination operand.
Multiplication
MULPS—Multiply Packed Single-Precision Floating-Point
MULPD—Multiply Packed Double-Precision Floating-Point
MULSS—Multiply Scalar Single-Precision Floating-Point
MULSD—Multiply Scalar Double-Precision Floating-Point
The MULPS instruction multiplies each of four single-precision floating-point values in the first
operand by the corresponding single-precision floating-point value in the second operand and writes
the result in the corresponding doubleword of the destination. The MULPD instruction performs an
analogous operation for two double-precision floating-point values.
The MULSS instruction multiplies the single-precision floating-point value in the low-order
doubleword of the first operand by the single-precision floating-point value in the low-order
doubleword of the second operand and writes the result in the low-order doubleword of the destination.
The three high-order doublewords of the destination are not modified.
The MULSD instruction multiplies the double-precision floating-point value in the low-order
quadword of the first operand by the double-precision floating-point value in the low-order quadword
of the second operand and writes the result in the low-order quadword of the destination. The high-
order quadword of the destination is not modified.