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 2005£ 15 BytesMost-signifcant(highest) addressLeast-signifcant(lowest) address7 0Immediate *Immediate *Immediate *ImmediateDisplacement**Displacement *Displacement *DisplacementSIB**ModRM *Opcode *Opcode (all two-byte opcodes have 0Fh as their first byte)REX Prefix + (available only in 64-bit mode)Legacy PrefixLegacy Prefix++Legacy Prefix +* optional, depending on the instructionLegacy Prefix ++ optional, with most instructions513-304.epsFigure 1-2.Little-Endian Byte-Order of Instruction Stored in MemoryThe basic operation of an instruction is specified by an opcode.The opcode is one or two bytes long, as described in “Opcode”on page 20. An opcode can be preceded by any number of legacyprefixes. These prefixes can be classified as belonging to any ofthe five groups of prefixes described in “Instruction Prefixes”on page 3. The legacy prefixes modify an instruction’s defaultaddress size, oper<strong>and</strong> size, or segment, or they invoke a specialfunction such as modification of the opcode, atomic buslocking,or repetition. The REX prefix can be used in 64-bitmode to access the register extensions illustrated in“Application-Programming Register Set” in <strong>Volume</strong> 1. If a REXprefix is used, it must immediately precede the first opcodebyte.An instruction’s opcode consists of one or two bytes. In several128-bit <strong>and</strong> 64-bit media instructions, a legacy oper<strong>and</strong>-size orrepeat prefix byte is used in a special-purpose way to modifythe opcode. The opcode can be followed by a mode-registermemory(ModRM) byte, which further describes the operation2 Chapter 1: Instruction Formats

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

Saved successfully!

Ooh no, something went wrong!