Index - AMD Athlon Processor x86 Optimization Manual

X86 code optimization
Table of Contents

Advertisement

22007E/0—November 1999

Index

Numerics
3DNow!™ Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3DNow! and MMX™ Intra-Operand Swapping . . . . . . . 112
Clipping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Fast Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
Fast Square Root and Reciprocal Square Root . . . . . . . 110
FEMMS Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
PAVGUSB for MPEG-2 Motion Compensation . . . . . . . . 123
PFCMP Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114
PFMUL Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . 113
PI2FW Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
PREFETCH and PREFETCHW Instructions . 8
PSWAPD Instruction . . . . . . . . . . . . . . . . . . . . . . . . 112
Scalar Code Translated into 3DNow! Code . . . . . . . . 61
A
Address Generation Interlocks . . . . . . . . . . . . . . . . . . . . . . . 72
AMD Athlon™ Processor
Branch-Free Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Code Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
Family. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Microarchitecture . . . . . . . . . . . . . . . . . . . . . . . . .4
AMD Athlon™ System Bus . . . . . . . . . . . . . . . . . . . . . . . . . 139
B
Blended Code, AMD-K6 and AMD Athlon Processors
3DNow! and MMX Intra-Operand Swapping . . . . . . . . . 112
Block Copies and Block Fills . . . . . . . . . . . . . . . . . . . . . . 115
Branch Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Code Padding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
Signed Words to Floating-Point Example. . . . . . . . . . . . 113
Branches
Align Branch Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Compound Branch Conditions . . . . . . . . . . . . . . . . . . . . . . 20
Dependent on Random Data . . . . . . . . . . . . . . . . . . . . 10
Prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
Replace with Computation in 3DNow! Code . . . . . . . . . . 60
C
C Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Array-Style Over Pointer-Style Code . . . . . . . . . . . . . . . . 15
C Code to 3DNow! Code Examples . . . . . . . . . . . . . . . 61
Structure Component Considerations . . . . . . . . . . . . 27
Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
64-Byte Cache Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Cache and Memory Optimizations . . . . . . . . . . . . . . . . . . 45
CALL and RETURN Instructions . . . . . . . . . . . . . . . . . . . . . 59
Code Padding Using Neutral Code Fillers . . . . . . . . . . . . . . 39
Code Sample Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
Complex Number Arithmetic . . . . . . . . . . . . . . . . . . . . . . . 126
Const Type Qualifier. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Constant Control Code, Multiple . . . . . . . . . . . . . . . . . . . . . 23
Index
AMD Athlon™ Processor x86 Code Optimization
D
,
Data Cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
107
Decoding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
DirectPath
Decoder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133
DirectPath Over VectorPath Instructions . . . . . . 9
Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Displacements, 8-Bit Sign-Extended . . . . . . . . . . . . . . . . . . 39
114
Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Replace Divides with Multiplies, Integer . . . . . . . . . 31
,
,
46
47
49
Using 3DNow! Instructions . . . . . . . . . . . . . . . . . . . 108
,
126
Dynamic Memory Allocation Consideration . . . . . . . . . . . . 25
64
E
Event and Time-Stamp Monitoring Software . . . . . . . . . . 168
Execution Unit Resources. . . . . . . . . . . . . . . . . . . . . . . . . . 148
Extended-Precision Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
F
,
129
130
Far Control Transfer Instructions. . . . . . . . . . . . . . . . . . . . . 65
Fetch and Decode Pipeline Stages . . . . . . . . . . . . . . . . . . . 141
FFREEP Macro . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Floating-Point
Compare Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Divides and Square Roots . . . . . . . . . . . . . . . . . . . . . . . . . 29
Execution Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
Optimizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
Pipeline Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
Pipeline Stages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
Scheduler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
Subexpression Elimination . . . . . . . . . . . . . . . . . . . . . . . 103
To Integer Conversions . . . . . . . . . . . . . . . . . . . . . . . . . . 100
Variables and Expressions are Type Float . . . . . . . . . . . 13
FRNDINT Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
,
57
FSINCOS Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
FXCH Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
G
Group I — Essential Optimizations . . . . . . . . . . . . . . . . . . 7
Group II — Secondary Optimizations . . . . . . . . . . . . . . . . 7
64
,
55
I
,
50
If Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Immediates, 8-Bit Sign-Extended . . . . . . . . . . . . . . . . . . . . . 38
Inline Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Inline REP String with Low Counts . . . . . . . . . . . . . . . . . . . 85
,
133
,
,
34
219
,
,
80
93
95
,
77
109
,
103
8
,
9
,
,
72
86
237

Advertisement

Table of Contents
loading

Table of Contents