3Dnow!™ And Mmx™ Optimizations; Use 3Dnow! Instructions; Use Femms Instruction - AMD Athlon Processor x86 Optimization Manual

X86 code optimization
Table of Contents

Advertisement

22007E/0—November 1999
Use 3DNow!™ Instructions
TOP

Use FEMMS Instruction

Use 3DNow!™ Instructions
3DNow!™ and MMX™
Optimizations
This chapter describes 3DNow! and MMX code optimization
techniques for the AMD Athlon™ processor. Guidelines are
listed in order of importance. 3DNow! porting guidelines can be
found in the 3DNow!™ Instruction Porting Guide, order# 22621.
Unless accuracy requirements dictate otherwise, perform
floating-point computations using the 3DNow! instructions
instead of x87 instructions. The SIMD nature of 3DNow!
achieves twice the number of FLOPs that are achieved through
x87 instructions. 3DNow! instructions provide for a flat register
file instead of the stack-based approach of x87 instructions.
See the 3DNow!™ Technology Manual, order# 21928 for
information on instruction usage.
Though there is no penalty for switching between x87 FPU and
3DNow!/MMX instructions in the AMD Athlon processor, the
FEMMS instruction should be used to ensure the same code
also runs optimally on AMD-K6
AMD Athlon™ Processor x86 Code Optimization
10
®
family processors. The
107

Advertisement

Table of Contents
loading

Table of Contents