Resource: As with the previous lab, you will want to refer to some or all of the following references.
as : The GNU Assembler,
http://www.gnu.org/manual/gas-2.9.1/html_node/as_toc.html
Steps for this Lab:
table.c to assembly language using the
gcc compiler, and discuss how double precision floating point
computations are handled.
gcc -S -O2 table.c
Compare the non-optimized and optimized code generated by the compiler you selected. For example, you should observe the nature of any changes between the two assembly language listings. Are registers used differently? Are some instructions omitted? Are different types of instructions used? Is one listing significantly shorter?
Also, in addition to the above discussion, for both your non-optimized and optimized code:
Work to be turned in:
This document is available on the World Wide Web as
http://www.cs.grinnell.edu/~walker/courses/211.fa01/labs/lab.code-optimization.html
|
created October 1, 1997 last revised October 15, 2002 |
|
| For more information, please contact Henry M. Walker at walker@cs.grinnell.edu. |