03.03.2013 Views

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

Intel® Architecture Instruction Set Extensions Programming Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

INSTRUCTION SET REFERENCE<br />

PACKSSWB/PACKSSDW — Pack with Signed Saturation<br />

Opcode/<br />

<strong>Instruction</strong><br />

Description<br />

Op/<br />

En<br />

64/32<br />

-bit<br />

Mode<br />

CPUID<br />

Feature<br />

Flag<br />

Description<br />

66 0F 63 /r A V/V SSE2 Converts 8 packed signed word integers from xmm1 and from<br />

PACKSSWB xmm1, xmm2/m128<br />

xxm2/m128 into 16 packed signed byte integers in xmm1 using<br />

signed saturation.<br />

66 0F 6B /r A V/V SSE2 Converts 4 packed signed doubleword integers from xmm1 and<br />

PACKSSDW xmm1, xmm2/m128<br />

from xmm2/m128 into 8 packed signed word integers in<br />

xmm1using signed saturation.<br />

VEX.NDS.128.66.0F.WIG 63 /r B V/V AVX Converts 8 packed signed word integers from xmm2 and from<br />

VPACKSSWB xmm1, xmm2,<br />

xmm3/m128<br />

xmm3/m128 into 16 packed signed byte integers in xmm1 using<br />

signed saturation.<br />

VEX.NDS.128.66.0F.WIG 6B /r B V/V AVX Converts 4 packed signed doubleword integers from xmm2 and<br />

VPACKSSDW xmm1, xmm2,<br />

xmm3/m128<br />

from xmm3/m128 into 8 packed signed word integers in<br />

xmm1using signed saturation.<br />

VEX.NDS.256.66.0F.WIG 63 /r B V/V AVX2 Converts 16 packed signed word integers from ymm2 and from<br />

VPACKSSWB ymm1, ymm2,<br />

ymm3/m256<br />

ymm3/m256 into 32 packed signed byte integers in ymm1 using<br />

signed saturation.<br />

VEX.NDS.256.66.0F.WIG 6B /r B V/V AVX2 Converts 8 packed signed doubleword integers from ymm2 and<br />

VPACKSSDW ymm1, ymm2,<br />

ymm3/m256<br />

from ymm3/m256 into 16 packed signed word integers in<br />

ymm1using signed saturation.<br />

<strong>Instruction</strong> Operand Encoding<br />

Op/En Operand 1 Operand 2 Operand 3 Operand 4<br />

A ModRM:reg (r, w) ModRM:r/m (r) NA NA<br />

B ModRM:reg (w) VEX.vvvv ModRM:r/m (r) NA<br />

The PACKSSWB or VPACKSSWB instruction converts 8 or 16 signed word integers from the first source operand and<br />

8 or 16 signed word integers from the second source operand into 16 or 32 signed byte integers and stores the<br />

result in the destination operand. If a signed word integer value is beyond the range of a signed byte integer (that<br />

is, greater than 7FH for a positive integer or greater than 80H for a negative integer), the saturated signed byte<br />

integer value of 7FH or 80H, respectively, is stored in the destination.<br />

The PACKSSDW instruction packs 4 or 8 signed doublewords from the first source operand and 4 or 8 signed<br />

doublewords from the second source operand into 8 or 16 signed words in the destination operand. If a signed<br />

doubleword integer value is beyond the range of a signed word (that is, greater than 7FFFH for a positive integer<br />

or greater than 8000H for a negative integer), the saturated signed word integer value of 7FFFH or 8000H, respectively,<br />

is stored into the destination.<br />

VEX.256 encoded version: The first source operand is a YMM register. The second source operand is a YMM register<br />

or a 256-bit memory location. The destination operand is a YMM register.<br />

VEX.128 encoded version: The first source operand is an XMM register. The second source operand is an XMM<br />

register or 128-bit memory location. The destination operand is an XMM register. The upper bits (255:128) of the<br />

corresponding YMM register destination are zeroed.<br />

128-bit Legacy SSE version: The first source operand is an XMM register. The second operand can be an XMM<br />

register or a 128-bit memory location. The destination is not distinct from the first source XMM register and the<br />

upper bits (255:128) of the corresponding YMM register destination are unmodified.<br />

5-16 Ref. # 319433-014

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!