- •CONTENTS FOR VOLUME 2A AND 2B
- •1.2 Overview of Volume 2A and 2B: Instruction Set Reference
- •1.3 NOTATIONAL CONVENTIONS
- •1.3.1 Bit and Byte Order
- •1.3.2 Reserved Bits and Software Compatibility
- •1.3.3 Instruction Operands
- •1.3.4 Hexadecimal and Binary Numbers
- •1.3.5 Segmented Addressing
- •1.3.6 Exceptions
- •1.3.7 A New Syntax for CPUID, CR, and MSR Values
- •1.4 Related Literature
- •2.1.1 Instruction Prefixes
- •2.1.2 Opcodes
- •2.1.3 ModR/M and SIB Bytes
- •2.1.4 Displacement and Immediate Bytes
- •2.2.1 REX Prefixes
- •2.2.1.1 Encoding
- •2.2.1.2 More on REX Prefix Fields
- •2.2.1.3 Displacement
- •2.2.1.5 Immediates
- •2.2.2 Additional Encodings for Control and Debug Registers
- •CHAPTER 3 Instruction Set Reference, A-M
- •3.1 Interpreting the Instruction Reference Pages
- •3.1.1 Instruction Format
- •3.1.1.1 Opcode Column in the Instruction Summary Table
- •3.1.1.2 Instruction Column in the Opcode Summary Table
- •3.1.1.4 Compatibility/Legacy Mode Column in the Instruction Summary Table
- •3.1.1.5 Description Column in the Instruction Summary Table
- •3.1.1.6 Description Section
- •3.1.1.7 Operation Section
- •3.1.1.9 Flags Affected Section
- •3.1.1.10 FPU Flags Affected Section
- •3.1.1.11 Protected Mode Exceptions Section
- •3.1.1.16 Compatibility Mode Exceptions Section
- •ADDSUBPD: Packed Double-FP Add/Subtract
- •ADDSUBPS: Packed Single-FP Add/Subtract
- •FISTTP: Store Integer with Truncation
- •HADDPD: Packed Double-FP Horizontal Add
- •HADDPS: Packed Single-FP Horizontal Add
- •HSUBPD: Packed Double-FP Horizontal Subtract
- •HSUBPS: Packed Single-FP Horizontal Subtract
- •LDDQU: Load Unaligned Integer 128 Bits
- •MONITOR: Setup Monitor Address
- •MOVDDUP: Move One Double-FP and Duplicate
- •MOVSHDUP: Move Packed Single-FP High and Duplicate
- •MOVSLDUP: Move Packed Single-FP Low and Duplicate
- •MWAIT: Monitor Wait
- •INTEL SALES OFFICES
ABOUT THIS MANUAL
1.4RELATED LITERATURE
Literature related to IA-32 processors is listed on-line at this link: http://developer.intel.com/design/processor/
Some of the documents listed at this web site can be viewed on-line; others can be ordered. The literature available is listed by Intel® processor and then by the following literature types: applications notes, data sheets, manuals, papers, and specification updates.
See also:
•The data sheet for a particular Intel IA-32 processor
•The specification update for a particular Intel IA-32 processor
•AP-485, Intel Processor Identification and the CPUID Instruction, Order Number 241618
•IA-32 Intel® Architecture Optimization Reference Manual, Order Number 248966
Vol. 2A 1-7
ABOUT THIS MANUAL
1-8 Vol. 2A
2
Instruction Format
CHAPTER 2
INSTRUCTION FORMAT
This chapter describes the instruction format for all IA-32 processors. The instruction format for protected mode, real-address mode and virtual-8086 mode is described in Section 2.1. Increments provided for IA-32e mode and its sub-modes are described in Section 2.2
2.1INSTRUCTION FORMAT FOR PROTECTED MODE, REALADDRESS MODE, AND VIRTUAL-8086 MODE
IA-32 instruction encodings are subsets of the format shown in Figure 2-1. Instructions consist of optional instruction prefixes (in any order), primary opcode bytes (up to three bytes), an addressing-form specifier (if required) consisting of the ModR/M byte and sometimes the SIB (Scale-Index-Base) byte, a displacement (if required), and an immediate data field (if required).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Instruction |
|
Opcode |
|
|
|
ModR/M |
|
|
SIB |
|
Displacement |
Immediate |
|
||||||||
|
Prefixes |
|
|
|
|
|
|
|
|
|||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
Up to four |
1-, 2-, or 3-byte |
|
|
1 byte |
|
|
|
|
1 byte |
|
Address |
Immediate |
|
||||||||
|
prefixes of |
|
opcode |
|
(if required) |
(if required) |
displacement |
data of |
|
|||||||||||||
|
1 byte each |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
of 1, 2, or 4 |
1, 2, or 4 |
|
||
|
(optional) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bytes or none |
bytes or none |
|
|||
|
|
7 |
|
6 5 |
|
3 2 |
0 |
|
7 |
6 5 |
|
3 2 |
0 |
|
|
|
||||||
|
|
|
Mod |
|
Reg/ |
|
|
R/M |
|
|
|
Scale |
Index |
|
|
Base |
|
|
|
|||
|
|
|
|
Opcode |
|
|
|
|
|
|
|
|
|
|||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Figure 2-1. IA-32 Instruction Format
Vol. 2A 2-1