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

PANDN — Logical AND NOT<br />

Opcode/<br />

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

Description<br />

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

Performs a bitwise logical NOT operation on the first source operand, then performs bitwise AND with second<br />

source operand and stores the result in the destination operand. Each bit of the result is set to 1 if the corresponding<br />

bit in the first operand is 0 and the corresponding bit in the second operand is 1, otherwise it is set to 0.<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 />

Operation<br />

Op/<br />

En<br />

64/32<br />

-bit<br />

Mode<br />

PANDN (Legacy SSE instruction)<br />

DEST[127:0] ((NOT DEST[127:0]) AND SRC[127:0])<br />

VPANDN (VEX.128 encoded instruction)<br />

DEST[127:0] (( NOT SRC1[127:0]) AND SRC2[127:0])<br />

DEST[VLMAX:128] 0<br />

VPANDN (VEX.256 encoded instruction)<br />

DEST[255:0] ((NOT SRC1[255:0]) AND SRC2[255:0])<br />

Intel C/C++ Compiler Intrinsic Equivalent<br />

CPUID<br />

Feature<br />

Flag<br />

(V)PANDN: __m128i _mm_andnot_si128 ( __m128i a, __m128i b)<br />

VPANDN: __m256i _mm256_andnot_si256 ( __m256i a, __m256i b)<br />

Description<br />

66 0F DF /r A V/V SSE2 Bitwise AND NOT of xmm2/m128 and xmm1.<br />

PANDN xmm1, xmm2/.m128<br />

VEX.NDS.128.66.0F.WIG DF /r B V/V AVX Bitwise AND NOT of xmm2, and xmm3/m128 and store result in<br />

xmm1.<br />

VPANDN xmm1, xmm2,<br />

xmm3/.m128<br />

VEX.NDS.256.66.0F.WIG DF /r B V/V AVX2 Bitwise AND NOT of ymm2, and ymm3/m256 and store result in<br />

ymm1.<br />

VPANDN ymm1, ymm2,<br />

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

5-38 Ref. # 319433-014

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

Saved successfully!

Ooh no, something went wrong!