Volume 3: General-Purpose and System Instructions - Stanford ...
Volume 3: General-Purpose and System Instructions - Stanford ... Volume 3: General-Purpose and System Instructions - Stanford ...
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
- Page 12 and 13: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 14 and 15: AMD64 Technology 24594—Rev. 3.10
- Page 16 and 17: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 18 and 19: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 20 and 21: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 22 and 23: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 24 and 25: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 26 and 27: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 28 and 29: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 30 and 31: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 32 and 33: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 34 and 35: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 36 and 37: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 38 and 39: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 40 and 41: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 42 and 43: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 44 and 45: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 46 and 47: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 48 and 49: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 50 and 51: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 52 and 53: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 54 and 55: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 56 and 57: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 58 and 59: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 60 and 61: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 64 and 65: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 66 and 67: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 68 and 69: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 70 and 71: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 72 and 73: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 74 and 75: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 76 and 77: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 78 and 79: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 80 and 81: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 82 and 83: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 84 and 85: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 86 and 87: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 88 and 89: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 90 and 91: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 92 and 93: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 94 and 95: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 96 and 97: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 98 and 99: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 100 and 101: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 102 and 103: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 104 and 105: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 106 and 107: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 108 and 109: AMD64 Technology 24594 Rev. 3.10 Fe
- Page 110 and 111: AMD64 Technology 24594 Rev. 3.10 Fe
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