- Intel 8087 microcode used 14 separate micro-instructions just to swap two floating-point registers — far more than you’d expect.
- Researchers reverse-engineering Intel 8087 microcode have physically opened chips and imaged them under a microscope to decode its secrets.
- The 8087, introduced in 1980, established the floating-point standard that virtually every modern processor still follows today.
- Each of the 8087’s 1,648 micro-instructions is just 16 bits long, packed with enough logic to drive complex maths operations.
- Intel 8087 microcode used 14 separate micro-instructions just to swap two floating-point registers — far more than you’d expect.
- Researchers reverse-engineering Intel 8087 microcode have physically opened chips and imaged them under a microscope to decode its secrets.
- The 8087, introduced in 1980, established the floating-point standard that virtually every modern processor still follows today.
- Each of the 8087’s 1,648 micro-instructions is just 16 bits long, packed with enough logic to drive complex maths operations.
The Chip That Shaped Every Processor You’ve Ever Used
The Intel 8087 microcode is getting a second life — not because Intel needs it, but because a group of dedicated reverse engineers thinks the world should actually understand what’s running inside one of computing’s most consequential chips. Introduced in 1980, the 8087 floating-point unit was a dedicated co-processor designed to handle the heavy mathematical lifting that the main 8086 CPU simply couldn’t do efficiently. The performance difference was dramatic: floating-point operations ran up to 100 times faster with the 8087 attached. That’s not a rounding error. That’s the difference between a machine that’s useful for scientific and engineering work and one that isn’t.
What makes the 8087 genuinely significant — beyond the raw speed gain — is its legacy. The floating-point standard it established didn’t die with the chip. It became the foundation for IEEE 754, the specification that governs how virtually every modern processor handles decimal numbers. Your MacBook, your cloud server, your smartphone’s application processor — they’re all, in some philosophical sense, descendants of decisions Intel engineers made four decades ago when they designed the 8087’s arithmetic logic. Studying the Intel 8087 microcode is therefore studying the origin point of modern floating-point computing.
How Researchers Are Cracking Intel 8087 Microcode
The Opcode Collective, a reverse-engineering group, has been methodically working through the 8087’s internal instruction set. The approach is as hands-on as it sounds. Researchers physically open the chips — decapping them — and use high-resolution microscopy to photograph the die at a level of detail that makes the individual functional blocks readable. From those images, the team maps out what each region of silicon actually does.
What they’re finding is a chip with a surprisingly sophisticated internal architecture hiding behind a relatively simple external interface. The Intel 8087 microcode ROM stores 1,648 micro-instructions, each exactly 16 bits wide. These aren’t the assembly instructions a programmer would write — they’re a layer below that, the undocumented low-level commands that the chip’s own internal engine steps through to execute each visible instruction. The ROM sits at the centre of the die, with a microcode engine to its left that handles sequencing, jumps, and subroutine calls. The lower half of the chip is the datapath — the actual arithmetic circuitry — split into a 16-bit path for exponents and a 64-bit path for the significand, or fractional part of a number.
The chip also carries two temporary registers and eight stack registers, each storing both the exponent and significand of a number. Alongside the numeric data, every register includes two tag bits that classify the stored value: valid, special (covering infinities, NaNs, and denormalised values), zero, or empty. It’s a small but telling design choice — the hardware itself is tracking the semantic meaning of its contents, not just the raw bits. Analysts studying Intel 8087 microcode point to this tagging system as an early example of hardware-level type awareness built directly into the execution layer.
Why a Simple Register Swap Takes 14 Steps
Here’s where the Intel 8087 microcode gets genuinely interesting. The FXCH instruction — floating-point exchange — does exactly what it sounds like: it swaps the value at the top of the register stack with a value at another specified stack position. On paper, that sounds trivial. In practice, the chip’s microcode requires 14 separate micro-instructions to pull it off.
Why so many? The answer lies in the 8087’s architecture. The registers aren’t a simple flat array you can index directly. They’re organised as a stack — a last-in, first-out structure where you push values on and pop them off. Accessing a specific register means referencing it relative to wherever the top of the stack currently sits. That top position shifts every time a value is pushed or popped. So FXCH isn’t just moving bytes around — it’s navigating a dynamic addressing scheme, preserving tag bits, and making sure both the exponent and significand paths are handled correctly for each register involved.
The stack-based architecture was a deliberate design decision. Intel’s engineers believed it would simplify compiler design and make function calls more efficient by reducing the need to explicitly name registers in every instruction. The theory was sound. In practice, as the article’s author notes, it didn’t work out quite as hoped — and later x86 extensions like SSE moved firmly back toward flat register files. But in 1980, the stack model was the chosen path, and every quirk of the FXCH implementation flows directly from that choice. Unpacking why FXCH works the way it does is one of the clearest illustrations of what Intel 8087 microcode reveals about early processor design trade-offs.
The Anatomy of a Micro-Instruction
Each 16-bit Intel 8087 microcode instruction packs a surprising amount of function into very few bits. The first three bits determine the instruction type, which then controls how the remaining 13 bits are interpreted. There are eight distinct types, covering the main operations the chip performs internally.
Transfer instructions move data between internal registers, specifying source and destination. Shift instructions drive the chip’s barrel shifter — the hardware block that can move bits left or right in a single clock cycle, essential for fast multiplication and division. Adder/subtractor instructions handle arithmetic, and can be chained in loops for multiply and divide operations. A separate class of arithmetic control instructions configures the adder’s behaviour, setting rounding modes and other parameters that affect numeric precision.
Then there are the control flow instructions. Far jumps and far calls transfer execution to a fixed list of target addresses in the microcode ROM, with a condition field allowing the jump to be made conditional on various internal states — and a single bit that inverts the condition, effectively doubling the range of conditional behaviours without adding another instruction type. Local jumps handle shorter conditional branches within a nearby range of micro-addresses. Finally, miscellaneous instructions cover subroutine returns, exception signalling, and the instruction that terminates a microcode sequence and hands control back to the main execution engine.
It’s a tight, pragmatic instruction set — clearly designed by people who were counting bits carefully, because in 1980, they had to be. Every encoding choice visible in the Intel 8087 microcode reflects that discipline.
What This Kind of Reverse Engineering Actually Tells Us
There’s a practical question worth asking: why does any of this matter now? The 8087 hasn’t been a standalone chip for decades. Its functionality was absorbed into the main x86 die long ago, and modern floating-point units are orders of magnitude more complex. So what’s the point of understanding its microcode?
The answer is partly historical and partly technical. Understanding the Intel 8087 microcode implementation choices helps explain why x87 floating-point behaves the way it does — including some quirks that still surface in modern code. The IEEE 754 standard, which the 8087 heavily influenced, shapes every floating-point calculation happening in data centres right now. Knowing where those design decisions came from — and what constraints drove them — is genuinely useful context for anyone working close to the metal.
There’s also a broader argument about transparency. Modern processors are extraordinarily complex, and their internal microcode is typically proprietary and hidden. The 8087 is simple enough that a dedicated group of researchers can fully map it. That makes it a rare opportunity: a complete, verifiable picture of how a real commercial processor actually worked at the lowest level, with all the ad hoc decisions and corner cases intact. What the Opcode Collective is building is effectively an archaeological record of early chip design — and as the engineers who built these systems retire or pass on, that record becomes increasingly valuable. The closer researchers get to a full reverse-engineered map of the Intel 8087 microcode, the better positioned anyone will be to understand the roots of the floating-point infrastructure the entire industry still runs on.
Source: https://www.righto.com/2026/05/microcode-inside-intel-8087-floating.html




