Re: Target machine for compiler course

mackey@cse.ucsc.edu (Wesley Mackey )
Sat, 11 Jun 1994 00:02:21 GMT

          From comp.compilers

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)
| List of all articles for this month |

Newsgroups: comp.compilers
From: mackey@cse.ucsc.edu (Wesley Mackey )
Keywords: courses
Organization: University of California, Santa Cruz (CE/CIS Boards)
References: 94-06-013
Date: Sat, 11 Jun 1994 00:02:21 GMT

Mike.Spivey@comlab.oxford.ac.uk (Mike Spivey) writes:
>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?


Register windows aren't any more complicated to handle than the need to
save and restore registers on other archictectures. A save as the
first instruction of each function, and a restore in the delay slot of
the ret instruction. Put them together as instructions which always go
in pairs.


Delay slots can easily be handled simply by putting in a nop after
every instruction that has one. The code thus generated is obviously
not very good, but in a course where any machine code that works is
good code, it's a first step.


But on the SPARC stay away from floating point in a short course.
Passing them in int-regs and moving them to float-regs thru memory is
rather messy. It's better to spend course time on something else.
Like pointer variables.
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.