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.

OPCODE MAP<br />

• By this breakdown, it has been shown that this opcode represents the instruction: SHLD DS:00000000H, EAX,<br />

3.<br />

A.2.4.3 Three-Byte Opcode <strong>Instruction</strong>s<br />

The three-byte opcode maps shown in Table A-4 and Table A-5 includes primary opcodes that are either 3 or 4<br />

bytes in length. Primary opcodes that are 3 bytes in length begin with two escape bytes 0F38H or 0F3A. The upper<br />

and lower four bits of the third opcode byte are used to index a particular row and column in Table A-4 or Table A-5.<br />

Three-byte opcodes that are 4 bytes in length begin with a mandatory prefix (66H, F2H, or F3H) and two escape<br />

bytes (0F38H or 0F3AH). The upper and lower four bits of the fourth byte are used to index a particular row and<br />

column in Table A-4 or Table A-5.<br />

For each entry in the opcode map, the rules for interpreting the byte following the primary opcode fall into the<br />

following case:<br />

• A ModR/M byte is required and is interpreted according to the abbreviations listed in A.1 and Chapter 2,<br />

“<strong>Instruction</strong> Format,” of the <strong>Intel®</strong> 64 and IA-32 <strong>Architecture</strong>s Software Developer’s Manual, Volume 2A. The<br />

operand types are listed according to notations listed in Section A.2.<br />

Example A-3. Look-up Example for 3-Byte Opcodes<br />

Look-up opcode 660F3A0FC108H for a PALIGNR instruction using Table A-5.<br />

• 66H is a prefix and 0F3AH indicate to use Table A-5. The opcode is located in row 0, column F indicating a<br />

PALIGNR instruction with operands Vdq, Wdq, and Ib. Interpret the operands as follows:<br />

— Vdq: The reg field of the ModR/M byte selects a 128-bit XMM register.<br />

— Wdq: The R/M field of the ModR/M byte selects either a 128-bit XMM register or memory location.<br />

— Ib: Immediate data is encoded in the subsequent byte of the instruction.<br />

• The next byte is the ModR/M byte (C1H). The reg field indicates that the first operand is XMM0. The mod shows<br />

that the R/M field specifies a register and the R/M indicates that the second operand is XMM1.<br />

• The last byte is the immediate byte (08H).<br />

• By this breakdown, it has been shown that this opcode represents the instruction: PALIGNR XMM0, XMM1, 8.<br />

A.2.4.4 VEX Prefix <strong>Instruction</strong>s<br />

<strong>Instruction</strong>s that include a VEX prefix are organized relative to the 2-byte and 3-byte opcode maps, based on the<br />

VEX.mmmmm field encoding of implied 0F, 0F38H, 0F3AH, respectively. Each entry in the opcode map of a VEXencoded<br />

instruction is based on the value of the opcode byte, similar to non-VEX-encoded instructions.<br />

A VEX prefix includes several bit fields that encode implied 66H, F2H, F3H prefix functionality (VEX.pp) and<br />

operand size/opcode information (VEX.L). See chapter 4 for details.<br />

Opcode tables A2-A6 include both instructions with a VEX prefix and instructions without a VEX prefix. Many entries<br />

are only made once, but represent both the VEX and non-VEX forms of the instruction. If the VEX prefix is present<br />

all the operands are valid and the mnemonic is usually prefixed with a “v”. If the VEX prefix is not present the<br />

VEX.vvvv operand is not available and the prefix “v” is dropped from the mnemonic.<br />

A few instructions exist only in VEX form and these are marked with a superscript “v”.<br />

Operand size of VEX prefix instructions can be determined by the operand type code. 128-bit vectors are indicated<br />

by 'dq', 256-bit vectors are indicated by 'qq', and instructions with operands supporting either 128 or 256-bit,<br />

determined by VEX.L, are indicated by 'x'. For example, the entry "VMOVUPD Vx,Wx" indicates both VEX.L=0 and<br />

VEX.L=1 are supported.<br />

Ref. # 319433-014 A-5

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

Saved successfully!

Ooh no, something went wrong!