⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http:^^www.cs.indiana.edu^classes^p523^p5^proj5.html

📁 This data set contains WWW-pages collected from computer science departments of various universities
💻 HTML
字号:
Date: Tue, 14 Jan 1997 23:12:51 GMT
Server: Apache/1.0.3
Content-type: text/html
Content-length: 3735
Last-modified: Tue, 19 Nov 1996 16:04:00 GMT

<head><title>P523 Project Five</title></head><body><h1>P523 Project Five</h1><h3>Fall Semester 96-97</h3><h3>Code Generation</h3><h3>Due 11:59pm Sunday, December 8</h3>Design and implement a code generator for programs in <!WA0><ahref="http://www.cs.indiana.edu/classes/p523/p4/proj4.html#weasel">weasel form</a>, using the procedure callingconventions and pointer and object representations discussed in class.Your code generator must produce assembly code for the <!WA1><ahref="http://www.cs.indiana.edu/classes/p523/p5/alpha.ps.gz">Alpha AXP</a> processor.  Use the interpreterspresented in <!WA2><a href="http://www.cs.indiana.edu/classes/p523/p5/beta.ss">beta.ss</a> and <!WA3><ahref="http://www.cs.indiana.edu/classes/p523/p5/gamma.ss">gamma.ss</a> as guidelines for writing your codegenerator.<p><h3>Support Code</h3><!WA4><a href="http://www.cs.indiana.edu/classes/p523/p5/cg-help.ss"<tt>cg-help.ss</tt></a> provides some code generationutilities:<ul><li>symbolic constants for tagging<li><tt>open-file</tt> opens the assembly output file, <tt>scheme.s</tt>, and writesthe header<li><tt>emit</tt> writes assembly instructions to <tt>scheme.s</tt><li><tt>new-label</tt> creates a new assembly language label<li><tt>write-label</tt> writes a label to <tt>scheme.s</tt><li><tt>c-imm</tt> converts Scheme immediates to tagged Alpha immediates<li><tt>close-file</tt> writes trailer to <tt>scheme.s</tt> and closes it<li><tt>run-file</tt> copies <tt>scheme.s</tt> to your 431 directory on copper andexecutes a remote shell on copper to assemble and run it.</ul><p>The directory <tt>/u/c431/p5</tt> on copper contains support files for makingan executable file from your assembly output file, <tt>scheme.s</tt>:<ul><li><tt>startup.c</tt>: allocates and initializes the Scheme stack and heap,calls your code via the assembly stub <tt>call_scheme.s</tt>, and prints theresult.<li><tt>call_scheme.s</tt>: assembly language stub that sets up the Schemeregisters, places the return address onto the base of the frame, callsyour code, and returns to the C caller, <tt>startup.c</tt>.<li><tt>cg.h</tt>: assembly language header file that defines constants fortagging and generating immediates.</ul><p>You should create the directory <tt>copper:431</tt> and copy all thefiles from <tt>copper:/u/c431/p5</tt> into it.  The procedures in<tt>cg-help.ss</tt> assume that this directory and your <tt>.rhosts</tt> fileon copper are set up.<p><tt>p5trial.alpha</tt> in <tt>/u/c431/p5</tt> on copper (and<tt>p5trial.sun4</tt> for Suns) defines the procedure <tt>c431-cg</tt>.<tt>(c431-cg &lt;weasel&gt;)</tt> generates Alpha assembly for the weaselprogram into the file <tt>scheme.s</tt> in the current directory.<p><tt>p5good</tt> (in <tt>/u/c431/p5</tt> on copper) gives a set of testcases you may find useful.  Each test case is followed by the expectedresult in a comment.  The result is printed in the same format<tt>startup.c</tt> prints it, so you can compare the results quiteeasily.  <!WA5><a href="http://www.cs.indiana.edu/classes/p523/p5/p5test.ss">p5test.ss</a> provides a Scheme procedurethat will run your code generator on all the test cases in<tt>p5good</tt> and create the file tests.out that can be comparedagainst <tt>p5good</tt> using <tt>diff</tt>.  <em>Before using this, you musthave the latest version of <tt>Makefile</tt> and <tt>startup.c</tt> from<tt>/u/c431/p5</tt>.</em><h3>Project report:</h3>Your project report should contain a description of your codegenerator along with the source for the code generator.  It shouldalso contain sample assembly output for several small examples showingwhat the code generator produces for a variety of expressions.  Followthe guidelines for documentation, neatness, and collaboration from thefirst project assignment.<p><h3>Late policy:</h3>Project reports may be handed in up to one week late without penalty.Reports handed in more than one week late will not be graded.</body>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -