[INTEL NAVIGATION HEADER]

PROGRAMERS REFERENCE MANUAL

APPENDIX D
IA MMX™ INSTRUCTION SET OPCODE MAP

The detailed encodings of the Intel Architecture MMX™ instructions are listed in the shaded boxes of the Opcode Map tables below. All MMX instructions, except the EMMS instruction, use the same format as the two-byte Intel Architecture integer operations.

All blanks in the Opcode Map are reserved and should not be used. Do not depend on the operation of unspecified opcodes. 0F0Bh or 0FB9h should be used when deliberately generating an illegal opcode exception.

Key to Abbreviations

Operands are identified by a two-character code of the form Zz. The first character, an uppercase letter, specifies the addressing method; the second character, a lowercase letter, specifies the type of operand. For opcodes with two operands, the left code refers to the destination operand and the right code refers to the source operand. All MMX instructions, except the EMMS instruction, reference and operate on two operands.

Codes for Addressing Method

C The reg field of the ModR/M byte selects a control register; e.g., MOV (0F20, 0F22).
D The reg field of the ModR/M byte selects a debug register; e.g., MOV (0F21, 0F23).
E A ModR/M byte follows the opcode and specifies the operand. The operand is either a general register or a memory address. If it is a memory address, the address is computed from a segment register and any of the following values: a base register, an index register, a scaling factor, a displacement.
G The reg field of the ModR/M byte selects a general register; e.g., AX(000).
I Immediate data. The value of the operand is encoded in subsequent bytes of the instruction.
M The ModR/M byte may refer only to memory; e.g., LSS, LFS, LGS, CMPXCHG8B.
P The reg field of the ModR/M byte selects a packed quadword MMX register.
Q A ModR/M byte follows the opcode and specifies the operand. The operand is either an MMX register or a memory address. If it is a memory address, the address is computed from a segment register and any of the following values: a base register, an index register, a scaling factor, a displacement.
R The mod field of the ModR/M byte may refer only to a general register; e.g., MOV (0F20-0F24, 0F26).

Codes for Operand Type

b Byte (regardless of operand size attribute).
d Doubleword (regardless of operand size attribute).
p 32-bit or 48-bit pointer, depending on operand size attribute.
q Quadword (regardless of operand size attribute).
s Six-byte pseudo-descriptor.
v Word or doubleword, depending on operand size attribute.
w Word (regardless of operand size attribute).

Register Codes

When an operand is a specific register encoded in the opcode, the register is identified by its name, for example: AX, CL, or ESI. The name of the register indicates whether the register is 32-bits, 16-bits, or 8-bits wide. A register identifier of the form eXX is used when the width of the register depends on the oeprand size attribute; for example, eAX indicates that the AX register is used when the operand size attribute is 16 and the EAX register is used when the operand size attribute is 32.

Table D­ 1. TT_Opcode0to7 Opcode Map (First Byte is 0FH)
0
1
2
3
4
5
6
7
0
GRP 6
LAR
Gv, Ew
LSL
Gv, Ew
CLTS
1
2
MOV
Rd, Cd
MOV
Rd, Dd
MOV
Cd, Rd
MOV
Dd, Rd
3
WRMSR
RDTSC
RDMSR
4
5
6
PUNPCKLBW
Pq, Qd
PUNPCKLWD
Pq, Qd
PUNPCKLDQ
Pq, Qd
PACKSSWB
Pq, Qq
PCMPGTB
Pq, Qq
PCMPGTW
Pq, Qq
PCMPGTD
Pq, Qq
PACKUSWB
Pq, Qq
7
Grp A
PCMPEQB
Pq, Qq
PCMPEQW
Pq, Qq
PCMPEQD
Pq, Qq
EMMS
PSHIMW
PSHIMD
PSHIMQ
8Long-displacement jump on condition (Jv)
JO JNOJB JNBJZ JNZJBE JNBE
9Byte Set on condition (Eb)
SETO
SETNO
SETB
SETNB
SETZ
SETNZ
SETBE
SETNBE
A
PUSH
FS
POP
FS
CPUID
BT
Ev, Gv
SHLD
Ev, Gv, Ib
SHLD
Ev, Gv, CL
B
CMPXCH
Eb, Gb
CMPXCH
Ev, Gv
LSS
Mp
BTR
Ev, Gv
LFS
Mp
LGS
Mp
MOVZX
Gv, Eb
MOVZX
Gv, Ew
C
XADD
Eb, Gb
XADD
Ev, Gv
GRP 9
D
PSRLW
Pq, Qq
PSRLD
Pq, Qq
PSRLQ
Pq, Qq
PMULLW
Pq, Qq
E
PSRAW
Pq, Qq
PSRAD
Pq, Qq
PMULHW
Pq, Qq
F
PSLLW
Pq, Qq
PSLLD
Pq, Qq
PSLLQ
Pq, Qq
PMADDWD
Pq, Qq

Table D­1. Opcode Map (First Byte is 0FH) (Contd)
8
9
A
B
C
D
E
F
0
INVD
WB INVD
Illegal opcode
1
2
3
4
5
6
PUNPCKHBW
Pq, Qq
PUNP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