25112 Rev. 3.06 September 2005

Software Optimization Guide for AMD64 Processors

Chapter 6 Branch Optimizations

The optimizations in this chapter help improve branch prediction and minimize branch penalties.

In This Chapter

This chapter covers the following topics:

Topic

Page

 

 

Density of Branches

126

 

 

Two-ByteNear-Return RET Instruction

128

 

 

Branches That Depend on Random Data

130

 

 

Pairing CALL and RETURN

132

 

 

Recursive Functions

133

 

 

Nonzero Code-Segment Base Values

135

 

 

Replacing Branches with Computation

136

 

 

The LOOP Instruction

141

 

 

Far Control-Transfer Instructions

142

 

 

Chapter 6

Branch Optimizations

125

Page 141
Image 141
AMD 250 manual This Chapter, 125