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.

AMD64 Technology 24594 Rev. 3.10 February 2005except far branches, that implicitly reference the RSP. SeeTable B-5 on page 447 for a list of all instructions thatdefault to 64-bit oper<strong>and</strong> size.• Zero-Extension of 32-Bit Results: Operations on 32-bitoper<strong>and</strong>s in 64-bit mode zero-extend the high 32 bits of 64-bit GPR destination registers.• No Extension of 8-Bit <strong>and</strong> 16-Bit Results: Operations on 8-bit<strong>and</strong> 16-bit oper<strong>and</strong>s in 64-bit mode leave the high 56 or 48bits, respectively, of 64-bit GPR destination registersunchanged.• Shift <strong>and</strong> Rotate Counts: When the oper<strong>and</strong> size is 64 bits,shifts <strong>and</strong> rotates use one additional bit (6 bits total) tospecify shift-count or rotate-count, allowing 64-bit shifts <strong>and</strong>rotates.• Immediates: The maximum size of immediate oper<strong>and</strong>s is 32bits, except that 64-bit immediates can be MOVed into 64-bitGPRs. In 64-bit mode, when the oper<strong>and</strong> size is 64 bits,immediates are sign-extended to 64 bits during use, buttheir actual size (for value representation) remains amaximum of 32 bits.• Displacements: The maximum size of an addressdisplacement is 32 bits. In 64-bit mode, displacements aresign-extended to 64 bits during use, but their actual size (forvalue representation) remains a maximum of 32 bits.• Undefined High 32 Bits After Mode Change: The processordoes not preserve the upper 32 bits of the 64-bit GPRs acrossswitches from 64-bit mode to compatibility or legacy modes.In compatibility or legacy mode, the upper 32 bits of theGPRs are undefined <strong>and</strong> not accessible to software.B.2 Operation <strong>and</strong> Oper<strong>and</strong> Size in 64-Bit ModeTable B-1 on page 415 lists the integer instructions, showingoper<strong>and</strong> size in 64-bit mode <strong>and</strong> the state of the high 32 bits ofdestination registers when 32-bit oper<strong>and</strong>s are used. Opcodes,such as byte-oper<strong>and</strong> versions of several instructions, that donot appear in Table B-1 are covered by the general rulesdescribed in “<strong>General</strong> Rules for 64-Bit Mode” on page 413.414 Appendix B: <strong>General</strong>-<strong>Purpose</strong> <strong>Instructions</strong> in 64-Bit Mode

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

Saved successfully!

Ooh no, something went wrong!