You try compiling the following c code 1 2 3 4 5

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: nteger registers available. Two of these (%ebp and %esp) point to regions of the stack. With the pointer version of the code, one of the remaining six holds the pointer data, and one holds the stopping position dend. This leaves only four integer registers for accumulating values. With the array version of the code, we require three registers to hold the loop index i, the stopping index limit, and the array address data. This leaves only three registers for accumulating values. For the floating-point data type, we need two of eight registers to hold intermediate values, leaving six for accumulating values. Thus, we could have a maximum parallelism of six before register spilling occurs. This limitation to eight integer and eight floating-point registers is an unfortunate artifact of the IA32 instruc- 246 CHAPTER 5. OPTIMIZING PROGRAM PERFORMANCE tion set. The renaming scheme described previously eliminates the direct correspondence between register names and the actual location of the register data. In a modern processor, register nam...
View Full Document

Ask a homework question - tutors are online