<div dir="ltr">One of the neatest compilers I worked with was Eric Biederman's romcc.<div><br></div><div>"romcc is a C compiler which produces binaries which do not rely on RAM, but<br>instead only use CPU registers."<br></div><div><br></div><div>We used romcc for 15 years or so. It was critical to getting DRAM and Hypertransport topology working on the Opteron. Remember: at power-on/reset, RAM is dead, dead, dead, and getting it going on newer systems is (literally) billions of instructions. So, no ram. The only "ram" romcc had were the general purpose registers. Later, eric added support for the SIMD registers, and "memory" grew a few hundred bytes. No memory, no stack: 100% inlining. romcc knew how to use puddle arithmetic and all the other tricks. It was amazing.</div><div><br></div><div>It is a full ANSI C compiler (as of 2006 ANSI C) in 25KLOC code, in one file: <a href="https://github.com/wt/coreboot/blob/master/util/romcc/romcc.c">https://github.com/wt/coreboot/blob/master/util/romcc/romcc.c</a></div><div><br></div><div>The story of its creation, as told to me by the Linux NetworX CTO ca 2004: Eric worked at Linux NetworX at the time, and they were shipping LinuxBIOS-based systems. Everyone working with Opteron was suffering with assembly. Eric vanished for 30 days, and on the 31st day returned from the mountain (or his apartment I guess) with romcc, and It Was Good. Really good. The code we wrote for Opteron Hypertransport was far better than AMDs; they even admitted it to us later.  We could even run with empty Socket 0; they could not. </div><div><br></div><div>Last I checked, it still builds and 100 or so regression tests work just fine.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 11, 2024 at 3:28 PM Peter Yardley <<a href="mailto:peter.martin.yardley@gmail.com">peter.martin.yardley@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I used the DEC VMS C compiler extensively while I was at NSWIT. I ported a lot of Berkley (I think) C code to VMS. Some of their VLSI design suite, KIC etc. There weren’t a lot of changes to make, the compiler and library was pretty K&R from what I remember. The usual small header issues applied. VMS IO is a bit different from UNIX IO  but they had a mode (stream I think) that meant minimal changes to UNIX code.<br>
<br>
<a href="http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/vax/lang/c/AI-L370C-TE_Guide_to_VAX_C_V2.3_Mar1987.pdf" rel="noreferrer" target="_blank">http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/vax/lang/c/AI-L370C-TE_Guide_to_VAX_C_V2.3_Mar1987.pdf</a><br>
<br>
It did help that the code I was working with was pretty damn good. I learn C porting KIC to VMS.<br>
<br>
> On 12 Mar 2024, at 7:44 AM, Marc Rochkind <<a href="mailto:mrochkind@gmail.com" target="_blank">mrochkind@gmail.com</a>> wrote:<br>
> <br>
> Since it came up in this thread, here's my review of Coherent in BYTE Magazine (1985):<br>
> <br>
> <a href="https://www.mrochkind.com/mrochkind/docs/Byte-Pick-Coherent-Theos.pdf" rel="noreferrer" target="_blank">https://www.mrochkind.com/mrochkind/docs/Byte-Pick-Coherent-Theos.pdf</a><br>
> <br>
> Marc<br>
> <br>
> On Mon, Mar 11, 2024 at 11:13 AM Paul Ruizendaal <<a href="mailto:pnr@planet.nl" target="_blank">pnr@planet.nl</a>> wrote:<br>
> On Thu, Mar 7, 2024, 4:14 PM Tom Lyon <pugs78 at <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>> wrote:<br>
> <br>
> > For no good reason, I've been wondering about the early history of C<br>
> > compilers that were not derived from Ritchie, Johnson, and Snyder at Bell.<br>
> > Especially for x86.  Anyone have tales?<br>
> > Were any of those compilers ever used to port UNIX?<br>
> <br>
> An unusual one would be the “revenue bomb” compiler that Charles Simonyi and Richard Brodie did at Microsoft in 1981.<br>
> <br>
> This compiler was intended to provided a uniform environment for the menagerie of 8 and 16-bit computers of the era. It compiled to a byte code which executed through a small interpreter. This by itself was hardly new of course, but it had some unique features. It generated code in overlays, so that it could run a code base larger than 64KB (but it defined only one data segment). It also defined a small set of “system” commands, that allowed for uniform I/O. I still have the implementation spec for that interpreter somewhere.<br>
> <br>
> This compiler was used for the first versions of Multiplan and Word, and my understanding is that the byte code engine was later re-used in Visual Basic. I think the compiler also had a Xenix port, maybe it even was Xenix native (and at this time, Xenix would still essentially have been V7).<br>
> <br>
> I am not sure to what extent this compiler was independent of the Bell compilers. It could well be that it was based on PCC, Microsoft was a Unix licensee after all and at the time busy doing ports. On the other hand, Charles Simonyi would certainly have been capable of creating his own from scratch. I do know that this compiler preceded Lattice C, the latter of which was distributed by Microsoft as Microsoft C 1.0.<br>
> <br>
> Maybe others know more about this Simonyi/Brodie compiler?<br>
> <br>
> Paul<br>
> <br>
> Notes:<br>
> <a href="http://www.memecentral.com/mylife.htm" rel="noreferrer" target="_blank">http://www.memecentral.com/mylife.htm</a><br>
> <a href="https://web.archive.org/web/20080905231519/http://www.computerworld.com/softwaretopics/software/appdev/story/0%2C10801%2C76413%2C00.html" rel="noreferrer" target="_blank">https://web.archive.org/web/20080905231519/http://www.computerworld.com/softwaretopics/software/appdev/story/0%2C10801%2C76413%2C00.html</a><br>
> <a href="http://seefigure1.com/images/xenix/xenix-timeline.jpg" rel="noreferrer" target="_blank">http://seefigure1.com/images/xenix/xenix-timeline.jpg</a><br>
> <br>
> <br>
> -- <br>
> My new email address is <a href="mailto:mrochkind@gmail.com" target="_blank">mrochkind@gmail.com</a><br>
<br>
Peter Yardley<br>
<a href="mailto:peter.martin.yardley@gmail.com" target="_blank">peter.martin.yardley@gmail.com</a><br>
<br>
</blockquote></div>