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.

PMOVMSKB — Move Byte Mask<br />

Opcode/<br />

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

Description<br />

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

INSTRUCTION SET REFERENCE<br />

Creates a mask made up of the most significant bit of each byte of the source operand (second operand) and stores<br />

the result in the low word or dword of the destination operand (first operand). The source operand is an XMM<br />

register; the destination operand is a general-purpose register.<br />

The mask is 16-bits for 128-bit source operand and 32-bits for 256-bit source operand. The destination operand is<br />

a general-purpose register.<br />

In 64-bit mode the default operand size of the destination operand is 64 bits. Bits 63:32 are filled with zero if the<br />

source operand is a 256-bit YMM register. The upper bits above bit 15 are filled with zeros if the source operand is<br />

a 128-bit XMM register. REX.W is ignored<br />

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

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

Note: In VEX encoded versions VEX.vvvv is reserved and must be 1111b otherwise instructions will #UD.<br />

Operation<br />

Op/<br />

En<br />

64/32<br />

-bit<br />

Mode<br />

CPUID<br />

Feature<br />

Flag<br />

VPMOVMSKB instruction with 256-bit source operand and r32:<br />

r32[0] SRC[7];<br />

r32[1] SRC[15];<br />

(* Repeat operation for bytes 3rd through 31*)<br />

r32[31] SRC[255];<br />

VPMOVMSKB instruction with 256-bit source operand and r64:<br />

r64[0] SRC[7];<br />

r64[1] SRC[15];<br />

(* Repeat operation for bytes 2 through 31*)<br />

r64[31] SRC[255];<br />

r64[63:32] ZERO_FILL;<br />

PMOVMSKB instruction with 128-bit source operand and r32:<br />

r32[0] SRC[7];<br />

r32[1] SRC[15];<br />

(* Repeat operation for bytes 2 through 14 *)<br />

r32[15] SRC[127];<br />

r32[31:16] ZERO_FILL;<br />

Description<br />

66 0F D7 /r A V/V SSE2 Move a 16-bit mask of xmm1 to reg. The upper bits of r32 or r64 are<br />

filled with zeros.<br />

PMOVMSKB reg, xmm1<br />

VEX.128.66.0F.WIG D7 /r A V/V AVX Move a 16-bit mask of xmm1 to reg. The upper bits of r32 or r64 are<br />

filled with zeros.<br />

VPMOVMSKB reg, xmm1<br />

VEX.256.66.0F.WIG D7 /r A V/V AVX2 Move a 32-bit mask of ymm1 to reg. The upper bits of r64 are filled<br />

with zeros.<br />

VPMOVMSKB reg, ymm1<br />

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

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

Ref. # 319433-014 5-87

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

Saved successfully!

Ooh no, something went wrong!