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 2005REX prefixes are a set of sixteen values that span one row ofthe main opcode map <strong>and</strong> occupy entries 40h through 4Fh.Table 1-11 <strong>and</strong> Figure 1-3 on page 18 show the prefix fields <strong>and</strong>their uses.Table 1-11.REX Prefix-Byte FieldsMnemonic Bit Position Definition— 7–4 0100REX.W 3REX.R 2REX.X 1REX.B 00 = Default oper<strong>and</strong> size1 = 64-bit oper<strong>and</strong> size1-bit (high) extension of the ModRM reg field 1 ,thus permitting access to 16 registers.1-bit (high) extension of the SIB index field 1 ,thus permitting access to 16 registers.1-bit (high) extension of the ModRM r/m field 1 ,SIB base field 1 , or opcode reg field, thuspermitting access to 16 registers.Note:1. For a description of the ModRM <strong>and</strong> SIB bytes, see “ModRM <strong>and</strong> SIB Bytes” on page 20.REX.W: Oper<strong>and</strong> Width. Setting the REX.W bit to 1 specifies a 64-bit oper<strong>and</strong> size. Like the existing 66h oper<strong>and</strong>-size prefix, theREX 64-bit oper<strong>and</strong>-size override has no effect on byteoperations. For non-byte operations, the REX oper<strong>and</strong>-sizeoverride takes precedence over the 66h prefix. If a 66h prefix isused together with a REX prefix that has the REX.W bit set to1, the 66h prefix is ignored. However, if a 66h prefix is usedtogether with a REX prefix that has the REX.W bit cleared to 0,the 66h prefix is not ignored <strong>and</strong> the oper<strong>and</strong> size becomes16 bits.REX.R: Register. The REX.R bit adds a 1-bit (high) extension tothe ModRM reg field (page 20) when that field encodes a GPR,XMM, control, or debug register. REX.R does not modifyModRM reg when that field specifies other registers or opcodes.REX.R is ignored in such cases.REX.X: Index. The REX.X bit adds a 1-bit (high) extension to theSIB index field (page 20).16 Chapter 1: Instruction Formats

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

Saved successfully!

Ooh no, something went wrong!