13.07.2015 Views

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

Volume 3: General-Purpose and System Instructions - Stanford ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

24594 Rev. 3.10 February 2005 AMD64 TechnologyTable B-1.Operations <strong>and</strong> Oper<strong>and</strong>s in 64-Bit Mode (continued)JMP—Jump Near See “Near Branches in 64-Bit Mode” in <strong>Volume</strong> 1.EBE9FF /4Promoted to64 bits.JMP—Jump Far See “Branches to 64-Bit Offsets” in <strong>Volume</strong> 1.EAFF /5LAHF - Load Status Flags into AH Register9FLAR—Load Access Rights Byte0F 02Instruction <strong>and</strong>Opcode (hex) 1Type ofOperation 2Promoted to64 bits.Same as legacymode.Same aslegacy mode.DefaultOper<strong>and</strong>Size 364 bits Can’t encode. 6 RIP = RIP + 8-bitdisplacementsign-extended to64 bits.RIP = RIP + 32-bitdisplacementsign-extended to64 bits.INVALID IN 64-BIT MODE (invalid-opcode exception)32 bitsNot relevant.32 bitsFor 32-BitOper<strong>and</strong> Size 4RIP = 64-bit offsetfrom register ormemory.If selector points to a gate, thenRIP = 64-bit offset from gate, elseRIP = zero-extended 32-bit offset fromfar pointer referenced in instruction.Zero-extends 32-bit register resultsto 64 bits.For 64-BitOper<strong>and</strong> Size 4Note:1. See “<strong>General</strong> Rules for 64-Bit Mode” on page 413, for opcodes that do not appear in this table.2. The type of operation, excluding considerations of oper<strong>and</strong> size or extension of results. See “<strong>General</strong> Rules for 64-Bit Mode” onpage 413 for definitions of “Promoted to 64 bits” <strong>and</strong> related topics.3. If “Type of Operation” is 64 bits, a REX prefix is needed for 64-bit oper<strong>and</strong> size, unless the instruction size defaults to 64 bits. Ifthe oper<strong>and</strong> size is fixed, oper<strong>and</strong>-size overrides are silently ignored.4. Special actions in 64-bit mode, in addition to legacy-mode actions. Zero or sign extensions apply only to result oper<strong>and</strong>s, notsource oper<strong>and</strong>s. Unless otherwise stated, 8-bit <strong>and</strong> 16-bit results leave the high 56 or 48 bits, respectively, of 64-bit destinationregisters unchanged. Immediates <strong>and</strong> branch displacements are sign-extended to 64 bits.5. Any pointer registers (rDI, rSI) or count registers (rCX) are address-sized <strong>and</strong> default to 64 bits. For 32-bit address size, any pointer<strong>and</strong> count registers are zero-extended to 64 bits.6. The default oper<strong>and</strong> size can be overridden to 16 bits with 66h prefix, but there is no 32-bit oper<strong>and</strong>-size override in 64-bit mode.Appendix B: <strong>General</strong>-<strong>Purpose</strong> <strong>Instructions</strong> in 64-Bit Mode 425

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!