This preview shows page 1. Sign up to view the full content.
Unformatted text preview: dds two adjacent, signed 16bit integers horizontally from the source and destination operands and packs the signed, saturated 16bit results to the destination operand. PHADDD adds two adjacent, signed 32bit integers horizontally from the source and destination operands and packs the signed 32bit results to the destination operand. There are six horizontal subtract instructions (represented by three mnemonics); three operate on 128bit operands and three operate on 64bit operands. The width of each data element is either 16 bits or 32 bits. These are listed below. PHSUBW performs horizontal subtraction on each adjacent pair of 16bit signed integers by subtracting the most significant word from the least significant word of each pair in the source and destination operands. The signed 16bit results are packed and written to the destination operand. PHSUBSW performs horizontal subtraction on each adjacent pair of 16bit signed integers by subtracting the most significant word from the least significant word of each pair in the source and destination operands. The signed, saturated 16bit results are packed and written to the destination operand. PHSUBD performs horizontal subtraction on each adjacent pair of 32bit signed integers by subtracting the most significant doubleword from the least significant double word of each pair in the source and destination operands. The signed 32bit results are packed and written to the destination operand. 12.6.2 Packed Absolute Values There are six packedabsolutevalue instructions (represented by three mnemonics). Three operate on 128bit operands and three operate on 64bit operands. The widths of data elements are 8 bits, 16 bits or 32 bits. The absolute value of each data element of the source operand is stored as an UNSIGNED result in the destination operand. PABSB computes the absolute value of each signed byte data element. PABSW computes the absolute value of each signed 16bit data element. PABSD computes the absolute value of each signed 32bit data element. Vol. 1 1211 PROGRAMMING WITH SSE3 AND SUPPLEMENTAL SSE3 12.6.3 Multiply and Add Packed Signed and Unsigned Bytes There are two multiplyandaddpackedsignedunsignedbyte instructions (represented by one mnemonic). One operates on 128bit operands and the other operates on 64bit operands. Multiplications are performed on each vertical pair of data elements. The data elements in the source operand are signed byte values, the input data elements of the destination operand are unsigned byte values. PMADDUBSW multiplies each unsigned byte value with the corresponding signed byte value to produce an intermediate, 16bit signed integer. Each adjacent pair of 16bit signed values are added horizontally. The signed, saturated 16bit results are packed to the destination operand. 12.6.4 Packed Multiply High with Round and Scale There are two packedmultiplyhighwithroundandscale instructions (represented by one mnemonic). One operates on 128bit operands...
View
Full
Document
 Winter '11
 Watlins

Click to edit the document details