Memoirs: Encore Part 2
October 06, 2020When I started at Encore, their machines were based on the National Semiconductor 32K series of processors - roughly contemporary with the Motorola 68K and Intel x86 series, and of the same general CISC type. I've often wondered if this awkward processor choice was part of the reason why Encore never seemed to get as much recognition as Sequent (which switched early to the more familiar x86) or even Pyramid (which used their own RISC CPU). In 1990, when it turned out that NatSemi had no plan beyond the 32532, Encore started a pair of projects based on the Motorola 88K. The Series 91 "Gemini" was a four-processor board that I believe we just bought from Motorola. The Series 93 "Taurus" would be our own boards plugging into our own backplane, much like the existing NS32K Multimax systems. I never saw a Taurus, and don't know for sure if that idea ever came to fruition.
The 88K was a classic "exposed pipeline" RISC. Instead of trying to hide different kinds of stalls, it made them explicit as one-instruction delays on both loads and branches. On loads, this meant that the instruction after the load could always use the previous value, and then the instruction after that could always use the loaded value. On branches, there was no prediction or speculative execution; the instruction after a branch would always execute before the branch was actually taken. This was fun if that instruction was also a branch, effectively yielding a single-instruction subroutine. If you couldn't figure out something useful to put in either kind of delay slot, you could just add a NOP, and the early compilers tended to do this a lot. Nowadays it's generally true that "you can't beat the compiler" by writing your own assembly code, but back then it was not uncommon.
Many people found this complexity annoying, but I enjoyed the "puzzle solving" aspect of writing assembly code for the 88K. I remember writing fast memory- and string-copy routines by hand, taking full advantage of those delay slots and other features to yield a noticeable system-wide performance improvement. Later, I had to write some low-level exception handling (the first few instructions after the exception and so very performance-critical) to dispatch either to UMAX or MPX depending on context. As it happens, I wrote some of that while I was drying out after a night of drunken revelry in Florida (where the Gould old-timers who worked on MPX were based), and was pretty amazed the next morning when it worked.
The original team working on the Gemini port was four of our most senior developers. They got stuff like the boot code, virtual memory subsystem, and scheduler working. Because I was the person most responsible for network code, I was then brought in to work on that. There was only one such machine in the entire world, which we called Icarus because it crashed a lot, so we had to share time on it. To maximize my own time, I worked nights for a few months. (BTW it was during this time that I met my wife.) This is where we tripped over one of the 88K's less appealing features - it was completely intolerant to misaligned loads. If you issued a four-byte load, it had to be on a four-byte boundary. This was pretty problematic in a lot of networking code. An Ethernet header is 14 bytes, so if an entire packet was aligned (as would typically be the case due to DMA requirements) the following IPv4 header would definitely not be. This caused misaligned-access exceptions every time when code tried to load the 32-bit IPv4 source or destination at offset 12 or 16 respectively. I spent a lot of time hunting down all the places where this or similar problems existed, fixing each one. Eventually I broke down and wrote an exception handler that would emulate the misaligned access, using some of those skills I'd learned writing a 68K disassembler a few years prior. It would also log, so we could fix whatever case we'd just found. I sincerely doubt that we ever found all of them.
Working on Gemini had been a highlight of my career thus far, but it was still a bit of a grind. Night shifts and trips to Florida were taking their toll. Also, the company was clearly turning into Gould more and more every month. At an age where I still needed little excuse to seek new pastures, I started looking for the next thing. Coming up next: first encounters with KSR, and Sequoia.