Volume 3: General-Purpose and System Instructions - Stanford ...
Volume 3: General-Purpose and System Instructions - Stanford ... Volume 3: General-Purpose and System Instructions - Stanford ...
AMD64 Technology 24594 Rev. 3.10 February 2005Table B-3.Reassigned Instructions in 64-Bit ModeMnemonicOpcode(hex)DescriptionARPL 63DEC and INC 40-4FOpcode for MOVSXD instruction in 64-bit mode.In all other modes, this is the Adjust RequestorPrivilege Level instruction opcode.REX prefixes in 64-bit mode. In all other modes,decrement by 1 and increment by 1.Table B-4 lists instructions that are illegal in long mode.Attempted use of these instructions generates an invalidopcodeexception (#UD).Table B-4.Invalid Instructions in Long ModeMnemonicOpcode(hex)DescriptionSYSENTER 0F 34 System CallSYSEXIT 0F 35 System ReturnB.4 Instructions with 64-Bit Default Operand SizeIn 64-bit mode, two groups of instructions default to 64-bitoperand size without the need for a REX prefix:• Near branches —CALL, Jcc, JrCX, JMP, LOOP, and RET.• All instructions, except far branches, that implicitly referencethe RSP—CALL, ENTER, LEAVE, POP, PUSH, and RET(CALL and RET are in both groups of instructions).Table B-5 lists these instructions.446 Appendix B: General-Purpose Instructions in 64-Bit Mode
24594 Rev. 3.10 February 2005 AMD64 TechnologyTable B-5.Instructions Defaulting to 64-Bit Operand SizeMnemonicOpcode(hex)ImplicitlyReferenceRSPDescriptionCALL E8, FF /2 yes Call Procedure NearENTER C8 yes Create Procedure Stack FrameJcc many no Jump Conditional NearJMP E9, EB, FF /4 no Jump NearLEAVE C9 yes Delete Procedure Stack FrameLOOP E2 no LoopLOOPcc E0, E1 no Loop ConditionalPOP reg/mem 8F /0 yes Pop Stack (register or memory)POP reg 58-5F yes Pop Stack (register)POP FS 0F A1 yesPOP GS 0F A9 yesPOPF, POPFD,POPFQ9DyesPUSH imm8 6A yesPUSH imm32 68 yesPUSH reg/mem FF /6 yesPop Stack into FS SegmentRegisterPop Stack into GS SegmentRegisterPop to rFLAGS Word,Doubleword, or QuadwordPush onto Stack (sign-extendedbyte)Push onto Stack (sign-extendeddoubleword)Push onto Stack (register ormemory)PUSH reg 50-57 yes Push onto Stack (register)PUSH FS 0F A0 yesPush FS Segment Register ontoStackAppendix B: General-Purpose Instructions in 64-Bit Mode 447
- Page 426 and 427: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 428 and 429: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 430 and 431: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 432 and 433: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 434 and 435: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 436 and 437: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 438 and 439: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 440 and 441: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 442 and 443: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 444 and 445: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 446 and 447: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 448 and 449: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 450 and 451: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 452 and 453: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 454 and 455: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 456 and 457: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 458 and 459: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 460 and 461: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 462 and 463: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 464 and 465: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 466 and 467: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 468 and 469: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 470 and 471: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 472 and 473: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 474 and 475: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 478 and 479: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 480 and 481: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 482 and 483: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 484 and 485: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 486 and 487: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 488 and 489: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 490 and 491: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 492 and 493: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 494 and 495: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 496 and 497: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 498 and 499: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 500 and 501: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 502 and 503: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 504 and 505: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 506 and 507: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 508 and 509: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 510 and 511: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 512 and 513: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 514 and 515: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 516 and 517: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 518 and 519: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 520 and 521: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 522 and 523: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 524 and 525: AMD64 Technology 24594 Rev. 3.10 Fe
AMD64 Technology 24594 Rev. 3.10 February 2005Table B-3.Reassigned <strong>Instructions</strong> in 64-Bit ModeMnemonicOpcode(hex)DescriptionARPL 63DEC <strong>and</strong> INC 40-4FOpcode for MOVSXD instruction in 64-bit mode.In all other modes, this is the Adjust RequestorPrivilege Level instruction opcode.REX prefixes in 64-bit mode. In all other modes,decrement by 1 <strong>and</strong> increment by 1.Table B-4 lists instructions that are illegal in long mode.Attempted use of these instructions generates an invalidopcodeexception (#UD).Table B-4.Invalid <strong>Instructions</strong> in Long ModeMnemonicOpcode(hex)DescriptionSYSENTER 0F 34 <strong>System</strong> CallSYSEXIT 0F 35 <strong>System</strong> ReturnB.4 <strong>Instructions</strong> with 64-Bit Default Oper<strong>and</strong> SizeIn 64-bit mode, two groups of instructions default to 64-bitoper<strong>and</strong> size without the need for a REX prefix:• Near branches —CALL, Jcc, JrCX, JMP, LOOP, <strong>and</strong> RET.• All instructions, except far branches, that implicitly referencethe RSP—CALL, ENTER, LEAVE, POP, PUSH, <strong>and</strong> RET(CALL <strong>and</strong> RET are in both groups of instructions).Table B-5 lists these instructions.446 Appendix B: <strong>General</strong>-<strong>Purpose</strong> <strong>Instructions</strong> in 64-Bit Mode