LLMpediaThe first transparent, open encyclopedia generated by LLMs

x87 FPU

Generated by GPT-5-mini
Note: This article was automatically generated by a large language model (LLM) from purely parametric knowledge (no retrieval). It may contain inaccuracies or hallucinations. This encyclopedia is part of a research project currently under review.
Article Genealogy
Parent: MMX Hop 5
Expansion Funnel Raw 62 → Dedup 0 → NER 0 → Enqueued 0
1. Extracted62
2. After dedup0 (None)
3. After NER0 ()
4. Enqueued0 ()
x87 FPU
Namex87 FPU
DesignerIntel
Introduced1980s
Architecturex86
PredecessorIntel 8087
SuccessorSSE, AVX

x87 FPU The x87 FPU is a family of floating-point coprocessors and integrated units developed for Intel's x86 microprocessor line, providing floating-point arithmetic, transcendental functions, and specialized data formats. Originally available as discrete chips such as the Intel 8087 and later integrated into CPUs like the Intel 486 and Intel Pentium, the x87 influenced numeric software across platforms including Microsoft Windows, Unix, and Linux. Its register stack model and 80-bit extended precision shaped compilers and libraries used by projects such as GNU Compiler Collection, Microsoft Visual C++, and Borland Delphi.

Overview

The x87 family began with the Intel 8087 coprocessor and evolved through integrated implementations in processors such as the Intel 80286, Intel 80386, Intel 80486, and Intel Pentium series. Designed to accelerate floating-point operations for applications developed on systems by vendors like IBM and DEC, the x87 provided arithmetic, comparison, conversion, and transcendental operations used in scientific computing, computer-aided design, and multimedia. Its stack-based register model differentiated it from register-based FPUs used later by vector extensions in processors from AMD and Intel.

Architecture and data formats

The x87 implements an eight-register register stack labeled ST(0) through ST(7), with operations implicitly targeting the top-of-stack; implementations adhered to the IEEE 754-related 80-bit extended precision format comprising a 1-bit sign, 15-bit exponent, and 64-bit significand. The instruction set supports loading and storing of 32-bit single-precision and 64-bit double-precision values compatible with formats used in IEEE 754-1985 implementations and in languages standardized by ANSI C and ISO/IEC 9899. Memory operands use x86 addressing modes defined in the Intel System Architecture manuals; data transfer and control words permit environment saving compatible with operating systems such as MS-DOS and Windows NT.

Instruction set and programming model

x87 instructions include arithmetic (FADD, FSUB, FMUL, FDIV), transcendental (FSIN, FCOS, FPTAN), comparison (FCOM, FCOMI), conversion (FST, FIST), and control (FLD, FSTENV, FSTCW). The programming model exposed by compilers such as the GNU Compiler Collection and Microsoft Visual C++ maps high-level language constructs to sequences of x87 opcodes; calling conventions for floating-point values evolved between systems like System V and Windows x64 ABI. Exception and status flags are managed via control and status words, which operating systems and runtime libraries like glibc inspect during context switches and signal delivery.

Precision, rounding, and exception handling

x87 supports selectable precision modes—24-bit (single), 53-bit (double), and 64-bit (extended) significands—set in the control word to accommodate trade-offs between speed and accuracy for software such as MATLAB and GNU Octave. Rounding modes include round-to-nearest, round-down, round-up, and round-toward-zero, aligning with IEEE 754 semantics used in numerical codes developed by institutions like Los Alamos National Laboratory and Lawrence Livermore National Laboratory. Exception conditions (invalid operation, denormalized operand, divide-by-zero, overflow, underflow, precision) are signaled via the status word and can be masked or unmasked, a behavior relied upon in scientific libraries like LAPACK and BLAS.

Implementation history and variants

Early discrete x87 chips include the Intel 8087, Intel 287, and Intel 387 coprocessors; subsequent integration occurred in microarchitectures such as P5 (microarchitecture), P6 (microarchitecture), and later NetBurst. Competing and compatible implementations were produced by firms like AMD, Cyrix, and Transmeta, while embedded derivatives appeared in systems by Texas Instruments and Analog Devices. Architectural extensions and replacements emerged with the advent of SIMD units such as Streaming SIMD Extensions and Advanced Vector Extensions, which shifted numeric workloads toward XMM and YMM register files.

Usage and software support

Operating systems and toolchains including GNU/Linux, FreeBSD, Windows NT, and the Darwin kernel provided context-switch support and FPU state management for x87, influencing threading libraries and virtual machines like VMware and QEMU. Compilers including GCC, Clang, and Intel C++ Compiler generate x87 code for legacy compatibility, while numerical applications such as Mathematica, Maple, and engineering packages from ANSYS and Siemens historically relied on x87 precision modes. Language runtimes for Java and Python interacted with x87 through native extensions and interpreter internals.

Performance, compatibility, and legacy impact

Although SIMD extensions from vendors like Intel and AMD delivered superior throughput for vectorizable workloads, x87 remained important for scalar and high-precision computations in legacy codebases maintained by organizations including NASA and CERN. Compatibility layers in virtualization and emulation projects preserved x87 semantics for binary compatibility with historical software such as applications compiled for MS-DOS and early Windows releases. The x87’s 80-bit extended format influenced standards committees and numerical analysis practices, leaving a legacy visible in compiler options, library implementations, and long-lived scientific code.

Category:Floating-point