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

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

scs.stanford.edu
from scs.stanford.edu More from this publisher
13.07.2015 Views

AMD64 Technology 24594 Rev. 3.10 February 2005For most instructions running in 64-bit mode, access to theextended GPRs requires a REX instruction prefix (page 14).Figure 2-4 shows the segment registers which, like theinstruction pointer, are used by all instructions. In legacy andcompatibility modes, all segments are accessible. In 64-bitmode, which uses the flat (non-segmented) memory model, onlythe CS, FS, and GS segments are recognized, whereas thecontents of the DS, ES, and SS segment registers are ignored(the base for each of these segments is assumed to be zero, andneither their segment limit nor attributes are checked). Fordetails, see “Segmented Virtual Memory” in Volume 2.Legacy Mode andCompatibility ModeCSDSESFSGSSS15 064-BitModeCS(Attributes only)ignoredignoredFS(Base only)GS(Base only)ignored15 0513-312.epsFigure 2-4.Segment RegistersData Types. Figure 2-5 on page 33 shows the general-purposedata types. They are all scalar, integer data types. The 64-bit(quadword) data types are only available in 64-bit mode, and formost instructions they require a REX instruction prefix.32 Chapter 2: Instruction Overview

24594 Rev. 3.10 February 2005 AMD64 Technology127sSigned Integer16 bytes (64-bit mode only)s8 bytes (64-bit mode only)0DoubleQuadwordQuadword63s4 bytesDoubleword31s2 bytesWord15sByte7 0Unsigned Integer12716 bytes (64-bit mode only)8 bytes (64-bit mode only)0DoubleQuadwordQuadword634 bytesDoubleword312 bytesWord15BytePacked BCDBCD Digit513-326.eps7 30BitFigure 2-5.2.3.2 SystemInstructionsGeneral-Purpose Data TypesRegisters. The system instructions use several specializedregisters shown in Figure 2-6 on page 34. System software usesthese registers to, among other things, manage the processor’soperating environment, define system resource characteristics,and monitor software execution. With the exception of theRFLAGS register, system registers can be read and written onlyfrom privileged software.All system registers are 64 bits wide, except for the descriptortableregisters and the task register, which include 64-bit baseaddressfields and other fields.Chapter 2: Instruction Overview 33

24594 Rev. 3.10 February 2005 AMD64 Technology127sSigned Integer16 bytes (64-bit mode only)s8 bytes (64-bit mode only)0DoubleQuadwordQuadword63s4 bytesDoubleword31s2 bytesWord15sByte7 0Unsigned Integer12716 bytes (64-bit mode only)8 bytes (64-bit mode only)0DoubleQuadwordQuadword634 bytesDoubleword312 bytesWord15BytePacked BCDBCD Digit513-326.eps7 30BitFigure 2-5.2.3.2 <strong>System</strong><strong>Instructions</strong><strong>General</strong>-<strong>Purpose</strong> Data TypesRegisters. The system instructions use several specializedregisters shown in Figure 2-6 on page 34. <strong>System</strong> software usesthese registers to, among other things, manage the processor’soperating environment, define system resource characteristics,<strong>and</strong> monitor software execution. With the exception of theRFLAGS register, system registers can be read <strong>and</strong> written onlyfrom privileged software.All system registers are 64 bits wide, except for the descriptortableregisters <strong>and</strong> the task register, which include 64-bit baseaddressfields <strong>and</strong> other fields.Chapter 2: Instruction Overview 33

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

Saved successfully!

Ooh no, something went wrong!