I have prepared PDF slides for Chapter 8 and placed them on www.seyfarth.tv/asm. I have also added a few errata to the web site.
Chapter 8 is about branching and looping. The strategy is to convert C if/else statements and loops to equivalent assembly instructions. This chapter is where the optimizations employed by the compiler start to become more comprehensible.
One of the simple optimizations is to convert loops to test at the bottom of loops which can mean one less jump statement in a loop. Another is to count down if the only purpose is to do the loop a certain number of times.
This chapter discusses how the gcc compiler performs loop unrolling and why this matters.
The next chapter is functions, followed immediately by arrays. After those chapters the student will be able to write some very interesting programs.
No comments:
Post a Comment