|Target machine for compiler course Mike.Spivey@comlab.oxford.ac.uk (1994-06-01)|
|Re: Target machine for compiler course firstname.lastname@example.org (Marc Brandis) (1994-06-03)|
|Re: Target machine for compiler course email@example.com (Andrew Tucker) (1994-06-03)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-03)|
|Re: Target machine for compiler course email@example.com (1994-06-03)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-11)|
|Re: Target machine for compiler course email@example.com (1994-06-05)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-13)|
|Re: Target machine for compiler course email@example.com (Mark 'Maxx' Simmons) (1994-06-11)|
|Re: Target machine for compiler course firstname.lastname@example.org (1994-06-16)|
|From:||email@example.com (Paul Haahr)|
|Organization:||NETCOM On-line services|
|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
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.
Return to the
Search the comp.compilers archives again.