- •A.1 Notes on Using OPCODE Tables
- •A.2 Key to Abbreviations
- •A.2.1 Codes for Addressing Method
- •A.2.2 Codes for Operand Type
- •A.2.3 Register Codes
- •A.3 Opcode Look-up Examples
- •A.3.1 One-Byte Opcode Instructions
- •A.3.2 Two-Byte Opcode Instructions
- •A.3.3 Opcode Map Notes
- •A.3.4 Opcode Extensions for One-Byte and Two-Byte Opcodes
- •A.3.5 Escape Opcode Instructions
- •A.3.5.1 Escape Opcodes with D8 as First Byte
- •A.3.5.2 Escape Opcodes with D9 as First Byte
- •A.3.5.3 Escape Opcodes with DA as First Byte
- •A.3.5.4 Escape Opcodes with DB as First Byte
- •A.3.5.5 Escape Opcodes with DC as First Byte
- •A.3.5.6 Escape Opcodes with DD as First Byte
- •A.3.5.7 Escape Opcodes with DE as First Byte
- •A.3.5.8 Escape Opcodes with DF As First Byte
- •APPENDIX B Instruction Formats and Encodings
- •B.1 Machine Instruction Format
- •B.1.1 Legacy Prefixes
- •B.1.2 REX Prefixes
- •B.1.3 Opcode Fields
- •B.1.4 Special Fields
- •B.1.4.1 Reg Field (reg) for Non-64-Bit Modes
- •B.1.4.2 Reg Field (reg) for 64-Bit Mode
- •B.1.4.3 Encoding of Operand Size (w) Bit
- •B.1.4.4 Sign-Extend (s) Bit
- •B.1.4.5 Segment Register (sreg) Field
- •B.1.4.6 Special-Purpose Register (eee) Field
- •B.1.4.7 Condition Test (tttn) Field
- •B.1.4.8 Direction (d) Bit
- •B.1.5 Other Notes
- •B.2 General-Purpose Instruction Formats and Encodings for Non-64-Bit Modes
- •B.2.1 General Purpose Instruction Formats and Encodings for 64-Bit Mode
- •B.4 64-bit Mode Instruction Encodings for SIMD Instruction Extensions
- •B.5 MMX Instruction Formats and Encodings
- •B.5.1 Granularity Field (gg)
- •B.5.3 MMX Instruction Formats and Encodings Table
- •B.6 P6 Family INstruction Formats and Encodings
- •B.7 SSE Instruction Formats and Encodings
- •B.8 SSE2 Instruction Formats and Encodings
- •B.8.1 Granularity Field (gg)
- •B.9 SSE3 Formats and Encodings Table
- •B.10 Special Encodings for 64-Bit Mode
- •B.11 Floating-Point Instruction Formats and Encodings
- •C.1 Simple Intrinsics
- •INDEX FOR VOLUME 2A & 2B
- •INTEL SALES OFFICES
OPCODE MAP
A.3.5 Escape Opcode Instructions
Opcode maps for coprocessor escape instruction opcodes (x87 floating-point instruction opcodes) are in Table A-8 through Table A-23. These maps are grouped by the first byte of the opcode, from D8-DF. Each of these opcodes has a ModR/M byte. If the ModR/M byte is within the range of 00H-BFH, bits 3-5 of the ModR/M byte are used as an opcode extension, similar to the technique used for 1-and 2-byte opcodes (see Section A.3.4). If the ModR/M byte is outside the range of 00H through BFH, the entire ModR/M byte is used as an opcode extension.
Example A-3. Opcode with ModR/M Byte in the 00H through BFH Range
DD0504000000H can be interpreted as follows:
•The instruction encoded with this opcode can be located in Section A.3.5.6. Since the ModR/M byte (05H) is within the 00H through BFH range, bits 3 through 5 (000) of this byte indicate the opcode for an FLD double-real instruction (see Table A-10).
•The double-real value to be loaded is at 00000004H (the 32-bit displacement that follows and belongs to this opcode).
Example A-4. Opcode with ModR/M Byte outside the 00H through BFH Range
D8C1H can be interpreted as follows:
•This example illustrates an opcode with a ModR/M byte outside the range of 00H through BFH. The instruction can be located in Section A.3.4.
•In Table A-9, the ModR/M byte C1H indicates row C, column 1 (the FADD instruction using ST(0), ST(1) as operands).
A-22 Vol. 2B
OPCODE MAP
A.3.5.1 ESCAPE OPCODES WITH D8 AS FIRST BYTE
Table A-8 and Table A-9 contain opcode maps for the escape instruction opcodes that begin with D8H. Table A-8 shows the opcode map if the accompanying ModR/M byte within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.
Table A-8. D8 Opcode Map When ModR/M Byte is Within 00H to BFH†
nnn Field of ModR/M Byte
000B |
001B |
010B |
011B |
100B |
101B |
110B |
111B |
|
|
|
|
|
|
|
|
NOTES:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
Table A-9 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.
Table A-9. D8 Opcode Map When ModR/M Byte is Outside 00H to BFH†
|
0 |
1 |
2 |
3 |
|
4 |
5 |
6 |
7 |
|
|
|
|
|
|
|
|
|
|
C |
|
|
|
|
FADD |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
D |
|
|
|
|
FCOM |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),T(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
E |
|
|
|
|
FSUB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
F |
|
|
|
|
FDIV |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
9 |
A |
B |
|
C |
D |
E |
F |
|
|
|
|
|
|
|
|
|
|
C |
|
|
|
|
FMUL |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
D |
|
|
|
FCOMP |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),T(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
E |
|
|
|
FSUBR |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
F |
|
|
|
FDIVR |
|
|
|
||
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
NOTES:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
Vol. 2B A-23
OPCODE MAP
A.3.5.2 ESCAPE OPCODES WITH D9 AS FIRST BYTE
Table A-10 and Table A-11 contain opcode maps for escape instruction opcodes that begin with D9H. Table A-10 shows the opcode map if the accompanying ModR/M byte is within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.
Table A-10. D9 Opcode Map When ModR/M Byte is Within 00H to BFH†
nnn Field of ModR/M Byte
000B |
001B |
010B |
011B |
100B |
101B |
110B |
111B |
|
|
|
|
|
|
|
|
FLD |
|
FST |
FSTP |
FLDENV |
FLDCW |
FNSTENV |
FNSTCW |
single-real |
|
single-real |
single-real |
14/28 bytes |
2 bytes |
14/28 bytes |
2 bytes |
|
|
|
|
|
|
|
|
NOTE:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
Table A-11 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.
Table A-11. D9 Opcode Map When ModR/M Byte is Outside 00H to BFH†
|
0 |
1 |
2 |
3 |
|
4 |
5 |
6 |
7 |
|
|
|
|
|
|
|
|
|
|
C |
|
|
|
|
FLD |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
D |
FNOP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
E |
FCHS |
FABS |
|
|
|
FTST |
FXAM |
|
|
|
|
|
|
|
|
|
|
|
|
F |
F2XM1 |
FYL2X |
FPTAN |
FPATAN |
|
FXTRACT |
FPREM1 |
FDECSTP |
FINCSTP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
9 |
A |
B |
|
C |
D |
E |
F |
|
|
|
|
|
|
|
|
|
|
C |
|
|
|
|
FXCH |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
|
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
|
D |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
E |
FLD1 |
FLDL2T |
FLDL2E |
FLDPI |
|
FLDLG2 |
FLDLN2 |
FLDZ |
|
|
|
|
|
|
|
|
|
|
|
F |
FPREM |
FYL2XP1 |
FSQRT |
FSINCOS |
|
FRNDINT |
FSCALE |
FSIN |
FCOS |
|
|
|
|
|
|
|
|
|
|
NOTES:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
A-24 Vol. 2B
OPCODE MAP
A.3.5.3 ESCAPE OPCODES WITH DA AS FIRST BYTE
Table A-12 and Table A-13 contain the opcode maps for the escape instruction opcodes that begin with DAH. Table A-12 shows the opcode map if the accompanying ModR/M byte within the range of 00H-BFH. Here, the value of bits 3-5 (nnn field in Figure A-1) selects the instruction.
Table A-12. DA Opcode Map When ModR/M Byte is Within 00H to BFH†
nnn Field of ModR/M Byte
000B |
001B |
010B |
011B |
100B |
101B |
110B |
111B |
|
|
|
|
|
|
|
|
FIADD |
FIMUL |
FICOM |
FICOMP |
FISUB |
FISUBR |
FIDIV |
FIDIVR |
dword-integer |
dword-integer |
dword-integer |
dword-integer |
dword-integer |
dword-integer |
dword-integer |
dword-integer |
NOTES:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
Table A-13 shows the opcode map if the accompanying ModR/M byte is outside the range of 00H-BFH. Here, the first digit of the ModR/M byte selects the row in the table and the second digit selects the column.
Table A-13. DA Opcode Map When ModR/M Byte is Outside 00H to BFH†
|
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
|
|
|
|
|
|
|
|
|
C |
|
|
|
FCMOVB |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
D |
|
|
|
FCMOVBE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
E |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
F |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
9 |
A |
B |
C |
D |
E |
F |
|
|
|
|
|
|
|
|
|
C |
|
|
|
FCMOVE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
D |
|
|
|
FCMOVU |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ST(0),ST(0) |
ST(0),ST(1) |
ST(0),ST(2) |
ST(0),ST(3) |
ST(0),ST(4) |
ST(0),ST(5) |
ST(0),ST(6) |
ST(0),ST(7) |
|
|
|
|
|
|
|
|
|
E |
|
FUCOMPP |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
F |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
NOTES:
†All blanks in the opcode map are reserved and must not be used. Do not depend on the operation of undefined or reserved opcodes.
Vol. 2B A-25