Microcode in Intel's 8087 floating-point chip: the scale instruction
pwg
99 points
30 comments
September 12, 2026
Related Discussions
Found 5 related stories in 59.9ms across 6,361 title embeddings via pgvector HNSW
- z486: A 486-Class Pipelined FPGA CPU with Integrated Floating-Point matt_d · 19 pts · August 15, 2026 · 52% similar
- Decoding the NEC V20 Microcode mariuz · 14 pts · September 04, 2026 · 51% similar
- Z80 – The 1970s Microprocessor Still Alive (2021) asdefghyk · 132 pts · August 22, 2026 · 47% similar
- Frame – Linux X server in Assembly guybedo · 146 pts · July 17, 2026 · 45% similar
- Indirect Calling of Nested Functions on GCC Without Executable Stack uecker · 72 pts · August 29, 2026 · 44% similar
Discussion Highlights (4 comments)
kens
Author here for your 8087 questions...
cogman10
x87 is such a weird architecture. It was designed the same way you'd design a chip for a scientific calculator. Heck, It's almost a perfect fit for an HP RPN calculator. But for a compiler to target, it's just so painful. It's so different from almost all other ways CPUs work. There's a reason both CPU and compilers prefer to avoid x87 when possible and use regular SIMD (SSE/AVX) instead. Also, the arbitrary "Oh, and the registers are 80 bits wide" is also just one of those weird "Where did that number come from?".
garganzol
100x speed improvement of math operations by 8087 is not an overestimation. The difference for apps relying on math was crazy back then. I experienced this first-hand on my 80286 machine, where it was 3-second vs 300-second calculation results. One neat feature of 8087 instruction set is that it can be interspersed with x86 instructions in the code stream, giving you a simultaneous access to two processor chips working in parallel. This combo forms a real asymmetrical multi-processor system with certain opportunities for hardware-assisted code parallelization. If a thoughtful instruction scheduling is used, floating operations executed by 8087 work in parallel with the usual integer x86 code.
finn888
The jump from a simple scale instruction to 140 micro-instructions makes the special-case machinery much more concrete.