Intel Patched a 1978 8086 Stack Bug by Cramming Spare Logic Gates Into Empty Corners of the Silicon
Microscope forensics on a 1978 processor revealed an awkward emergency kludge that still explains an obscure footnote in Intel's original manual.

Dissolving the single top layer of metal off a 1978 Intel 8086 with acid exposes a tidy little city of silicon and polysilicon. Right up in the center sits the Group Decode ROM, which Intel called a ROM even though it works like a Programmable Logic Array: a dense, orderly grid of NOR gates that sorts 8-bit instructions into buckets.
Except the last two columns of that grid go completely rogue. Their upper halves sit empty while two signals sneak out the side, bypass the top of the array, and wander over to a NOR gate and an inverter sitting “kind of in the middle of nowhere, separated from the rest of the logic,” as Shirriff put it. Those gates then feed a three-input NOR gate that is “curiously split into two pieces,” with two inputs parked together and the third transistor stranded across the chip. The whole kludge sprawls across “a fairly large fraction of the die” (neat layouts are for chips that ship right the first time).
Shirriff read the transistor patterns in those two oddball columns and matched them to bit patterns 10001110 and 000xx111. In 8086 assembly, those decode to MOV sr,xxx and POP sr, the instructions that load a value into a segment register or pop one off the stack into it. Digging into old Intel errata turned up the exact crime scene: “Interrupts Following MOV SS,xxx and POP SS Instructions May Corrupt Memory. On early Intel 8088 processors (marked “INTEL ‘78” or “(C) 1978”), if an interrupt occurs immediately after a MOV SS,xxx or POP SS instruction, data may be pushed using an incorrect stack address, resulting in memory corruption.”
Here is how the 8086 tripped over its own shoelaces. It carved memory into four segments—Code, Data, Stack, and Extra—each tracked by its own segment register. Moving the stack meant updating the Stack Segment register (SS) and then updating the Stack Pointer (SP). If a timer or I/O interrupt fired in the tiny gap between those two instructions, the processor saved its state using the old pointer inside the new segment, dumping data into “essentially a random location in memory, which is bad.”
Programmers normally dodge that kind of race by turning interrupts off during the swap. That trick failed here because the 8086 includes a non-maskable interrupt (NMI) for critical events that software cannot shut off. Since Intel couldn’t ship a firmware hotfix in 1978, engineers literally had to wire a hotfix into the silicon, blocking interrupts for one instruction after a segment-register update so SP could safely follow SS. Because those two PLA columns matched segment-register updates broadly, the delay kicked in for every segment register—a quirk Intel quietly tucked into a footnote on page 2-24 of the User’s Manual: “A MOV (move) to segment register instruction and a POP segment register instruction are treated similarly: no interrupt is recognized until after the following instruction.”
Shirriff has also reverse-engineered the far simpler RISC ARM1, and while he already knew the 8086 was packed with ad-hoc special cases, this is the first circuit on the die he has pinned down as an outright bug fix. He still hopes to track down a die photo of an even earlier 1978 chip from before the revision to confirm what else Intel had to move around.
Every systems engineer knows the feeling of shipping an emergency workaround at 2 a.m. and praying nobody inspects the diff. Intel’s 1978 chip designers had it worse: their emergency workaround got baked into glass and metal with a single routing layer and 40 bond wires, then preserved for nearly five decades until someone dissolved the roof off with acid.
You can still expect modern silicon to hide plenty of similar last-minute tape-out compromises, even with more than a dozen metal layers and boot-time microcode patches to cover the tracks. Whenever a hardware manual buries a suspiciously specific exception in a footnote, odds are good there is a panicked engineer’s detour sitting right underneath it. Silicon never forgets a rush job.