<<<    Index    >>>
ix
TABLE OF CONTENTS
8.5.3.Interfacing with MMX™ Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-13
8.5.4.Writing Code with MMX™ and Floating-Point Instructions . . . . . . . . . . . . . . . . 8-14
8.5.4.1.RECOMMENDATIONS AND GUIDELINES. . . . . . . . . . . . . . . . . . . . . . . . . 8-14
8.5.5.Using MMX™ Code in a Multitasking Operating System Environment. . . . . . . 8-15
8.5.5.1.COOPERATIVE MULTITASKING OPERATING SYSTEM. . . . . . . . . . . . . . 8-16
8.5.5.2.PREEMPTIVE MULTITASKING OPERATING SYSTEM. . . . . . . . . . . . . . . 8-16
8.5.6.Exception Handling in MMX™ Code. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
8.5.7.Register Mapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
CHAPTER 9
PROGRAMMING WITH THE STREAMING SIMD EXTENSIONS
9.1.OVERVIEW OF THE STREAMING SIMD EXTENSIONS . . . . . . . . . . . . . . . . . . . . 9-2
9.1.1.SIMD Floating-Point Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-2
9.1.2.SIMD Floating-Point Data Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-3
9.1.3.Single Instruction, Multiple Data (SIMD) Execution Model . . . . . . . . . . . . . . . . . 9-4
9.1.4.Pentium® III Processor Single Precision Floating-Point Format. . . . . . . . . . . . . 9-4
9.1.5.Memory Data Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
9.1.6.SIMD Floating-Point Register Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-5
9.1.7.SIMD Floating-Point Control/Status Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-7
9.1.8.Rounding Control Field . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
9.1.9.Flush-To-Zero . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-8
9.2.STREAMING SIMD EXTENSIONS SET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
9.2.1.Instruction Operands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-9
9.3.OVERVIEW OF THE STREAMING SIMD EXTENSIONS SET . . . . . . . . . . . . . . . 9-10
9.3.1.Data Movement Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-10
9.3.2.Arithmetic Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
9.3.2.1.Packed/Scalar Addition and Subtraction. . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
9.3.2.2.Packed/Scalar Multiplication and Division . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
9.3.2.3.Packed/Scalar Square Root . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-11
9.3.2.4.Packed Maximum/Minimum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12
9.3.3.Comparison Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-12
9.3.4.Conversion Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
9.3.5.Logical Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-13
9.3.6.Additional SIMD Integer Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-14
9.3.7.Shuffle Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-15
9.3.8.State Management Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-16
9.3.9.Cacheability Control Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-17
9.4.COMPATIBILITY WITH FPU ARCHITECTURE. . . . . . . . . . . . . . . . . . . . . . . . . . . 9-19
9.4.1.Effect of Instruction Prefixes on Streaming SIMD Extensions. . . . . . . . . . . . . . 9-19
9.5.WRITING APPLICATIONS WITH STREAMING SIMD EXTENSIONS CODE. . . . 9-21
9.5.1.Detecting Support for Streaming SIMD Extensions Using the 
CPUID Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-21
9.5.2.Interfacing with Streaming SIMD Extensions Procedures and Functions . . . . . 9-22
9.5.3.Writing Code with MMX™, Floating-Point, and Streaming SIMD Extensions . . 9-22
9.5.3.1.Cacheability Hint Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-23
9.5.3.2.Recommendations and Guidelines. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25
9.5.4.Using Streaming SIMD Extensions Code in a Multitasking Operating 
System Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9-25
9.5.4.1.Cooperative Multitasking Operating System. . . . . . . . . . . . . . . . . . . . . . . . . 9-26
9.5.4.2.Preemptive Multitasking Operating System . . . . . . . . . . . . . . . . . . . . . . . . . 9-26
9.5.5.Exception Handling in Streaming SIMD Extensions . . . . . . . . . . . . . . . . . . . . . 9-26
<<<    Index    >>>