Volume 1 Application Programming (794095), страница 7
Текст из файла (страница 7)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254Figure 6-10. Mnemonic Syntax for Typical Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263FiguresxiAMD64 Technologyxii24592—Rev.
3.13—July 2007Figures24592—Rev. 3.13—July 2007AMD64 TechnologyTablesTable 1-1.Operating Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2Table 1-2.Application Registers and Stack, by Operating Mode . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Table 2-1.Address-Size Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18Table 3-1.Implicit Uses of GPRs. . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Table 3-2.Representable Values of General-Purpose Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Table 3-3.Operand-Size Overrides . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39Table 3-4.rFLAGS for CMOVcc Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Table 3-5.rFLAGS for SETcc Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 55Table 3-6.rFLAGS for Jcc Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Table 3-7.Legacy Instruction Prefixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . 72Table 3-8.Instructions that Implicitly Reference RSP in 64-Bit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Table 3-9.Near Branches in 64-Bit Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . 85Table 3-10.Interrupts and Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Table 4-1.Range of Values in 128-Bit Media Integer Data Types . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . 125Table 4-2.Saturation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125Table 4-3.Range of Values in Normalized Floating-Point Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . 127Table 4-4.Example of Denormalization . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129Table 4-5.NaN Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Table 4-6.Supported Floating-Point Encodings . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131Table 4-7.Indefinite-Value Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Table 4-8.Types of Rounding . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Table 4-9.Example PANDN Bit Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155Table 4-10.SIMD Floating-Point Exception Flags . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179Table 4-11.Invalid-Operation Exception (IE) Causes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180Table 4-12.Priority of SIMD Floating-Point Exceptions . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182Table 4-13.SIMD Floating-Point Exception Masks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184Table 4-14.Masked Responses to SIMD Floating-Point Exceptions . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 185Table 5-1.Range of Values in 64-Bit Media Integer Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Table 5-2.Saturation Examples . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205Table 5-3.Range of Values in 64-Bit Media Floating-Point Data Types . . . . . . . . . . . . . . . . . . . . . . . . . 206Table 5-4.64-Bit Floating-Point Exponent Ranges . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206Table 5-5.Example PANDN Bit Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222Table 5-6.Mapping Between Internal and Software-Visible Tag Bits . .
. . . . . . . . . . . . . . . . . . . . . . . . . 233Table 6-1.Precision Control (PC) Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245TablesxiiiAMD64 Technology24592—Rev. 3.13—July 2007Table 6-2.Types of Rounding . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245Table 6-3.Mapping Between Internal and Software-Visible Tag Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . 247Table 6-4.Instructions that Access the x87 Environment . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249Table 6-5.Range of Finite Floating-Point Values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253Table 6-6.Example of Denormalization . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256Table 6-7.NaN Results from NaN Source Operands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257Table 6-8.Supported Floating-Point Encodings . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 258Table 6-9.Unsupported Floating-Point Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260Table 6-10.Indefinite-Value Encodings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 260Table 6-11.Precision Control Field (PC) Values and Bit Precision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261Table 6-12.Types of Rounding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 261Table 6-13.rFLAGS Conditions for FCMOVcc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266Table 6-14.rFLAGS Values for FCOMI Instruction. . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272Table 6-15.Condition-Code Settings for FXAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273Table 6-16.Instruction Effects on rFLAGS . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278Table 6-17.x87 Floating-Point (#MF) Exception Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281Table 6-18.Invalid-Operation Exception (IE) Causes . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . 282Table 6-19.Priority of x87 Floating-Point Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284Table 6-20.x87 Floating-Point (#MF) Exception Masks . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 285Table 6-21.Masked Responses to x87 Floating-Point Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286Table 6-22.Unmasked Responses to x87 Floating-Point Exceptions . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 289xivTables24592—Rev. 3.13—July 2007AMD64 TechnologyRevision HistoryDateRevisionDescriptionJuly 20073.13Revised rFLAGS register table 3-5 on page 34.Added “Cross-Modifying Code” on page 103.Added “Feature Detection in a Virtualized Environment” on page 76.Merged table of MXCSR register reset values into Figure 4-13 on page 118.Added “Misaligned Exception Mask (MM)” on page 120.Revised indefinite-value encodings in table 4-7 on page 132 and table 6-10on page 260.Revised “Precision” on page 261.Made minor editorial changes for purposes of clarification.September 20063.12Incorporated minor clarifications and formatting changes.December 20053.11Updated index entries.February 20053.10Clarified “Self-Modifying Code” on page 98.
Made several patches to indexreferences. Added general descriptions of SSE3 instructions to Chapter 4.Added description of the CMPXCHG16B instruction to Chapter 3. Correctedminor typographical errors. Elaborated explanation of PREFETCHlevelinstructions.September 20033.09Corrected several factual errors.3.07Corrected minor organizational problems in sections dealing with ‘Prefetch’instructions in Chapters 3, 4, and 5.