Related articles |
---|
Target machine for compiler course Mike.Spivey@comlab.oxford.ac.uk (1994-06-01) |
Re: Target machine for compiler course brandis@inf.ethz.ch (Marc Brandis) (1994-06-03) |
Re: Target machine for compiler course a_tucker@paul.spu.edu (Andrew Tucker) (1994-06-03) |
Re: Target machine for compiler course salomon@silver.cs.umanitoba.ca (1994-06-03) |
Re: Target machine for compiler course haahr@netcom.com (1994-06-03) |
Re: Target machine for compiler course mackey@cse.ucsc.edu (1994-06-11) |
Re: Target machine for compiler course andrewd@seldon.apanix.apana.org.au (1994-06-05) |
Re: Target machine for compiler course anton@mips.complang.tuwien.ac.at (1994-06-13) |
Re: Target machine for compiler course mds@doc.ic.ac.uk (Mark 'Maxx' Simmons) (1994-06-11) |
Re: Target machine for compiler course cessu@cs.hut.fi (1994-06-16) |
Newsgroups: | comp.compilers |
From: | haahr@netcom.com (Paul Haahr) |
Keywords: | courses |
Organization: | NETCOM On-line services |
References: | 94-06-013 |
Date: | Fri, 3 Jun 1994 04:45:28 GMT |
Mike.Spivey@comlab.oxford.ac.uk (Mike Spivey) writes:
> I found the discussion about what to teach in a six-hour course on
> compilers very helpful; so I'd like to hear what people think about
> the choice of a target machine for a first course in compilers.
> Some people would advocate (a subset of) C or Pascal as the target
> 'machine' code -- but I feel that doesn't really make the story a
> credible one, even if it is a good way to prototype new languages.
don't count this out. generating C (Pascal seems like a less wise
choice) still covers a lot of territory. for example, p2c (the pascal
to c translator) generates c code that is close in style to a manual
translation from pascal to c; on the other hand, sml2c and eiffel use c
as a portable machine code and the actual structure of the generate code
looks much more like assembly code than a by-hand translation. cfront
is somewhere along this continuum, as i remember.
the further the language which you are translating is from c, the more c
looks like machine language.
> It might be nice to generate code for the SPARCstations that my
> students will use for their practicals. But isn't generating code for
> RISC machines with register windows, delay slots, etc. too much for a
> first detailed look?
i've always found risc machines significantly easier to generate code
for. sparc register windows are simple to use if you never pass more
than 6 arguments to a function. delay slots can be filled with nops.
the uniformity of risc instruction sets is a big win for expository
purposes.
stay away from the '86. let them learn the fundamentals before they
have to try to figure out the quirks of such an obtuse instruction set.
the anti-orthogonality of its register set makes it a real lose for
teaching with, imho.
paul
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.