Skip to Content
Computers as Components, 2nd Edition
book

Computers as Components, 2nd Edition

by Marilyn Wolf
July 2008
Intermediate to advanced
544 pages
16h 52m
English
Morgan Kaufmann
Content preview from Computers as Components, 2nd Edition
5.4 Basic Compilation Techniques 233
Drawing a control flow graph based on the while form of the loop helps us
understand how to translate it into instructions.
i 5 0;
f 5 0;
i < N
N
Y
Loop
exit
Loop initiation code
Loop test
Loop body
Loop variable update
f 5 f 1 c[i]*x[i];
i 5 i 1 1;
C compilers can generate (using the -s flag) assembler source,which some com-
pilers intersperse with the C code. Such code is a very good way to learn about
both assembly language programming and compilation.
5.4.2 Procedures
Another major code generation problem is the creation of procedures. Generating
code for procedures is relatively straightforward once we know the procedur
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Computers as Components, 3rd Edition

Computers as Components, 3rd Edition

Marilyn Wolf
Computer System Designs: System-on-Chip

Computer System Designs: System-on-Chip

Michael J. Flynn, Wayne Luk
PC Hardware in a Nutshell, 3rd Edition

PC Hardware in a Nutshell, 3rd Edition

Robert Bruce Thompson, Barbara Fritchman Thompson

Publisher Resources

ISBN: 9780123743978