logo资料库

Intel80x86 OPCODEs - 80x86机器码汇编对照表.pdf

第1页 / 共566页
第2页 / 共566页
第3页 / 共566页
第4页 / 共566页
第5页 / 共566页
第6页 / 共566页
第7页 / 共566页
第8页 / 共566页
资料共566页,剩余部分请下载后查看
CHAPTER 1: ABOUT THIS MANUAL
1.1. OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 2: INSTRUCTION SET REFERENCE
1.2. OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 1: BASIC ARCHITECTURE
1.3. OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 3: SYSTEM PROGRAMMING GUIDE
1.4. NOTATIONAL CONVENTIONS
1.4.1. Bit and Byte Order
1.4.2. Reserved Bits and Software Compatibility
1.4.3. Instruction Operands
1.4.4. Hexadecimal and Binary Numbers
1.4.5. Segmented Addressing
1.4.6. Exceptions
1.5. RELATED LITERATURE
CHAPTER 2: INSTRUCTION FORMAT
2.1. GENERAL INSTRUCTION FORMAT
2.2. INSTRUCTION PREFIXES
2.3. OPCODE
2.4. MODR/M AND SIB BYTES
2.5. DISPLACEMENT AND IMMEDIATE BYTES
2.6. ADDRESSING-MODE ENCODING OF MODR/M AND SIB BYTES
CHAPTER 3: INSTRUCTION SET REFERENCE
3.1. INTERPRETING THE INSTRUCTION REFERENCE PAGES
3.1.1. Instruction Format
3.1.1.1. OPCODE COLUMN
3.1.1.2. INSTRUCTION COLUMN
3.1.1.3. DESCRIPTION COLUMN
3.1.1.4. DESCRIPTION
3.1.2. Operation
3.1.3. Flags Affected
3.1.4. FPU Flags Affected
3.1.5. Protected Mode Exceptions
3.1.6. Real-Address Mode Exceptions
3.1.7. Virtual-8086 Mode Exceptions
3.1.8. Floating-Point Exceptions
3.2. INSTRUCTION REFERENCE
APPENDIX A: OPCODE MAP
A.1. KEY TO ABBREVIATIONS
A.1.1. Codes for Addressing Method
A.1.2. Codes for Operand Type
A.1.3. Register Codes
A.2. ONE-BYTE OPCODE INTEGER INSTRUCTIONS
A.3. TWO-BYTE OPCODE INTEGER INSTRUCTIONS
A.4. OPCODE EXTENSIONS FOR ONE- AND TWO-BYTE OPCODES
A.5. ESCAPE OPCODE INSTRUCTIONS
A.5.1. Escape Opcodes with D8 as First Byte
A.5.2. Escape Opcodes with D9 as First Byte
A.5.3. Escape Opcodes with DA as First Byte
A.5.4. Escape Opcodes with DB as First Byte
A.5.5. Escape Opcodes with DC as First Byte
A.5.6. Escape Opcodes with DD as First Byte
A.5.7. Escape Opcodes with DE as First Byte
A.5.8. Escape Opcodes with DF As First Byte
APPENDIX B: INSTRUCTION FORMATS AND ENCODINGS
B.1. MACHINE INSTRUCTION FORMAT
B.1.1. Reg Field (reg)
B.1.2. Encoding of Operand Size Bit (w)
B.1.3. Sign Extend (s) Bit
B.1.4. Segment Register Field (sreg)
B.1.5. Special-Purpose Register (eee) Field
B.1.6. Condition Test Field (tttn)
B.1.7. Direction (d) Bit
B.2. INTEGER INSTRUCTION FORMATS AND ENCODINGS
B.3. MMX™ INSTRUCTION FORMATS AND ENCODINGS
B.3.1. Granularity Field (gg)
B.3.2. MMX™ and General-Purpose Register Fields (mmxreg and reg)
B.3.3. MMX™ Instruction Formats and Encodings Table
B.4. FLOATING-POINT INSTRUCTION FORMATS AND ENCODINGS
INDEX
ch01.bk : title.fm4 Page 1 Friday, January 17, 1997 12:59 PM Intel Architecture Software Developer’s Manual Volume 2: Instruction Set Reference NOTE: The Intel Architecture Software Developer’s Manual consists of three volumes: Basic Architecture, Order Number 243190; Instruction Set Reference, Order Number 243191; and the System Programming Guide, Order Number 243192. Please refer to all three volumes when evaluating your design needs. 1997
Information in this document is provided in connection with Intel products. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted by this document. Except as provided in Intel's Terms and Conditions of Sale for such products, Intel assumes no liability whatsoever, and Intel disclaims any express or implied warranty, relating to sale and/or use of Intel products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Intel products are not intended for use in medical, life saving, or life sustaining applications. Intel may make changes to specifications and product descriptions at any time, without notice. Designers must not rely on the absence or characteristics of any features or instructions marked "reserved" or "undefined." Intel reserves these for future definition and shall have no responsibility whatsoever for conflicts or incompatibilities arising from future changes to them. Intel’s Intel Architecture processors (e.g., Pentium® processor, Pentium processor with MMX™ technology, and Pentium Pro processor) may contain design defects or errors known as errata which may cause the product to deviate from published specifications. Such errata are not covered by Intel’s warranty. Current characterized errata are available on request. Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order. Copies of documents which have an ordering number and are referenced in this document, or other Intel literature, may be obtained from: Intel Corporation P.O. Box 7641 Mt. Prospect IL 60056-7641 or call 1-800-879-4683 or visit Intel’s website at http:\\www.intel.com Copyright © Intel Corporation 1996, 1997. * Third-party brands and names are the property of their respective owners. 3/26/97 1:23 PM IADISC2.DOC
ch01.bk : ch01.toc Page v Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE CHAPTER 1 ABOUT THIS MANUAL 1.1. OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 2: INSTRUCTION SET REFERENCE . . . . . .1-1 OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 1: BASIC ARCHITECTURE . . . . . . . . . . . . . .1-2 OVERVIEW OF THE INTEL ARCHITECTURE SOFTWARE DEVELOPER’S MANUAL, VOLUME 3: SYSTEM PROGRAMMING GUIDE . . . . . .1-3 NOTATIONAL CONVENTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-5 Bit and Byte Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-5 Reserved Bits and Software Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-5 Instruction Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6 Hexadecimal and Binary Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-6 Segmented Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-7 Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-7 RELATED LITERATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-8 1.2. 1.3. 1.4. 1.4.1. 1.4.2. 1.4.3. 1.4.4. 1.4.5. 1.4.6. 1.5. CHAPTER 2 INSTRUCTION FORMAT 2.1. 2.2. 2.3. 2.4. 2.5. 2.6. GENERAL INSTRUCTION FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1 INSTRUCTION PREFIXES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-1 OPCODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 MODR/M AND SIB BYTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-2 DISPLACEMENT AND IMMEDIATE BYTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-3 ADDRESSING-MODE ENCODING OF MODR/M AND SIB BYTES . . . . . . . . . . . . .2-3 CHAPTER 3 INSTRUCTION SET REFERENCE 3.1. 3.1.1. 3.1.1.1. 3.1.1.2. 3.1.1.3. 3.1.1.4. 3.1.2. 3.1.3. 3.1.4. 3.1.5. 3.1.6. 3.1.7. 3.1.8. 3.2. INTERPRETING THE INSTRUCTION REFERENCE PAGES . . . . . . . . . . . . . . . . .3-1 Instruction Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1 Opcode Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-1 Instruction Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-2 Description Column . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-4 Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-5 Flags Affected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8 FPU Flags Affected . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8 Protected Mode Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-8 Real-Address Mode Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 Virtual-8086 Mode Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-9 Floating-Point Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10 INSTRUCTION REFERENCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10 AAA—ASCII Adjust After Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-11 AAD—ASCII Adjust AX Before Division. . . . . . . . . . . . . . . . . . . . . . . . . . .3-12 AAM—ASCII Adjust AX After Multiply . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-13 AAS—ASCII Adjust AL After Subtraction. . . . . . . . . . . . . . . . . . . . . . . . . .3-14 ADC—Add with Carry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-15 ADD—Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-17 v
ch01.bk : ch01.toc Page vi Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE AND—Logical AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-19 ARPL—Adjust RPL Field of Segment Selector . . . . . . . . . . . . . . . . . . . . .3-21 BOUND—Check Array Index Against Bounds. . . . . . . . . . . . . . . . . . . . . .3-23 BSF—Bit Scan Forward. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-25 BSR—Bit Scan Reverse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-27 BSWAP—Byte Swap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-29 BT—Bit Test. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-30 BTC—Bit Test and Complement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-32 BTR—Bit Test and Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-34 BTS—Bit Test and Set. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-36 CALL—Call Procedure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-38 CBW/CWDE—Convert Byte to Word/Convert Word to Doubleword . . . . .3-49 CDQ—Convert Double to Quad. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-50 CLC—Clear Carry Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-51 CLD—Clear Direction Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-52 CLI—Clear Interrupt Flag. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-53 CLTS—Clear Task-Switched Flag in CR0 . . . . . . . . . . . . . . . . . . . . . . . . .3-55 CMC—Complement Carry Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-56 CMOVcc—Conditional Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-57 CMP—Compare Two Operands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-61 CMPS/CMPSB/CMPSW/CMPSD—Compare String Operands . . . . . . . .3-63 CMPXCHG—Compare and Exchange . . . . . . . . . . . . . . . . . . . . . . . . . . .3-66 CMPXCHG8B—Compare and Exchange 8 Bytes. . . . . . . . . . . . . . . . . . .3-68 CPUID—CPU Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-70 CWD/CDQ—Convert Word to Doubleword/Convert Doubleword to Quadword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-77 CWDE—Convert Word to Doubleword . . . . . . . . . . . . . . . . . . . . . . . . . . .3-78 DAA—Decimal Adjust AL after Addition . . . . . . . . . . . . . . . . . . . . . . . . . .3-79 DAS—Decimal Adjust AL after Subtraction . . . . . . . . . . . . . . . . . . . . . . . .3-81 DEC—Decrement by 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-82 DIV—Unsigned Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-84 EMMS—Empty MMX™ State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-87 ENTER—Make Stack Frame for Procedure Parameters. . . . . . . . . . . . . .3-88 F2XM1—Compute 2x–1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-91 FABS—Absolute Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-93 FADD/FADDP/FIADD—Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-95 FBLD—Load Binary Coded Decimal . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-98 FBSTP—Store BCD Integer and Pop . . . . . . . . . . . . . . . . . . . . . . . . . . .3-100 FCHS—Change Sign. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-103 FCLEX/FNCLEX—Clear Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-105 FCMOVcc—Floating-Point Conditional Move . . . . . . . . . . . . . . . . . . . . .3-107 FCOM/FCOMP/FCOMPP—Compare Real . . . . . . . . . . . . . . . . . . . . . . .3-109 FCOMI/FCOMIP/ FUCOMI/FUCOMIP—Compare Real and Set EFLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-112 FCOS—Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-115 FDECSTP—Decrement Stack-Top Pointer . . . . . . . . . . . . . . . . . . . . . . .3-117 FDIV/FDIVP/FIDIV—Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-118 vi
ch01.bk : ch01.toc Page vii Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE FDIVR/FDIVRP/FIDIVR—Reverse Divide . . . . . . . . . . . . . . . . . . . . . . . 3-122 FFREE—Free Floating-Point Register. . . . . . . . . . . . . . . . . . . . . . . . . . 3-126 FICOM/FICOMP—Compare Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-127 FILD—Load Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-129 FINCSTP—Increment Stack-Top Pointer . . . . . . . . . . . . . . . . . . . . . . . 3-131 FINIT/FNINIT—Initialize Floating-Point Unit. . . . . . . . . . . . . . . . . . . . . . 3-132 FIST/FISTP—Store Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-134 FLD—Load Real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-137 FLD1/FLDL2T/FLDL2E/FLDPI/FLDLG2/FLDLN2/FLDZ— Load Constant . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-139 FLDCW—Load Control Word. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-141 FLDENV—Load FPU Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-143 FMUL/FMULP/FIMUL—Multiply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-145 FNOP—No Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-148 FPATAN—Partial Arctangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-149 FPATAN—Partial Arctangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-151 FPREM1—Partial Remainder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-154 FPTAN—Partial Tangent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-157 FRNDINT—Round to Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-159 FRSTOR—Restore FPU State. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-160 FSAVE/FNSAVE—Store FPU State . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-162 FSCALE—Scale. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-165 FSIN—Sine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-167 FSINCOS—Sine and Cosine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-169 FSQRT—Square Root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-171 FST/FSTP—Store Real . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-173 FSTCW/FNSTCW—Store Control Word . . . . . . . . . . . . . . . . . . . . . . . . 3-176 FSTENV/FNSTENV—Store FPU Environment . . . . . . . . . . . . . . . . . . . 3-178 FSTSW/FNSTSW—Store Status Word . . . . . . . . . . . . . . . . . . . . . . . . . 3-180 FSUB/FSUBP/FISUB—Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-182 FSUBR/FSUBRP/FISUBR—Reverse Subtract . . . . . . . . . . . . . . . . . . . 3-185 FTST—TEST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-188 FUCOM/FUCOMP/FUCOMPP—Unordered Compare Real . . . . . . . . . 3-190 FWAIT—Wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-193 FXAM—Examine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-194 FXCH—Exchange Register Contents . . . . . . . . . . . . . . . . . . . . . . . . . . 3-196 FXTRACT—Extract Exponent and Significand . . . . . . . . . . . . . . . . . . . 3-198 FYL2X—Compute y * log2x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-200 FYL2XP1—Compute y * log2(x +1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-202 HLT—Halt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-204 IDIV—Signed Divide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-205 IMUL—Signed Multiply. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-208 IN—Input from Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-211 INC—Increment by 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-213 INS/INSB/INSW/INSD—Input from Port to String . . . . . . . . . . . . . . . . . 3-215 INT n/INTO/INT 3—Call to Interrupt Procedure . . . . . . . . . . . . . . . . . . . 3-218 INVD—Invalidate Internal Caches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-230 vii
ch01.bk : ch01.toc Page viii Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE INVLPG—Invalidate TLB Entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-232 IRET/IRETD—Interrupt Return . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-233 Jcc—Jump if Condition Is Met . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-241 JMP—Jump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-245 LAHF—Load Status Flags into AH Register . . . . . . . . . . . . . . . . . . . . . .3-252 LAR—Load Access Rights Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-253 LDS/LES/LFS/LGS/LSS—Load Far Pointer . . . . . . . . . . . . . . . . . . . . . .3-256 LEA—Load Effective Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-259 LEAVE—High Level Procedure Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-261 LES—Load Full Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-263 LFS—Load Full Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-264 LGDT/LIDT—Load Global/Interrupt Descriptor Table Register . . . . . . . .3-265 LGS—Load Full Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-267 LLDT—Load Local Descriptor Table Register . . . . . . . . . . . . . . . . . . . . .3-268 LIDT—Load Interrupt Descriptor Table Register . . . . . . . . . . . . . . . . . . .3-270 LMSW—Load Machine Status Word . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-271 LOCK—Assert LOCK# Signal Prefix . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-273 LODS/LODSB/LODSW/LODSD—Load String . . . . . . . . . . . . . . . . . . . .3-275 LOOP/LOOPcc—Loop According to ECX Counter . . . . . . . . . . . . . . . . .3-278 LSL—Load Segment Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-280 LSS—Load Full Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-283 LTR—Load Task Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-284 MOV—Move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-286 MOV—Move to/from Control Registers . . . . . . . . . . . . . . . . . . . . . . . . . .3-291 MOV—Move to/from Debug Registers . . . . . . . . . . . . . . . . . . . . . . . . . .3-293 MOVD—Move 32 Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-295 MOVQ—Move 64 Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-297 MOVS/MOVSB/MOVSW/MOVSD—Move Data from String to String . . .3-299 MOVSX—Move with Sign-Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-302 MOVZX—Move with Zero-Extend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-304 MUL—Unsigned Multiply . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-306 NEG—Two's Complement Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-308 NOP—No Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-310 NOT—One's Complement Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-311 OR—Logical Inclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-313 OUT—Output to Port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-315 OUTS/OUTSB/OUTSW/OUTSD—Output String to Port . . . . . . . . . . . . .3-317 PACKSSWB/PACKSSDW—Pack with Signed Saturation . . . . . . . . . . .3-320 PACKUSWB—Pack with Unsigned Saturation . . . . . . . . . . . . . . . . . . . .3-323 PADDB/PADDW/PADDD—Packed Add . . . . . . . . . . . . . . . . . . . . . . . . .3-325 PADDSB/PADDSW—Packed Add with Saturation . . . . . . . . . . . . . . . . .3-328 PADDUSB/PADDUSW—Packed Add Unsigned with Saturation . . . . . .3-331 PAND—Logical AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-334 PANDN—Logical AND NOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-336 PCMPEQB/PCMPEQW/PCMPEQD—Packed Compare for Equal . . . . .3-338 PCMPGTB/PCMPGTW/PCMPGTD—Packed Compare for Greater Than . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-341 viii
ch01.bk : ch01.toc Page ix Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE PMADDWD—Packed Multiply and Add . . . . . . . . . . . . . . . . . . . . . . . . . 3-344 PMULHW—Packed Multiply High . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-346 PMULLW—Packed Multiply Low . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-348 POP—Pop a Value from the Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-350 POPA/POPAD—Pop All General-Purpose Registers . . . . . . . . . . . . . . 3-354 POPF/POPFD—Pop Stack into EFLAGS Register . . . . . . . . . . . . . . . . 3-356 POR—Bitwise Logical OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-359 PSLLW/PSLLD/PSLLQ—Packed Shift Left Logical . . . . . . . . . . . . . . . . 3-361 PSRAW/PSRAD—Packed Shift Right Arithmetic. . . . . . . . . . . . . . . . . . 3-364 PSRLW/PSRLD/PSRLQ—Packed Shift Right Logical. . . . . . . . . . . . . . 3-367 PSUBB/PSUBW/PSUBD—Packed Subtract . . . . . . . . . . . . . . . . . . . . . 3-370 PSUBSB/PSUBSW—Packed Subtract with Saturation . . . . . . . . . . . . . 3-373 PSUBUSB/PSUBUSW—Packed Subtract Unsigned with Saturation . . 3-376 PUNPCKHBW/PUNPCKHWD/PUNPCKHDQ— Unpack High Packed Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-379 PUNPCKLBW/PUNPCKLWD/PUNPCKLDQ— Unpack Low Packed Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-382 PUSH—Push Word or Doubleword Onto the Stack. . . . . . . . . . . . . . . . 3-385 PUSHA/PUSHAD—Push All General-Purpose Registers . . . . . . . . . . . 3-388 PUSHF/PUSHFD—Push EFLAGS Register onto the Stack . . . . . . . . . 3-390 PXOR—Logical Exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-392 RCL/RCR/ROL/ROR-—Rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-394 RDMSR—Read from Model Specific Register. . . . . . . . . . . . . . . . . . . . 3-399 RDPMC—Read Performance-Monitoring Counters. . . . . . . . . . . . . . . . 3-401 RDTSC—Read Time-Stamp Counter . . . . . . . . . . . . . . . . . . . . . . . . . . 3-403 REP/REPE/REPZ/REPNE /REPNZ—Repeat String Operation Prefix . 3-404 RET—Return from Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-407 ROL/ROR—Rotate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-413 RSM—Resume from System Management Mode . . . . . . . . . . . . . . . . . 3-414 SAHF—Store AH into Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-415 SAL/SAR/SHL/SHR—Shift. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-416 SBB—Integer Subtraction with Borrow . . . . . . . . . . . . . . . . . . . . . . . . . 3-420 SCAS/SCASB/SCASW/SCASD—Scan String. . . . . . . . . . . . . . . . . . . . 3-422 SETcc—Set Byte on Condition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-425 SGDT/SIDT—Store Global/Interrupt Descriptor Table Register . . . . . . 3-427 SHL/SHR—Shift Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-429 SHLD—Double Precision Shift Left . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-430 SHRD—Double Precision Shift Right. . . . . . . . . . . . . . . . . . . . . . . . . . . 3-432 SIDT—Store Interrupt Descriptor Table Register. . . . . . . . . . . . . . . . . . 3-434 SLDT—Store Local Descriptor Table Register. . . . . . . . . . . . . . . . . . . . 3-435 SMSW—Store Machine Status Word . . . . . . . . . . . . . . . . . . . . . . . . . . 3-437 STC—Set Carry Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-439 STD—Set Direction Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-440 STI—Set Interrupt Flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-441 STOS/STOSB/STOSW/STOSD—Store String . . . . . . . . . . . . . . . . . . . 3-443 STR—Store Task Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-446 SUB—Subtract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-448 ix
ch01.bk : ch01.toc Page x Friday, January 17, 1997 12:59 PM TABLE OF CONTENTS PAGE TEST—Logical Compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-450 UD2—Undefined Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-452 VERR, VERW—Verify a Segment for Reading or Writing . . . . . . . . . . . .3-453 WAIT/FWAIT—Wait . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-455 WBINVD—Write Back and Invalidate Cache. . . . . . . . . . . . . . . . . . . . . .3-456 WRMSR—Write to Model Specific Register . . . . . . . . . . . . . . . . . . . . . .3-458 XADD—Exchange and Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-460 XCHG—Exchange Register/Memory with Register. . . . . . . . . . . . . . . . .3-462 XLAT/XLATB—Table Look-up Translation . . . . . . . . . . . . . . . . . . . . . . .3-464 XOR—Logical Exclusive OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-466 APPENDIX A OPCODE MAP A.1. A.1.1. A.1.2. A.1.3. A.2. A.3. A.4. A.5. A.5.1. A.5.2. A.5.3. A.5.4. A.5.5. A.5.6. A.5.7. A.5.8. KEY TO ABBREVIATIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 Codes for Addressing Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-1 Codes for Operand Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-2 Register Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-3 ONE-BYTE OPCODE INTEGER INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . A-3 TWO-BYTE OPCODE INTEGER INSTRUCTIONS. . . . . . . . . . . . . . . . . . . . . . . . . A-3 OPCODE EXTENSIONS FOR ONE- AND TWO-BYTE OPCODES . . . . . . . . . . . . A-8 ESCAPE OPCODE INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-9 Escape Opcodes with D8 as First Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-10 Escape Opcodes with D9 as First Byte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-12 Escape Opcodes with DA as First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-14 Escape Opcodes with DB as First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-16 Escape Opcodes with DC as First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-18 Escape Opcodes with DD as First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-20 Escape Opcodes with DE as First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-22 Escape Opcodes with DF As First Byte. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-24 APPENDIX B INSTRUCTION FORMATS AND ENCODINGS B.1. B.1.1. B.1.2. B.1.3. B.1.4. B.1.5. B.1.6. B.1.7. B.2. B.3. B.3.1. B.3.2. MACHINE INSTRUCTION FORMAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1 Reg Field (reg). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2 Encoding of Operand Size Bit (w) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 Sign Extend (s) Bit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-3 Segment Register Field (sreg). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4 Special-Purpose Register (eee) Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-4 Condition Test Field (tttn) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5 Direction (d) Bit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5 INTEGER INSTRUCTION FORMATS AND ENCODINGS . . . . . . . . . . . . . . . . . . . B-6 MMX™ INSTRUCTION FORMATS AND ENCODINGS . . . . . . . . . . . . . . . . . . . . B-19 Granularity Field (gg). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-19 MMX™ and General-Purpose Register Fields (mmxreg and reg) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-19 MMX™ Instruction Formats and Encodings Table . . . . . . . . . . . . . . . . . . . . . . B-20 FLOATING-POINT INSTRUCTION FORMATS AND ENCODINGS . . . . . . . . . . . B-24 B.3.3. B.4. x
分享到:
收藏