X87

Untermenge des Befehlssatzes der x86-Architektur für Gleitkommaberechnungen
Dies ist eine alte Version dieser Seite, zuletzt bearbeitet am 20. Dezember 2009 um 23:48 Uhr durch Berntie (Diskussion | Beiträge) (kleine Formalitäten). Sie kann sich erheblich von der aktuellen Version unterscheiden.
Diese Baustelle befindet sich fälschlicherweise im Artikelnamensraum. Bitte verschiebe die Seite oder entferne den Baustein {{Baustelle}}.

x87 is a floating point related subset of the x86 architecture instruction set. The term derives from the, originally, separate floating point coprocessors that had names ending in "87". Like other extensions to the basic instruction set, these instructions are not strictly needed to construct working programs, but provide hardware implementation of common numerical tasks, allowing these tasks to be performed much faster. For example, the x87 instruction set includes instructions to calculate the sine or cosine of a value.

Most x86 processors since the Intel 80486 have had these x87 instructions implemented in the main CPU but the term is sometimes still used to refer to that part of the instruction set. Before x87 instructions were standard in PCs, compilers or programmers had to use rather slow library calls to perform floating-point operations, a method that is still common in (low cost) embedded systems.

The x87 family does not use a directly addressable register set such as the main registers of the x86 processors; instead the x87 registers form a 8-level deep stack structure ranging from st0 to st7. The x87 instructions operate by pushing, calculating, and popping values on this stack. However, dyadic operations such as FADD, FMUL, FCOM, and so on, may either address the topmost st0 and st1 implicitly, or, alternatively, it may use st0 together with an explicit memory operand or another register; st0 may thus be used as an accumulator (a combined destination and left operand) and can also be exchanged with another stack register using an instruction called exch st(x). This makes the x87 stack useable as seven freely addressable registers plus an accumulator. This is especially appliciable on superscalar x86 processors (Pentium of 1993 and later) where these exchange instructions (codes D9C8..D9CFh) are optimized down to a zero clock penalty (by using one of the integer paths for exch st(x) in parallel with the FPU instruction). Despite this, some compiler writers have found it complicated to construct code generators that schedule x87 code effectively.

The x87 instructions are compatible with the IEEE-754 standard for floating-point. However, since the x87 processors all uses 80-bit wide registers internally (to allow for sustained precision over many calculations), it does not perform roundings exactly as the strict 32-bit and 64-bit IEEE-754 formats do, unless a special rounding mode is configured via a special status register. A given sequence of arithmetic operations may thus behave slightly different compared to strict IEEE-754 formats.[1] Since the introduction of SSE2, the x87 unit is not as essential as it once was, except for high precision calculations demanding the 64-bit mantissa precision available in the 80-bit format.

8087

The 8087 was the first math coprocessor for 16 bit processors designed by Intel (the I8231 was older but designed for the 8 bit Intel 8080); it was built to be paired with the Intel 8088 and 8086 microprocessors.

80287

 
6 MHz version of the Intel 80287

The 80287 (i287) was the math coprocessor for the Intel 80286 series of microprocessors. Intel (and its competitors) later introduced an 80287XL, which was actually an 80387SX with a 287 pinout. The 80287XL contained an internal 3/2 multiplier so that motherboards which ran the coprocessor at 2/3 CPU speed could instead run the FPU at the same speed of the CPU.

The 80287 and 80287XL also worked with the 80386 microprocessor, and was initially the only coprocessor available for the 80386 until the introduction of the 80387 in 1987. Finally, it was also able to work with the Cyrix Cx486SLC. However for both of these chips the 80387 was strongly preferred for performance reasons and the greater capability of the instruction set.

Modelle

  • i80287-3 (6MHz)
  • i80287-6 (6MHz)
  • i80287-8 (8MHz)
  • i80287-10 (10MHz)
  • i80287-12 (12.5MHz)
  • i80287XL (12.5MHz, 387SX core)
  • i80287XLT (12.5MHz, laptop version)

80387

The 80387 (387 or i387) was the first Intel coprocessor to be fully compliant with the IEEE 754 standard. Released in 1987, a full two years after the 386 chip, the i387 included much improved speed over Intel's previous 8087/80287 coprocessors, and improved the characteristics of trigonometric functions. (The 80287 limited the argument range to plus or minus 45 degrees.)

Without a coprocessor, the 386 normally performed floating-point arithmetic through (slow) software routines, implemented at runtime through a software exception-handler. When a math coprocessor is paired with the 386, the coprocessor performs the floating point arithmetic in hardware, returning results much faster than an (emulated) software library call.

The i387 was compatible only with the standard i386 chip, which had a 32-bit processor bus. The later cost-reduced i386SX, which had a narrower 16-bit data bus, could not interface with the i387's 32-bit bus. The i386SX required its own coprocessor, the Intel 80387SX, which was compatible with the SX's narrower 16-bit data-bus.

80487

The i487 is a floating point unit coprocessor for Intel i486SX machines. It was essentially a full-blown i486DX chip. When installed into an i486SX system, the i487 disabled the main CPU and took over all CPU operations. In theory the computer would be able to operate if the original i486SX CPU was removed, although in practice a pin on the i487 prevented this.

NexGen Nx587

NexGen – the only member

Siehe auch

Einzelnachweise

  1. David Monniaux, The pitfalls of verifying floating-point computations, to appear in ACM TOPLAS

Literatur

  • Intel Corporation, IA-32 Intel Architecture Software Developer's Manual Volume 1: Basic Architecture, order number 253665-017