9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Why compile.c ?
@ 1994-04-19 16:22 yodaiken
  0 siblings, 0 replies; 2+ messages in thread
From: yodaiken @ 1994-04-19 16:22 UTC (permalink / raw)


What is the rationale for compile.c in the sparc version of Plan9?
Why not simply write out the assembly code?






^ permalink raw reply	[flat|nested] 2+ messages in thread

* Why compile.c ?
@ 1994-04-19 17:17 rob
  0 siblings, 0 replies; 2+ messages in thread
From: rob @ 1994-04-19 17:17 UTC (permalink / raw)


Why?  Why do by hand what a machine can do just
as well or better?

The SPARC MMU is inexcusably badly designed.
To make a single kernel that supports all variants
one must either write oodles of ugly assembly code,
with loops that must be unrolled for speed, or generate
code at boot-time tailored to the machine at hand.
We chose the latter approach because it's really
less code to maintain.  I wrote the compiler in just
a couple of hours one afternoon.  It's very easy stuff.

Since some of the code must be generated - for
example, cache line sizes vary from model to model -
what the hell?  Why not generate it all?  Easy, and
susceptible to adaptation as SUN's creative minds
continue to design hardware.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-04-19 17:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-04-19 16:22 Why compile.c ? yodaiken
1994-04-19 17:17 rob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).