9fans archive / 1994 / 04 / 11 / prev next From: rob@pla... rob@pla... Subject: Why compile.c ? Date: Tue, 19 Apr 1994 13:17:36 -0400 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.