
Chapter 5: 64-Bit Media Programming
267
24593—Rev. 3.09—September 2003
AMD 64-Bit Technology
The CVTPS2PI and CVTTPS2PI instructions convert two single-
precision (32-bit) floating-point values in the second operand
(the low-order 64 bits of an XMM register or a 64-bit memory
location) to two 32-bit signed integers, and write the converted
values into the first operand (an MMX register). For the
CVTPS2PI instruction, if the conversion result is an inexact
value, the value is rounded as specified in the rounding control
(RC) field of the MXCSR register (“MXCSR Register” on
page 140), but for the CVTTPS2PI instruction such a result is
truncated (rounded toward zero).
The CVTPD2PI and CVTTPD2PI instructions perform
conversions analogous to CVTPS2PI and CVTTPS2PI but for
two double-precision (64-bit) floating-point values.
The 3DNow! PF2IW instruction converts two single-precision
floating-point values in the second operand (an MMX register
or a 64-bit memory location) to two 16-bit signed integer values,
sign-extended to 32-bits, and writes the converted values into
the first operand (an MMX register). The 3DNow! PF2ID
instruction converts two single-precision floating-point values
in the second operand to two 32-bit signed integer values, and
writes the converted values into the first operand. If the result
of either conversion is an inexact value, the value is truncated
(rounded toward zero).
As described in “Floating-Point Data Types” on page 243,
PF2IW and PF2ID do not fully comply with the IEEE-754
standard. Conversion of some source operands of the C type
float
(IEEE-754 single-precision)—specifically NaNs, infinities,
and denormals—are not supported. Attempts to convert such
source operands produce undefined results, and no exceptions
are generated.
5.7.3
Arithmetic
The floating-point vector-arithmetic instructions perform an
arithmetic operation on two floating-point operands. For a
description of 3DNow! instruction saturation on overflow and
underflow conditions, see “Floating-Point Data Types” on
page 243.
Addition.
PFADD—Packed Floating-Point Add
The PFADD instruction adds each single-precision floating-
point value in the first operand (an MMX register) to the