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 Technology<strong>and</strong>/or oper<strong>and</strong>s. The opcode, or the opcode <strong>and</strong> ModRM byte,can also be followed by a scale-index-base (SIB) byte, whichdescribes the scale, index, <strong>and</strong> base forms of memoryaddressing. The ModRM <strong>and</strong> SIB bytes are described in“ModRM <strong>and</strong> SIB Bytes” on page 20, but their legacy functionscan be modified by the REX prefix (“Instruction Prefixes” onpage 3).The 15-byte instruction-length limit can only be exceeded byusing redundant prefixes. If the limit is exceeded, a generalprotectionexception occurs.1.2 Instruction PrefixesThe instruction prefixes shown in Figure 1-1 on page 1 are oftwo types: legacy prefixes <strong>and</strong> REX prefixes. Each of the legacyprefixes has a unique byte value. By contrast, the REX prefixes,which enable use of the AMD64 register extensions in 64-bitmode, are organized as a group of byte values in which the valueof the prefix indicates the combination of register-extensionfeatures to be enabled.1.2.1 Summary ofLegacy PrefixesTable 1-1 on page 4 shows the legacy prefixes—that is, allprefixes except the REX prefixes, which are described onpage 14. The legacy prefixes are organized into five groups, asshown in the left-most column of Table 1-1. A single instructionshould include a maximum of one prefix from each of the fivegroups. The legacy prefixes can appear in any order within theposition shown in Figure 1-1 for legacy prefixes. The result ofusing multiple prefixes from a single group is unpredictable.Some of the restrictions on legacy prefixes are:• Oper<strong>and</strong>-Size Override—This prefix affects only generalpurposeinstructions <strong>and</strong> a few x87 instructions. When usedwith 128-bit <strong>and</strong> 64-bit media instructions, this prefix acts ina special way to modify the opcode.• Address-Size Override—This prefix affects only memoryoper<strong>and</strong>s.• Segment Override—In 64-bit mode, the CS, DS, ES, <strong>and</strong> SSsegment override prefixes are ignored.• LOCK Prefix—This prefix is allowed only with certaininstructions that modify memory.Chapter 1: Instruction Formats 3

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

Saved successfully!

Ooh no, something went wrong!