From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 19 Apr 1994 13:17:36 -0400 From: rob@plan9.research.att.com rob@plan9.research.att.com Subject: Why compile.c ? Topicbox-Message-UUID: 01c88d5a-eac8-11e9-9e20-41e7f4b1d025 Message-ID: <19940419171736.0DRYq0DJCEWPSwRW8WyEdCek8pMv5dObVWA3yLNd0kk@z> 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.