Ken Shirriff, working with a group called the Opcode Collective, published a detailed reverse-engineering of the FSCALE instruction inside Intel's 8087 floating-point coprocessor, introduced in 1980. FSCALE scales a number by a power of two by adjusting its exponent, a task that sounds trivial next to multiplication or division.

FSCALE microcode (8087)
#0748 st(0) -> tmpA           Input argument from top of stack
#0749 jmp #0776 if tmpA:tag ZERO   Bail if 0
#0750 stackPtr++
#0751 st(0) -> tmpB           Scale argument from stack(1)
#0752 stackPtr--
#0753 jmp #0776 if tmpB:tag ZERO   Bail if 0
#0754 expconst 0x403e         Const 403e: exp shift to convert to int
#0755 jmp #0763 if not tmp empty/special/div
#0756 call SPECIAL_TMPS       Special handling
#0757 jmp #0762 if flag
#0758 jmp #0761 if not tmpB:tag SPECIAL
#0759 except:invalid          Invalid exception, use NaN
#0760 NaN -> tmpA
#0761 jmp #0776 if intr
#0762 jmp #0775 if expConv[0] Return tmpA if expConv set, otherwise continue

Shirriff found the opposite. FSCALE's microcode runs to more than 140 micro-instructions across three levels of subroutine calls, drawn from the chip's total microcode ROM of 1648 instructions. He photographed an 8087 die (5mm by 6mm) under a microscope to trace how the routine uses the chip's adder, shifter, exponent converter and exponent constant ROM.

The simple path, scaling a normal number by a nonzero value, takes about 22 micro-instructions starting at address #0748: the two stack arguments are moved into temporary registers tmpA and tmpB, the scale factor is converted to an integer via a shift controlled by the constant 0x403e, then added to the exponent.

Most of the complexity comes from edge cases. A subroutine called SPECIAL_TMPS handles empty stack registers, denormalized numbers, infinities and NaNs. If both operands happen to be NaN, the microcode compares their fraction bits and returns the larger one, a documented but rarely used behavior meant to let programmers trace which NaN triggered which error. Other subroutines, NONNORMAL_RESULT, CREATE_DENORM and ADJUST_PRECISION, handle overflow, underflow, denormal creation and rounding across the chip's three supported precisions under four rounding modes.

Shirriff frames the 8087 as the ancestor of IEEE 754, the floating-point standard nearly every computer uses today, developed with input from numerical analyst William Kahan. He notes that Intel's 8087 Support Library, a software emulator for machines without the chip, needed about 16 kilobytes of 8086 code to replicate what the 8087 does with roughly 3.3 kilobytes of microcode.