[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC362 2004S (Rebelsky)]
[CSC362 2010S (Stone)]
Misc:
[SamR]
[GNU Coding Standards]
[Dragon Book]
[Pascal Standards]
Due: 11 p.m., Wednesday, 7 September 2011
Summary: In this lab, you will explore various issues in compilation. While you have used a compiler before (or I hope you have), I expect you haven't thought much about various options and details.
Disclaimer: You come to this lab with widely varying backgrounds. Some of you have programmed in Java, some of you haven't; some of you have written (or read) some assembly language, some of you haven't; some of you are Unix experts, some of you aren't. Don't worry if you can finish it in five minutes. Don't worry if it takes awhile to get through the steps (but don't spend more than two hours).
Collaboration: Feel free to work on this lab in pairs or trios.
Turning It In: Save your answers in a plain text file and upload it to Pioneerweb.
Grading: I expect that you will gain more from doing this lab than from me grading this lab. I will simply scan through your answers to see if you had any particularly valuable insights. I will grade this lab on a plus/check/minus scale.
Preparation:
Create a directory for this lab.
Make a copy of the files for this lab.
Questions:
Read information on the GNU Compiler Collection (gcc
) and
determine which of its intermediate program representations are available
to you. You might use man
or info
to learn
more about gcc
.
Summarize the intermediate representations available to you.
Generate intermediate representations from twos.c
and
scan through those that you can read.
What, if anything, did you learn about the intermediate representations?
The programs hellop.p
and helloc.c
print
the phrase Hello World
. Generate assembly for both programs.
How do the results differ? How are they similar?
Look on the Web for internal documentation on GCC. Explore which, if any, internal program representations are available to those building new GCC compilers.
Describe, in as much detail as you deem appropriate, the intermediate representations available and their purpose.
Monday, 2 September 2002 [Samuel A. Rebelsky]
Tuesday, 3 September 2002 [Samuel A. Rebelsky]
Wednesday, 21 January 2004 [Samuel A. Rebelsky]
http://www.cs.grinnell.edu/~rebelsky/Courses/CSC362/Labs/lab.01.html
Friday, 26 August 2011 [Samuel A. Rebelsky]
Tuesday, 30 August 2011 [Samuel A. Rebelsky]
Friday, 2 September 2011 [Samuel A. Rebelsky]
http://www.cs.grinnell.edu/~rebelsky/Courses/CSC362/Labs/exploring-compilation.html
[Skip to Body]
Primary:
[Front Door]
[Schedule]
[Piazza]
-
[Academic Honesty]
[Instructions]
Current:
[Current Outline]
[Current EBoard]
-
[Current Assignment]
[Current Lab]
Groupings:
[Assignments]
[Documents]
[EBoards]
[Examples]
[Exams]
[Handouts]
[Labs]
[Outlines]
[Readings]
Related Courses:
[CSC362 2004S (Rebelsky)]
[CSC362 2010S (Stone)]
Misc:
[SamR]
[GNU Coding Standards]
[Dragon Book]
[Pascal Standards]
Disclaimer:
I usually create these pages on the fly
, which means that I rarely
proofread them and they may contain bad grammar and incorrect details.
It also means that I tend to update them regularly (see the history for
more details). Feel free to contact me with any suggestions for changes.
This document was generated by
Siteweaver on Sat Nov 12 22:53:41 2011.
The source to the document was last modified on Fri Sep 2 10:52:08 2011.
This document may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS362/2011F/Labs/exploring-compilation.html
.