User Guide

vi Contents
AMD64 Technology 24592—Rev. 3.15—November 2009
5.8 Instruction Effects on Flags ..................................................228
5.9 Instruction Prefixes ........................................................228
Supported Prefixes.........................................................229
Special-Use and Reserved Prefixes ............................................229
Prefixes That Cause Exceptions ..............................................229
5.10 Feature Detection..........................................................229
5.11 Exceptions ...............................................................230
General-Purpose Exceptions .................................................230
x87 Floating-Point Exceptions (#MF) ..........................................231
5.12 Actions Taken on Executing 64-Bit Media Instructions ............................232
5.13 Mixing Media Code with x87 Code ...........................................233
Mixing Code .............................................................233
Clearing MMX™ State .....................................................233
5.14 State-Saving ..............................................................234
Saving and Restoring State ..................................................234
State-Saving Instructions ....................................................234
5.15 Performance Considerations .................................................235
Use Small Operand Sizes....................................................235
Reorganize Data for Parallel Operations ........................................235
Remove Branches .........................................................236
Align Data ...............................................................236
Organize Data for Cacheability ...............................................236
Prefetch Data .............................................................236
Retain Intermediate Results in MMX™ Registers ................................236
6 x87 Floating-Point Programming .............................................237
6.1 Overview ................................................................237
Capabilities ..............................................................237
Origins ..................................................................238
Compatibility .............................................................238
6.2 Registers.................................................................238
x87 Data Registers .........................................................239
x87 Status Word Register (FSW) .............................................241
x87 Control Word Register (FCW) ............................................244
x87 Tag Word Register (FTW) ...............................................246
Pointers and Opcode State ...................................................247
x87 Environment ..........................................................248
Floating-Point Emulation (CR0.EM)...........................................249
6.3 Operands ................................................................249
Operand Addressing .......................................................249
Data Types ...............................................................250
Number Representation .....................................................253
Number Encodings ........................................................256
Precision.................................................................260
Rounding ................................................................260
6.4 Instruction Summary .......................................................261
Syntax ..................................................................261
Data Transfer and Conversion ................................................263