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

The VEX prefix is required to be the last prefix and immediately precedes the opcode bytes. It must follow any<br />

other prefixes. If VEX prefix is present a REX prefix is not supported.<br />

The 3-byte VEX leaves room for future expansion with 3 reserved bits. REX and the 66h/F2h/F3h prefixes are<br />

reclaimed for future use.<br />

VEX prefix has a two-byte form and a three byte form. If an instruction syntax can be encoded using the two-byte<br />

form, it can also be encoded using the three byte form of VEX. The latter increases the length of the instruction by<br />

one byte. This may be helpful in some situations for code alignment.<br />

The VEX prefix supports 256-bit versions of floating-point SSE, SSE2, SSE3, and SSE4 instructions. VEX-encoded<br />

128-bit vector integer instructions are supported in AVX. 256-bit vector integer instructions are supported in AVX2<br />

but not AVX. Table B-1 of Appendix B lists promoted, VEX-128 encoded vector integer instructions in AVX.<br />

Table B-2 lists 128-bit and 256-bit, promoted VEX-encoded vector integer instructions. Note, certain new instruction<br />

functionality can only be encoded with the VEX prefix (See Appendix B, Table B-3, Table B-4, Table B-5).<br />

The VEX prefix will #UD on any instruction containing MMX register sources or destinations.<br />

The following subsections describe the various fields in two or three-byte VEX prefix:<br />

4.1.4.1 VEX Byte 0, bits[7:0]<br />

VEX Byte 0, bits [7:0] must contain the value 11000101b (C5h) or 11000100b (C4h). The 3-byte VEX uses the C4h<br />

first byte, while the 2-byte VEX uses the C5h first byte.<br />

4.1.4.2 VEX Byte 1, bit [7] - ‘R’<br />

VEX Byte 1, bit [7] contains a bit analogous to a bit inverted REX.R. In protected and compatibility modes the bit<br />

must be set to ‘1’ otherwise the instruction is LES or LDS. This bit is present in both 2- and 3-byte VEX prefixes.<br />

The usage of WRXB bits for legacy instructions is explained in detail section 2.2.1.2 of Intel 64 and IA-32 <strong>Architecture</strong>s<br />

Software developer’s manual, Volume 2A. This bit is stored in bit inverted format.<br />

4.1.4.3 3-byte VEX byte 1, bit[6] - ‘X’<br />

Bit[6] of the 3-byte VEX byte 1 encodes a bit analogous to a bit inverted REX.X. It is an extension of the SIB Index<br />

field in 64-bit modes. In 32-bit modes, this bit must be set to ‘1’ otherwise the instruction is LES or LDS. This bit is<br />

available only in the 3-byte VEX prefix. This bit is stored in bit inverted format.<br />

Ref. # 319433-014 4-3

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

Saved successfully!

Ooh no, something went wrong!