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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTION SET REFERENCE<br />

PHSUBW/PHSUBD — Packed Horizontal Subtract<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 38 05 /r A V/V SSSE3 Subtract 16-bit signed integers horizontally, pack to xmm1.<br />

PHSUBW xmm1, xmm2/m128<br />

66 0F 38 06 /r A V/V SSSE3 Subtract 32-bit signed integers horizontally, pack to xmm1.<br />

PHSUBD xmm1, xmm2/m128<br />

VEX.NDS.128.66.0F38.WIG 05 /r B V/V AVX Subtract 16-bit signed integers horizontally, pack to xmm1.<br />

VPHSUBW xmm1, xmm2,<br />

xmm3/m128<br />

VEX.NDS.128.66.0F38.WIG 06 /r B V/V AVX Subtract 32-bit signed integers horizontally, pack to xmm1.<br />

VPHSUBD xmm1, xmm2,<br />

xmm3/m128<br />

VEX.NDS.256.66.0F38.WIG 05 /r B V/V AVX2 Subtract 16-bit signed integers horizontally, pack to ymm1.<br />

VPHSUBW ymm1, ymm2,<br />

ymm3/m256<br />

VEX.NDS.256.66.0F38.WIG 06 /r B V/V AVX2 Subtract 32-bit signed integers horizontally, pack to ymm1.<br />

VPHSUBD ymm1, ymm2,<br />

ymm3/m256<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 />

(V)PHSUBW performs horizontal subtraction on each adjacent pair of 16-bit signed integers by subtracting the<br />

most significant word from the least significant word of each pair in the second source operand and destination<br />

operands, and packs the signed 16-bit results to the destination operand. (V)PHSUBD performs horizontal subtraction<br />

on each adjacent pair of 32-bit signed integers by subtracting the most significant doubleword from the least<br />

significant doubleword of each pair, and packs the signed 32-bit result to the destination operand.<br />

128-bit Legacy SSE version: The first source and destination operands are XMM registers. The second source<br />

operand is an XMM register or a 128-bit memory location. Bits (255:128) of the corresponding YMM destination<br />

register remain unchanged.<br />

VEX.128 encoded version: The first source and destination operands are XMM registers. The second source<br />

operand is an XMM register or a 128-bit memory location. Bits (255:128) of the corresponding YMM register are<br />

zeroed.<br />

VEX.256 encoded version: The second source operand can be an YMM register or a 256-bit memory location. The<br />

first source and destination operands are YMM registers.<br />

5-62 Ref. # 319433-014

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

Saved successfully!

Ooh no, something went wrong!