Volume 1 Basic Architecture (794100), страница 9
Текст из файла (страница 9)
. . . A-1APPENDIX BEFLAGS CONDITION CODESB.1CONDITION CODES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-1APPENDIX CFLOATING-POINT EXCEPTIONS SUMMARYC.1OVERVIEW. . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.2X87 FPU INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.3SSE INSTRUCTIONS . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .C.4SSE2 INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xiv Vol. 1C-1C-2C-4C-7CONTENTSPAGEC.5C.6SSE3 INSTRUCTIONS .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-11SSSE3 INSTRUCTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-12APPENDIX DGUIDELINES FOR WRITING X87 FPUEXCEPTION HANDLERSD.1MS-DOS COMPATIBILITY SUB-MODE FOR HANDLING X87 FPU EXCEPTIONS.
. . . . . . . . . . D-1D.2IMPLEMENTATION OF THE MS-DOS COMPATIBILITY SUB-MODE IN THE INTEL486,PENTIUM, AND P6 PROCESSOR FAMILY, AND PENTIUM 4 PROCESSORS. . . . . . . . . . . . . . . D-3D.2.1MS-DOS Compatibility Sub-mode in the Intel486 and Pentium Processors. .
. . . . . . . . . D-3D.2.1.1Basic Rules: When FERR# Is Generated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-4D.2.1.2Recommended External Hardware to Support the MS-DOS CompatibilitySub-mode . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D-5D.2.1.3No-Wait x87 FPU Instructions Can Get x87 FPU Interrupt in Window . . . . . . . . . . . . D-8D.2.2MS-DOS Compatibility Sub-mode in the P6 Familyand Pentium 4 Processors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . .D-10D.3RECOMMENDED PROTOCOL FOR MS-DOS* COMPATIBILITY HANDLERS . . . . . . . . . . . . . . D-11D.3.1Floating-Point Exceptions and Their Defaults . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . .D-12D.3.2Two Options for Handling Numeric Exceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-12D.3.2.1Automatic Exception Handling: Using Masked Exceptions . . . . . . . . . . . . . . . . . . . . . .D-12D.3.2.2Software Exception Handling . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-14D.3.3Synchronization Required for Use of x87 FPU Exception Handlers . . . . . . . . . . . . . . . .D-15D.3.3.1Exception Synchronization: What, Why and When . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .D-16D.3.3.2Exception Synchronization Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-17D.3.3.3Proper Exception Synchronization. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . .D-18D.3.4x87 FPU Exception Handling Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-18D.3.5Need for Storing State of IGNNE# Circuit If Using x87 FPU and SMM . . . . . . . . . . . . . .D-22D.3.6Considerations When x87 FPU Shared Between Tasks . . .
. . . . . . . . . . . . . . . . . . . . . . . .D-23D.3.6.1Speculatively Deferring x87 FPU Saves, General Overview . . . . . . . . . . . . . . . . . . . .D-23D.3.6.2Tracking x87 FPU Ownership . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .D-24D.3.6.3Interaction of x87 FPU State Saves and Floating-Point Exception Association . .D-25D.3.6.4Interrupt Routing From the Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. .D-28D.3.6.5Special Considerations for Operating Systems that Support Streaming SIMDExtensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-28D.4DIFFERENCES FOR HANDLERS USING NATIVE MODE. . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . D-29D.4.1Origin with the Intel 286 and Intel 287, and Intel386 and Intel 387 Processors . . . .D-29D.4.2Changes with Intel486, Pentium and Pentium Pro Processors withCR0.NE[bit 5] = 1 . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .D-30D.4.3Considerations When x87 FPU Shared Between Tasks Using Native Mode . . . . . . . . .D-30APPENDIX EGUIDELINES FOR WRITING SIMD FLOATING-POINT EXCEPTION HANDLERSE.1TWO OPTIONS FOR HANDLING FLOATING-POINT EXCEPTIONS . . .
. . . . . . . . . . . . . . . . . . . . . E-1E.2SOFTWARE EXCEPTION HANDLING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-1E.3EXCEPTION SYNCHRONIZATION . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . E-3E.4SIMD FLOATING-POINT EXCEPTIONS AND THE IEEE STANDARD 754 . . . . . . . . . . . . . . . . . . E-4E.4.1Floating-Point Emulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . E-4Vol. 1 xvCONTENTSPAGEE.4.2E.4.2.1E.4.2.2E.4.2.3E.4.3xvi Vol. 1SSE/SSE2/SSE3 Response To Floating-Point Exceptions. . . . . . . . . . . . . . . . . . . . . . . . . . . .E-6Numeric Exceptions . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .E-7Results of Operations with NaN Operands or a NaN Result for SSE/SSE2/SSE3Numeric Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . .E-7Condition Codes, Exception Flags, and Response for Masked and Unmasked NumericExceptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . E-12Example SIMD Floating-Point Emulation Implementation. . .
. . . . . . . . . . . . . . . . . . . . . . . E-22CONTENTSPAGEFIGURESFigure 1-1.Figure 1-2.Figure 2-1.Figure 2-2.Figure 2-3.Figure 2-4.Figure 2-5.Figure 2-6.Figure 2-7.Figure 3-1.Figure 3-2.Figure 3-3.Figure 3-4.Figure 3-5.Figure 3-6.Figure 3-7.Figure 3-8.Figure 3-9.Figure 3-10.Figure 3-11.Figure 4-1.Figure 4-2.Figure 4-3.Figure 4-4.Figure 4-5.Figure 4-6.Figure 4-7.Figure 4-8.Figure 4-9.Figure 4-10.Figure 4-11.Figure 4-12.Figure 6-1.Figure 6-2.Figure 6-3.Figure 6-4.Figure 6-5.Figure 6-6.Figure 6-7.Figure 6-8.Figure 6-9.Figure 6-10.Figure 7-1.Bit and Byte Order . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5Syntax for CPUID, CR, and MSR Data Presentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-8The P6 Processor Microarchitecture with Advanced Transfer CacheEnhancement . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8The Intel NetBurst Microarchitecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-11The Intel Core Microarchitecture Pipeline Functionality . . .
. . . . . . . . . . . . . . . . . . . . .2-14SIMD Extensions, Register Layouts, and Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . .2-17Comparison of an IA-32 Processor Supporting Hyper-Threading Technology and aTraditional Dual Processor System . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-18Intel 64 and IA-32 Processors that Support Dual-Core . . . . . . . . . . . . . . . . . . . . . . . . .2-20Intel 64 Processors that Support Quad-Core . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . .2-21IA-32 Basic Execution Environment for Non-64-bit Modes . . . . . . . . . . . . . . . . . . . . . . 3-464-Bit Mode Execution Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .