This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ent a function with the following prototype
double scale(double x, int n, double *dest); that computes Ü ¡ ¾Ò using the fscale instruction and stores the result at the location designated by pointer dest. Hint: Extended asm does not provide very good support for IA32 ﬂoating point. In this case, however, you can access the arguments from the program stack. Chapter 4 Processor Architecture
To appear in the ﬁnal version of the manuscript. 201 202 CHAPTER 4. PROCESSOR ARCHITECTURE Chapter 5 Optimizing Program Performance
Writing an efﬁcient program requires two types of activities. First, we must select the best set of algorithms and data structures. Second, we must write source code that the compiler can effectively optimize to turn into efﬁcient executable code. For this second part, it is important to understand the capabilities and limitations of optimizing compilers. Seemingly minor changes in how a program is written can make large differences in how well a compiler can optimize it. Some programming languages are more easily optimized than others. Some features...
View Full Document